Skip to content

Interactive contour map visualising Dutch railways (NS) traveltime times

License

Notifications You must be signed in to change notification settings

bartromgens/nsmaps

Repository files navigation

nsmaps

Build Status Coverage Status Scrutinizer Code Quality

nsmaps uses nsapi to get Dutch railways travel information. matplotlib is used to create contour plots, which are converted to geojson lines with geojsoncontour. The geojson contours are drawn on an interactive OpenLayers 3 map where geojson-vt is used to create vector tiles.

Requires Python 3.4+.

Demo

nsmaps.romgens.com

Maps

Contour travel times

Color contours showing travel times from station A to any location in the Netherlands using a bicycle for the last leg of the trip.

Development

NS API key

You need to set an API username and key in local_settings.py. Request one here. Please note that the NS offers a limited number of requests per day.

Webpack bundles (JavaScript and CSS)

Install webpack and some plugins and loaders,

sudo npm install webpack -g
npm install

Watch for changes and compile bundle if found,

webpack --progress --colors --watch

Generate minified production files,

webpack -p