Simulating a public transportation system with OpenStreetMapX.jl

07/30/2021, 1:20 PM1:30 PM UTC


We will show how to perform modeling and of an urban network using the OpenStreetMapX.jl package. With actual Toronto data we will show how the library can be used for commuter routing including sidewalks and public transportation. We represent the city’s urban space as a LightGraphs.jl strongly connected, directed graph where vertices are located at geographic coordinates. Additionally, we will also demonstrate a simulation model explaining the role of public transportation in virus widespread.


Co-authors: Nykyta Polituchyi, Kinga Siuta, Paweł Prałat

The OpenStreetMapX.jl package is capable of parsing *.osm formatted data from the project. This data can be subsequently utilized to extract information about city’s POIs (points of interest), measure actual distances, perform routing and build numerical simulation model that make it possible to understand dynamics of a city. Those capabilities will be illustrated with a map of Toronto and show how to extend the osm data with other sources to extend the city routing beyond cars and sidewalks and model an actual public transportation network.

In this presentation two interconnected applications of the The OpenStreetMapX.jl package will be presented. Firstly, mixed routing combining different means of transportation will be presented and discussed showing how different Julia libraries can work together towards a common goal (including OpenStreetMapXPlot, LightGraphs, PyCall, Plots, DataFrames and others). Secondly, an agent-based simulation of a public transportation system will be discussed. We will show how to model and measure the impact of availability and frequency of public transportation onto decisions made by commuters and subsequently its contribution towards spreading the pandemic.

The presentation is accompanied by a Jupyter notebook that is available since on the OpenStreetMapX.jl GitHub project website since the first day of JuliaCon 2021.

In summary, in this talk the following areas will be discussed:

  • processing of OpenStreetMap data in Julia to obtain graph structures for processing with LightGraphs.jl
  • visualizing graphs, maps and spatial data with OpenStreetMapXPlot.jl (GR, PyPlot backends) as well as integration with Leaflet via folium and PyCall
  • building animations of a city using OpenStreetMapXPlot.jl combined with the Plots.@animate macro
  • using Julia to augment OSM map data with external sources in order to build routing mechanism that can include public transportation (metro, streetcarts)
  • combine this all into an agent simulation that can be used to model how the frequency and availability of a public urban transportation system contributes to the development of pandemic

The research is financed by a NSERC, Canada, “Alliance COVID-19” grant titled: "COVID-19: Agent-based framework for modelling pandemics in urban environment”.

Platinum sponsors

Julia Computing

Gold sponsors

Relational AI

Silver sponsors

Invenia LabsConningPumas AIQuEra Computing Inc.King Abdullah University of Science and TechnologyDataChef.coJeffrey Sarnoff

Media partners

Packt Publication

Fiscal Sponsor