Cleaning the Airbnb data
✓ Published0🌍 Public
YYonet
Last edited Jan 12, 2023
Created on Jan 12, 2023
This example shows the process of cleaning and restructuring Airbnb listing data. It transforms raw JSON records by extracting and reorganizing key fields, such as creating a slug from the listing name, structuring address and review objects, and adding metadata like photos and fees. The code uses Node.js `fs/promises` methods `readFile` and `writeFile` to load and save the data. It also applies a custom `deleteProperties` function to remove a long list of unnecessary fields, while parsing dates with a native `Date` constructor from yyyy-mm-dd strings.
AI-generated description