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

Geocomputation for active transport planning

🚲
a case study of cycle network design
Slides: github.com/Robinlovelace/erum18-transport

Robin Lovelace

2018-05-16

1 / 22

Outline

The problem

Solutions

How R can help

2 / 22

Outline

The problem

Solutions

How R can help

2 / 22

whoami

  • Environmental geographer

  • Learned R for PhD on energy and transport

  • Now work at the University of Leeds (ITS and LIDA)

  • Working on Geocomputation with R

devtools::install_github("r-rust/gifski")
system("youtube-dl https://youtu.be/CzxeJlgePV4 -o v.mp4")
system("ffmpeg -i v.mp4 -t 00:00:03 -c copy out.mp4")
system("ffmpeg -i out.mp4 frame%04d.png ")
f = list.files(pattern = "frame")
gifski::gifski(f, gif_file = "g.gif", width = 200, height = 200)
3 / 22

whoami

  • Environmental geographer

  • Learned R for PhD on energy and transport

  • Now work at the University of Leeds (ITS and LIDA)

  • Working on Geocomputation with R

devtools::install_github("r-rust/gifski")
system("youtube-dl https://youtu.be/CzxeJlgePV4 -o v.mp4")
system("ffmpeg -i v.mp4 -t 00:00:03 -c copy out.mp4")
system("ffmpeg -i out.mp4 frame%04d.png ")
f = list.files(pattern = "frame")
gifski::gifski(f, gif_file = "g.gif", width = 200, height = 200)

Image credit: Jeroen Ooms + others

knitr::include_graphics("https://user-images.githubusercontent.com/1825120/39661313-534efd66-5047-11e8-8d99-a5597fe160ff.gif")

3 / 22

The problem

4 / 22

Cities look a bit like this

5 / 22

Transport: growing source of emissions

knitr::include_graphics("https://raw.githubusercontent.com/Robinlovelace/erum18-transport/master/transport-projections-ipcc.png")

6 / 22

Transport: growing source of emissions

knitr::include_graphics("https://raw.githubusercontent.com/Robinlovelace/erum18-transport/master/transport-projections-ipcc.png")

  • People like to travel!

  • Does not 'saturate' with income

  • Hard to decarbonise via technology

6 / 22

Solutions

7 / 22

Make cycling the natural choice

Source: Brent Toderian

8 / 22

Make cycling the natural choice

Source: Brent Toderian

For everyone: a political problem

8 / 22

Another problem...

9 / 22

Another problem...

Data overload

9 / 22

Technical solutions

10 / 22

Simplify the data deluge

Cycling network in Seville: 'basic' (77 km) and ‘complementary’ (120 km, dashed line) cycleways (from Marqués et al. 2015). Led to fourfold increase in cycling.

11 / 22

Estimate cycling pontential: the Propensity to Cycle Tool - see www.pct.bike

Included in UK policy (CWIS) used by many local authorities (LCWIP) (Lovelace, Goodman, Aldred, Berkoff, Abbas, and Woodcock, 2017)

12 / 22

Build infrastructure

  • Link between infrastructure and uptake between 2001 and 2011 in English regions
  • But how to ensure that infrastructure is effective?

13 / 22

Identify cost-effective schemes: the CyIPT

  • A publicly available password protected web app providing accessible evidence on cycling infrastructure hosted at www.cyipt.bike

14 / 22

How R can help

An open source language for statistical computing (R Core Team, 2018)

15 / 22

Scalability

 
16 / 22

Visualisation

  • Live demo...
# try it!
shiny::runGitHub("robinlovelace/erum18-transport")
  • More on shiny-leaflet integration: Section 9.5 in (Lovelace, Nowosad, and Meunchow, 2018)

  • stplanr (Pebesma, 2018) making use of sf (Lovelace and Ellison, 2018)

17 / 22

Some example shiny code

# non-reproducible snippet
getroads = reactive({
roads[roads$highway == input$type, ]
})
renderLeaflet({
m = tm_shape(getroads()) +
tm_lines(col = "red", lwd = 5) +
tmap_leaflet(m) # you can use tmap in shiny!
})
18 / 22

Local routing

fr = stplanr::geo_code(
"Budapest airport")
to = stplanr::geo_code(
"akvarium budapest")
# install.packages("cyclestreets")
library(cyclestreets)
r = journey(fr, to)
# From Martin's workshop:
library(tmap)
bm = leaflet::providers
bm_cycle = bm$Thunderforest.OpenCycleMap
m = tm_shape(r) +
tm_lines(col = "busynance",
lwd = 5) +
tm_scale_bar()
19 / 22

Extracting data from routes

r$distances[1:5]
## [1] 159 2176 21 105 271
r$time[1:5]
## [1] 52 7393 18 72 60
sum(r$distances) / 1000
## [1] 24.59

For something on remote routing see stplanr or dodgr packages.

20 / 22

Thanks and safe 🚶, 🚲 + 🚀!

Slides created via the R package xaringan.

21 / 22

References

Lovelace, Robin and Richard Ellison (2018). Stplanr: Sustainable Transport Planning. R package version 0.2.4. URL: https://github.com/ropensci/stplanr.

Lovelace, Robin, Anna Goodman, Rachel Aldred, et al. (2017). "The Propensity to Cycle Tool: An Open Source Online System for Sustainable Transport Planning". In: Journal of Transport and Land Use 10.1. ISSN: 1938-7849. DOI: 10.5198/jtlu.2016.862. URL: https://www.jtlu.org/index.php/jtlu/article/view/862 (visited on Jun. 01, 2017).

Lovelace, Robin, Jakub Nowosad and Jannes Meunchow (2018). Geocomputation with R. CRC Press. URL: http://robinlovelace.net/geocompr (visited on Oct. 05, 2017).

Pebesma, Edzer (2018). Sf: Simple Features for R. R package version 0.6-3. URL: https://github.com/r-spatial/sf/.

R Core Team (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria. URL: https://www.R-project.org/.

22 / 22

Outline

The problem

Solutions

How R can help

2 / 22
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