This post was updated on Monday, October 29 at 1pm
Every hurricane generates a pile of maps - but maybe you want your own to integrate into your website or just want to pass the time making maps. Here’s a quick run down on how you can build your own maps of Hurricane Sandy with open data from the National Hurricane Center (NHC) and open source tools.
NHC provides the GIS data in four shapefiles that show you where the hurricane will likely have an impact at various points over the projection period. We used all four, but how you take advantage of the data is up to you.
al182012.024A_5day_pts.shp: points where the hurricane will be every 12 hours over the next 5 days
al182012.024A_5day_lin.shp: lines showing the projected path of the eye of the storm
al182012.024A_5day_pgn.shp: polygons for 3-day and 5-day projection cones
al182012.024A_5day_ww_wwlin.shp: lines depicting coastal areas under hurricane and tropical storm watches and warnings.
You’ll notice that the filenames change according the basin, storm, year, advisory number, and shapefile. Knowing the file naming structure can help with quickly scripting updates and find the data you need quickly.
For more about the new features available in TileMill >= 0.10.0, see AJ’s recent post on customizing the Geograhy Class project.
Once you’re done styling, you can upload your layers directly to your MapBox account and composite them with a custom MapBox Streets layer. Now you can quickly embed you map in your website or blog, or build custom web apps using our API.
Alex took advantage of the open source ogr2ogr to convert NHC’s hurricane data shapefiles into GeoJSON and used Polymaps to render the data in-browser on top of MapBox Streets. Ogr2ogr and other GDAL tools provide a powerful command-line toolset to process geodata. Converting a shapefile to GeoJSON with ogr2ogr is simple:
ogr2ogr -f "GeoJSON" hurricane.json hurricane.shp
I took a different approach, using TileMill I created a map layer displaying the same data, but served as tiles that live on MapBox hosting.