Upgrade to Pro — share decks privately, control downloads, hide ads and more …

100% Open Journey Planning Open source, open AP...

100% Open Journey Planning Open source, open APIs, open data

Presentation at FOSDEM / Geospatial devroom

Tuukka Hastrup

January 31, 2016
Tweet

More Decks by Tuukka Hastrup

Other Decks in Technology

Transcript

  1. Topics Open data FOSS Developer community HTML5 OpenTripPlanner Open standards

    GraphQL Real-time routing Open APIs UI and UX design Agile development React.js Leaflet MQTT REST Digitransit OpenStreetMap GTFS Pelias Multimodal routing CoffeeScript
  2. Public transport is important! • More enjoyable cities, cheaper housing

    • Youth in cities like Stockholm & Helsinki don't want to get a driver's license anymore • Different customer profiles – Daily customers of public transport, commuting – Car owners → Mobility as a Service (MaaS) – Tourists
  3. Case Helsinki and Finland • Low population density → mass

    transportation is a challenge • Helsinki region vs. national coverage • Helsinki region public transport: – 1.3 million inhabitants – 1 million boardings per day • Current HSL Journey Planner reittiopas.fi/en/ – 0.1 million users per day – Customers very satisfied: 50% NPS
  4. 7.6.2012 Digitransit: navigator for public transport • Integrated real-time passenger

    services for multi-modal trips • Open APIs first: This is not a single app, this is an application and a foundation for more: next generation, third parties, etc. • Mobile first: Small screens set the design constraints • HTML5 first: Can wrap HTML5 into native app later • Regular customers first − A commuter shouldn't need to re-choose the destination every morning and evening.
  5. HTML5 mobile app • Open Data, Open API, Open Source

    • Leaflet • React, React-router, Fluxible • Webpack, CoffeeScript
  6. Routes Schedules Analyses Basic service Applications and services Quality monitoring

    Traffic planning APIs and examples Transport data: production, APIs and utilisation Open Data Novel services Responsibility of the authorities Third parties Disruptions Forecasts Vehicle locations
  7. MQTT Example message payload (JSON): {"tsi":1431417982,"spd":5,"lat":60.17052,"long":24.94359,"dl":52 ..} MQTT topic structure:

    /hfp/journey/type/id/line/direction/headsign/start_time/ next_stop/geohash_level/geohash Example message topic: /hfp/journey/bus/67bf46c0/1055/1/Koskela/1105/ 1020169/4/60;24/19/74/03 Example subscriptions: /hfp/journey/# (all messages) /hfp/journey/+/+/1055/1/# (line 1055 outbound) /hfp/journey/+/+/+/+/+/+/+/60;24/19/# (geohash map rectangle)
  8. GraphQL (1/2) { stops { lat lon name } }

    { agency(id:"HSL") { routes { gtfsId type shortName longName }}} { stopsByRadius(lat:60.218, lon:24.816, radius:500) { edges { node { distance stop { gtfsId } }}}}
  9. Main code repositories • digitransit: documentation • digitransit-ui: application •

    digitransit-deploy: Ansible, Docker, Compose • navigator-server: publish-subscribe for realtime data http://github.com/HSLdevcom
  10. Digitransit project resources Government funding: HSL and FTA Development team:

    • 7 consultants (6 developers, 1 graphical designer) • 1 in-house developer, Finnish Transport Agency • 1 in-house senior developer / architect, HSL Schedule: • Beta version this spring • Production before end of this year
  11. Conclusions • If your city has GTFS open data, you

    should deploy this • If not, you should ask the goverment to open the data • For better public transport, contribute to Digitransit Making it easier to hack public services.