Sunday, March 22, 2015

Worldwide Airport Distribution

Feeling motivated after reading the Let's Make a Map tutorial by Mike Bostock, I decided to look for something to put on the world map. Thanks to the the data collected on OurAirports.com, I have something to drop on the map.
The final result is on http://cheow-thianliang.github.io/airports.html

The following are screenshots of Worldwide Airport Distribution
Worldwide Airport Distribution

Show case the feature of hiding unwanted category of airport and display of airport name when mouse over 

These are the steps taken to map the worldwide airport distribution:

  1. Read and understand Let's Make a Map tutorial by Mike Bostock.
  2. Download  airports.csv from OurAirports.com
  3. Create GeoJSON file for world map (Generate subunits.json as shown by Mike without the where clause)
  4. Convert airports.csv into GeoJSON using Python script
  5. Merge and convert those GeoJSON file created in step 3 and 4 into topojson (Refer to Mike's blog)
  6. Create airports.html with Javascript code to render the result in 5.

References:
  • Let's Make a Map tutorial by Mike Bostock
    http://bost.ocks.org/mike/map/
  • Airport data
    http://ourairports.com/data/
  • GeoJSON specification
    http://geojson.org/geojson-spec.html
  • Using d3-tip to add tooltips by Caged
    http://bl.ocks.org/Caged/6476579

No comments:

Post a Comment