The Propensity to Cycle Tool: An on-line interactive web tool for transport planning

Robin Lovelace, University of Leeds. Slides: robinlovelace.net

19th Nov. 2015, UCL Geospatial Science Seminar Series

Presentation structure

  • Introduction
  • Open source geospatial software
  • Propensity to Cycle Tool
  • Live demo
  • Bonus: research ideas

Introduction

A little about me

Career progression

  • Geography
  • Bicycle mechanic
  • Environmental science
  • Some engineering!
  • Energy studies
  • Geography (with computers!)
  • Transport studies

The wider context

I: Software

Transport planning tools: expensive…

And difficult..

Proprietary software cannot be:

  • modified
  • shared
  • updated

And dangerous!

The solution

  • Go Open Source!

Jobs

  • The global transition away from fossil fuels is big business
  • Many cities are scrambling to make their cities healthier and cleaner
  • Check out some of the jobs that are available, decide which one YOU want

Good transport companies - ready for a transition away from fossil fuels:

Opportunities

New tools of the trade

  • QGIS
  • GRASS
  • R
  • Python

Program or be programmed

R's spatial ecosystem

QGIS

New software: aequilibrae

Why R?

The packages used

Can be installed and loaded in 6 lines of code:

pkgs <- c("devtools", "shiny", "rgdal", "rgeos", "ggmap") # official packages
install.packages(pkgs) 
library(devtools) # enables installation of leaflet
gh_pkgs <- c("rstudio/leaflet", "robinlovelace/stplanr") 
install_github(gh_pkgs) # install packages on github
lapply(c(pkgs, "leaflet", "stplanr"), library, character.only = T) # load all

RStudio

RStudio Desktop is highly recommended for Shiny development.

Shiny

shiny is a framework for creating online interactive data visualisation 'apps'.

  • A framework for making R output interactive
  • An 'app' development framework
  • A (small) growing community of developers centred around RStudio
  • A way to structure online tools: separation of GUI and server via server.R and ui.R files.

Alternatives

  • animate package
  • Google Charts (googleVis::) and
  • plotly
  • D3
  • Tableau

For maps

  • Leaflet (supported by Shiny)
  • Google Maps API

What's shiny good (and not so good) for?

Build's on R's existing strengths

  • Data visualisation (ggplot2)
  • Increasingline widely understood language for querying data
  • Amazing range of add-on packages

Flexibility

Not so good for

  • Scalability
  • Database interaction
  • Low-level control

What do shiny apps look like?

# type this to find out!
runExample()

More examples

Leaflet

An R interface to the Leaflet JavaScript library, compatible with Shiny.

cent <- geocode("Girona")
leaflet() %>% 
  addTiles() %>%
  addCircleMarkers(data = cent)

II: The propensity to cycle tool (PCT)

Policy context

  • House of Commons Criticising the DfT for using closed models
  • 'Impact' and 'engagement' increasingly important for research funding
  • Complex data cannot be adequately summarised in a single static graphic
  • Phase I: proof of concept (February - August 2015)
  • Phase II: nationwide deployment (November 2015 - 2018)

See: cedar.iph.cam.ac.uk/research/modelling/npct-tool

Interactive online tools

Design criteria

  • Interactive basemap
  • Points, lines and polygons
  • Cascading effects of different scenarios > - Tidy!

Early user testing

The underlying theory

Live demo!

Zoom-dependent selection and freeze Scope

Model output tab I: Coventry

Model output tab II: Manchester

Planned feature: network tab

Other planned features

Beta

  • Network analysis (various options)
  • Hilliness allocated to cycle network

Version 1 - nationwide (June 2016)

  • HEAT outputs
  • Incorporation of user feedback
  • Travel to school layer (data pending)

Version 2 - nationwide (June 2017)

  • Micro-level analysis
  • Socio-demographic variables (new scenarios?)

Potential futures: e.g. community contributed

  • Custom scenarios (e.g. 20% cycling by 2020 in Bristol)
  • Custom scenarios (e.g. 10% cycling by 2020 in Manchester!)
  • Scenarios estimating impacts from specific interventions
  • International comparisons of propensity to cycle
  • A global propensity to cycle map?

Fork my code!

  • The work is open source so can used as a foundation for further work by others
  • E.g. councils with the technical know-how
  • E.g. cycle campaigner 'hackers'

Example: Trinity Way, Manchester

IV Live demo!

V Study ideas

1: identify what you're motivated by

How could transport infrastructure change if people worked from home?

How best to reallocate space away from cars?

How transport engineers can encourage car sharing?

Links and references