+ - 0:00:00
Notes for current slide
Notes for next slide

Open Source Tools


for Geographic and Transport Research

Robin Lovelace

University of Leeds, Institute for Transport Studies

Reproducibilitea Leeds, 2021-02-25 (updated: 2021-02-25) Reproducible source code: github.com/Robinlovelace/presentations

1 / 24
2 / 24

The problem: Proprietary GIS software

3 / 24

Solution: Open Source Software for Geocomputation

4 / 24

Geocomputation with R

Foundations

  • Starting from nothing
  • Class definitions
  • Spatial/attribute operations
  • Projections
  • Data IO

Extensions

  • Advanced methods
  • How to build your own functions

Applications

  • A taster of what you can do

5 / 24

Future directions of travel in FOSS4G

6 / 24

Future directions of travel in FOSS4G

  • Integration (e.g. R package qgisprocess, R/Python crossover)
  • New approaches, e.g. GeoRust
6 / 24

The problem - Transport

Source: 'Inside the black box' report

7 / 24

The problem - Transport

Source: 'Inside the black box' report

  • Transport models were designed to support growth in car ownership and reduce journey times (Boyce and Williams, 2015)
7 / 24

The problem - Transport

Source: 'Inside the black box' report

  • Transport models were designed to support growth in car ownership and reduce journey times (Boyce and Williams, 2015)

  • 21^st^ Century priorities are very different

7 / 24

The problem - Transport

Source: 'Inside the black box' report

  • Transport models were designed to support growth in car ownership and reduce journey times (Boyce and Williams, 2015)

  • 21^st^ Century priorities are very different

    • Climate science, air pollution and health force a shift in focus
    • The concepts of 'participatory democracy' and 'citizen science' mean there is a need for collaborative solutions
7 / 24

The problem - Transport

Source: 'Inside the black box' report

  • Transport models were designed to support growth in car ownership and reduce journey times (Boyce and Williams, 2015)

  • 21^st^ Century priorities are very different

    • Climate science, air pollution and health force a shift in focus
    • The concepts of 'participatory democracy' and 'citizen science' mean there is a need for collaborative solutions
7 / 24

The solution - Transport

New technologies mean that open access transport models are possible

Source: A/B Street, free, open source, gamified transport planning software github.com/dabreegster/abstreet

8 / 24

Open Source Transport Tools

Source: Lovelace (2021), see github.com/Robinlovelace/open-gat

9 / 24

From open source to open access

  • Transport models represent a leverage point in transport systems
  • New paper, Lovelace et al (2020) describes the emergence and possibilities for 'open access models'
10 / 24

What is science?

  • Scientific knowledge is hypotheses that can be falsified
  • Science is the process of generating falsifiable hypotheses and testing them
  • In a reproducible way
  • Systematically

11 / 24

What is science?

  • Scientific knowledge is hypotheses that can be falsified
  • Science is the process of generating falsifiable hypotheses and testing them
  • In a reproducible way
  • Systematically

  • Falsifiability is central to the scientific process (Popper, 1959)
  • All of which requires software conducive to reproducibility

11 / 24

Existing products

Sample of transport modelling software in use by practitioners. Note: citation counts based on searches for company/developer name, the product name and 'transport'. Data source: Google Scholar searches, October 2018.
Software Company/Developer Company HQ Licence Citations
Visum PTV Germany Proprietary 1810
MATSim TU Berlin Germany Open source (GPL) 1470
TransCAD Caliper USA Proprietary 1360
SUMO DLR Germany Open source (EPL) 1310
Emme INRO Canada Proprietary 780
Cube Citilabs USA Proprietary 400
sDNA Cardiff University UK Open source (GPL) 170
12 / 24

User support

Getting help is vital for leaning/improving software

13 / 24

User support

Getting help is vital for leaning/improving software

13 / 24

User support

Getting help is vital for leaning/improving software

"10-Hour Service Pack $2,000" (source: caliper.com/tcprice.htm)

13 / 24

Online communities

14 / 24

Online communities

  • gis.stackexchange.com has 21,314 questions

  • r-sig-geo has 1000s of posts

  • RStudio's Discourse community has 65,000+ posts already!

  • No transport equivalent (e.g. earthscience.stackexchange.com is in beta)

  • Potential for a Discourse forum or similar: transport is not (just) GIS

14 / 24

Building open source software

15 / 24

Building open source software

15 / 24

From prototype to deployment

  • Example: the Propensity to Cycle Tool (PCT.bike) (Lovelace et al. 2017)

16 / 24

Geocomputation in the PCT

  • It's all reproducible, e.g.:
  • Find commuting desire lines in West Yorkshire between 1 and 3 km long in which more people drive than cycle:
# Set-up, after installing R and checking out www.pct.bike:
u = "https://github.com/ITSLeeds/TDS/releases/download/0.1/desire_lines.geojson"
library(dplyr)
library(sf)
desire_lines = read_sf(u)
17 / 24

Visualising data

A fundamental part of data science is being able to understand your data.

That requires visualisation, R is great for that:

plot(desire_lines)

  • Interactively:
library(tmap)
tm_shape(desire_lines) + tm_lines("all")
18 / 24

Processing data with code

  • Now we have data in our computer, and verified it works, we can use it

  • Which places are most car dependent?

car_dependent_routes = desire_lines %>%
mutate(percent_drive = car_driver / all * 100) %>%
filter(rf_dist_km < 3 & rf_dist_km > 1)
19 / 24

Checking the results:

b = c(0, 25, 50, 75)
tm_shape(car_dependent_routes) +
tm_lines(col = "percent_drive", lwd = "all", scale = 5, breaks = b, palette = "-inferno")

20 / 24

Example II

The ActDev project:

21 / 24

Get involved

  • Support open source solutions indirectly

    • Sign-up to platforms for sharing and collaborating on open source projects, such as https://github.com/
    • Preferentially use, cite and endorse open access and open source solutions
    • Find the open source tool best suited to your needs and communicate constructively with the developers
    • Communicate ways to improve open source solutions, e.g. by commenting on 'issue trackers' on forums such as GitHub
  • Download, install and play with open source software

    • R/RStudio, great for data analysis but also interactive visualisation and, increasingly, transport planning workflows
    • Have a play with open access transport tools such as A/B Street and the PCT, which can run on your computer or in the browser
22 / 24

References

Boyce, D.E., Williams, H.C.W.L., 2015. Forecasting Urban Travel: Past, Present and Future. Edward Elgar Publishing.

Beimborn, E., Kennedy, R., 1996. Inside the Blackbox: Making Transportation Models Work for Livable Communities. Citizens for a Better Environment.

Lovelace, R., Parkin, J., Cohen, T., 2020. Open access transport models: A leverage point in sustainable transport planning. Transport Policy 97, 47–54. https://doi.org/10.1016/j.tranpol.2020.06.015

23 / 24

Thanks

Contact me at r. lovelace at leeds ac dot uk (email), @robinlovelace

24 / 24

Thanks

Contact me at r. lovelace at leeds ac dot uk (email), @robinlovelace

Check-out links to my work at robinlovelace.net

24 / 24

Thanks

Contact me at r. lovelace at leeds ac dot uk (email), @robinlovelace

Check-out links to my work at robinlovelace.net

24 / 24

Thanks

Contact me at r. lovelace at leeds ac dot uk (email), @robinlovelace

Check-out links to my work at robinlovelace.net

Thanks to everyone building a open and collaborative communities

Thanks to the University of Leeds and the Institute for Transport Studies

24 / 24
2 / 24
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow