Skip to content

bartromgens/nsmaps

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
log
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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