Skip to content

basvank/schools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reachability of schools in Amsterdam

First version of Jekyll + Leaflet site, which computes and shows reachability of schools in Amsterdam using OpenTripPlanner Analyst. A later version will use dynamic data from a CitySDK LD API endpoint to load school data.

The site can be used to answer the following question:

Which schools in Amsterdam are within 20 minutes of bike and public transport travel from my home?

Screenshot

Serve site using Jekyll or GitHub pages

You can fork this repository, the website will be automatically hosted by GitHub Pages on http://username.github.io/schools. Or, clone/download this repository, and serve the site using Jekyll:

jekyll serve --baseurl ''

OpenTripPlanner

This project requires that you have a server running with the latest version of OpenTripPlanner.

Download the latest OpenTripPlanner JAR to the otp directory:

wget http://dev.opentripplanner.org/jars/otp-latest-master.jar -P otp

OpenTripPlanner needs OpenStreetMap road network data and GTFS public transport schedules to do its routing and analysis, and expects them to be in the 'otp/data' directory.

Note: the bigger the GTFS and OSM files are, the more memory OpenTripPlanner needs. Please start with city-size source files! (Or buy lots of memory.)

This website needs just data for the Amsterdam metropolitan area:

Type File Source
OpenStreetMap amsterdam_netherlands.osm.pbf OSM Metro Extracts
GTFS gtfs-iffns-latest.zip (NS) OVapi
GTFS gtfs-kv1connexxion-latest.zip (Connexxion) OVapi
GTFS gtfs-kv1ebs-latest.zip (EBS) OVapi
GTFS gtfs-kv1gvb-latest.zip (GVB) OVapi

You can download all the files needed for this project by running:

cd otp/data
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/amsterdam_netherlands.osm.pbf
wget http://gtfs.ovapi.nl/ns/gtfs-iffns-latest.zip
wget http://gtfs.ovapi.nl/connexxion/gtfs-kv1connexxion-latest.zip
wget http://gtfs.ovapi.nl/ebs/gtfs-kv1ebs-latest.zip
wget http://gtfs.ovapi.nl/gvb/gtfs-kv1gvb-latest.zip
cd ..
cd ..

Error in gtfs-iffns-latest.zip

In some versions of the NS GTFS file (gtfs-iffns-latest.zip), the required field agency_url is missing in agency.txt:

751,U-OV,,Europe/Amsterdam,nl
951,Eurostar,,Europe/Amsterdam,nl

To fix this, just open agency.txt and add a any URL:

751,U-OV,http://www.example.com/,Europe/Amsterdam,nl
951,Eurostar,http://www.example.com/,Europe/Amsterdam,nl

Build OTP graph

Build the OpenTripPlanner graph:

java -Xmx4G -jar otp/otp-latest-master.jar --build ./otp/data

Run OpenTripPlanner server:

java -Xmx4G -jar otp/otp-latest-master.jar --server --graphs ./otp/data --analyst --pointSet ./otp/pointsets

Afterwards, OpenTripPlanner should be available on http://localhost:8080/index.html.

The --pointSet ./otp/pointsets argument loads the Amsterdam schools pointset into OpenTripPlanner Analyst. You can see if OTP loads the file correctly by checking the URL http://localhost:8080/otp/pointsets/schools.geo.

Configuration

You can configure this project by editing the YAML files in the _data directory. otpa.yml contains the OpenTripPlanner endpoint configuration, which is by default expected to run on localhost:8080.

About

Demo of CitySDK/OpenTripPlanner Analyst combination

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 56.7%
  • JavaScript 43.3%