Skip to content

Download and convert Singapore HDB Carpark CSV to JSON files.

Notifications You must be signed in to change notification settings

borisding/hdb-carpark-csv-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hdb-carpark-csv-parser

Usage

  • Assumed you have node & npm installed on machine:
npm i

npm run build

Output

  • CSV file will be downloaded and extracted to csv folder for parsing.
  • Two types fo JSON files will be generated in json folder:

i. List format for records, example:

{
  "total": 2062,
  "records": [
    ...
    {
      "car_park_no": "ACB",
      "address": "BLK 270/271 ALBERT CENTRE BASEMENT CAR PARK",
      "x_coord": "30314.7936",
      "y_coord": "31490.4942",
      "car_park_type": "BASEMENT CAR PARK",
      "type_of_parking_system": "ELECTRONIC PARKING",
      "short_term_parking": "WHOLE DAY",
      "free_parking": "NO",
      "night_parking": "YES"
    }
    ...
  ]
}

ii. Map format for records with carpark number as key, example:

{
  "total": 2062,
  "records": {
    ...
    "ACB": {
      "car_park_no": "ACB",
      "address": "BLK 270/271 ALBERT CENTRE BASEMENT CAR PARK",
      "x_coord": "30314.7936",
      "y_coord": "31490.4942",
      "car_park_type": "BASEMENT CAR PARK",
      "type_of_parking_system": "ELECTRONIC PARKING",
      "short_term_parking": "WHOLE DAY",
      "free_parking": "NO",
      "night_parking": "YES"
    }
    ...
  }
}

License

MIT | Data is under: Singapore Open Data Licence

About

Download and convert Singapore HDB Carpark CSV to JSON files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published