class: center, middle, inverse, title-slide # Open Access Transport Models ## πππ ππ΄π²πΆπ<br/>Enabling reproducibility and participation in Transport Planning ### Robin Lovelace ### University of Leeds, <a href="https://environment.leeds.ac.uk/transport">Institute for Transport Studies</a> ### UBDC, 2021-02-16 (updated: 2021-02-16) Reproducible source code: <a href="https://github.com/Robinlovelace/presentations/">github.com/Robinlovelace/presentations</a> --- ## The problem  Source: ['Inside the black box' report](https://www.co.pierce.wa.us/DocumentCenter/View/755/A-GuideToModeling?bidId=) -- - 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 -- --- ## The solution **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](https://github.com/dabreegster/abstreet/#ab-street) --- ## Open Source Transport Tools Source: Lovelace (2021), see [github.com/Robinlovelace/open-gat](https://github.com/Robinlovelace/open-gat#open-source-tools-for-geographic-analysis-in-transport-planning)  --- ## 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' --- ## What is science? .pull-left[ - Scientific knowledge is hypotheses that can be falsified - Science is the process of *generating falsifiable hypotheses* and *testing them* - In a reproducible way - Systematically  ] -- .pull-right[ - Falsifiability is central to the scientific process (Popper, 1959) - All of which requires software conducive to reproducibility  ] --- ## Transport planning software Transport modelling software products are a vital component of modern transport planning *and* research. - They generate the evidence base on which strategic investments are made and, furthermore, - provide a powerful mechanism for researching alternative futures. -- It would not be an overstatement to say that software determines the range of futures that are visible to policymakers. This makes status of transport modelling software and how it may evolve in the future important questions. What will transport software look like? What will their capabilities be? And who will control? Answers to each of these questions will affect the future of transport systems. -- - Premise: transport planning/modelling software used in practice ~~will become~~ is becoming increasingly data-driven, modular and open. --- background-image: url(https://raw.githubusercontent.com/npct/pct-team/master/figures/sdna-san-fran.png) background-size: cover class: center, middle # Current transport software -- (Source: Crispin Cooper, author of sDNA) --- .pull-left[ <img src="https://www.robinlovelace.net/presentations/fourstage.png" height="500px" /> Still dominates transport planning models (Boyce and Williams 2015) ] -- ### The four stage model (left) - Impacts the current software landscape - Dominated by a few proprietary products - Limited support community online - High degree of lock-in - Limited cross-department collaboration --- # Existing products <table> <caption>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.</caption> <thead> <tr> <th style="text-align:left;"> Software </th> <th style="text-align:left;"> Company/Developer </th> <th style="text-align:left;"> Company HQ </th> <th style="text-align:left;"> Licence </th> <th style="text-align:right;"> Citations </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Visum </td> <td style="text-align:left;"> PTV </td> <td style="text-align:left;"> Germany </td> <td style="text-align:left;"> Proprietary </td> <td style="text-align:right;"> 1810 </td> </tr> <tr> <td style="text-align:left;"> MATSim </td> <td style="text-align:left;"> TU Berlin </td> <td style="text-align:left;"> Germany </td> <td style="text-align:left;"> Open source (GPL) </td> <td style="text-align:right;"> 1470 </td> </tr> <tr> <td style="text-align:left;"> TransCAD </td> <td style="text-align:left;"> Caliper </td> <td style="text-align:left;"> USA </td> <td style="text-align:left;"> Proprietary </td> <td style="text-align:right;"> 1360 </td> </tr> <tr> <td style="text-align:left;"> SUMO </td> <td style="text-align:left;"> DLR </td> <td style="text-align:left;"> Germany </td> <td style="text-align:left;"> Open source (EPL) </td> <td style="text-align:right;"> 1310 </td> </tr> <tr> <td style="text-align:left;"> Emme </td> <td style="text-align:left;"> INRO </td> <td style="text-align:left;"> Canada </td> <td style="text-align:left;"> Proprietary </td> <td style="text-align:right;"> 780 </td> </tr> <tr> <td style="text-align:left;"> Cube </td> <td style="text-align:left;"> Citilabs </td> <td style="text-align:left;"> USA </td> <td style="text-align:left;"> Proprietary </td> <td style="text-align:right;"> 400 </td> </tr> <tr> <td style="text-align:left;"> sDNA </td> <td style="text-align:left;"> Cardiff University </td> <td style="text-align:left;"> UK </td> <td style="text-align:left;"> Open source (GPL) </td> <td style="text-align:right;"> 170 </td> </tr> </tbody> </table> --- # User support Getting help is vital for leaning/improving software --  -- "10-Hour Service Pack $2,000" (source: [caliper.com/tcprice.htm](https://www.caliper.com/tcprice.htm)) --- # Online communities - [gis.stackexchange.com](https://gis.stackexchange.com/questions) has 21,314 questions - [r-sig-geo](http://r-sig-geo.2731867.n2.nabble.com/) 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 --- # Best way to get support is peer-to-peer:  Source: https://community.rstudio.com/about --- # A few prices <!-- --> Source: [google.com/search?q=transcad+price](https://www.google.com/search?q=transcad+price) --- background-image: url(https://media.giphy.com/media/YlQQYUIEAZ76o/giphy.gif) background-size: cover class: center, middle # Future transport software --- # Is already here I - Example: the Propensity to Cycle Tool ([PCT.bike](http://www.pct.bike/)) (Lovelace et al. 2017) <!-- --> --- ## How is data science used 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: ```r # 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) ``` --- ## Visualising data A fundamental part of data science is being able to understand your data. That requires visualisation, R is great for that: .pull-left[ ```r plot(desire_lines) ``` <!-- --> ] .pull-right[ - Interactively: ```r library(tmap) tm_shape(desire_lines) + tm_lines("all") ``` ] --- ## 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? ```r car_dependent_routes = desire_lines %>% mutate(percent_drive = car_driver / all * 100) %>% filter(rf_dist_km < 3 & rf_dist_km > 1) ``` --- ## Checking the results: ```r b = c(0, 25, 50, 75) tm_shape(car_dependent_routes) + tm_lines(col = "percent_drive", lwd = "all", scale = 5, breaks = b, palette = "-inferno") ``` <!-- --> --- # Is already here II The ActDev project:  - A/B Street - R integration, see https://github.com/a-b-street/abstr --- ## Live demo  --- # 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](https://github.com/) - Download, install and play with open source software - R/RStudio, great for data analysis but also interactive visualisation and, increasingly, [transport planning workflows](https://docs.ropensci.org/stplanr/) - Have a play with open access transport tools such as [A/B Street](https://github.com/dabreegster/abstreet/#ab-street) and the [PCT](https://www.pct.bike/), which can run on your computer or in the browser --- # 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 --- # Thanks Contact me at r. lovelace at leeds ac dot uk (email), [`@robinlovelace`](https://twitter.com/robinlovelace) -- Check-out links to my work at [robinlovelace.net](https://www.robinlovelace.net/) -- Thanks to everyone building a open and collaborative communities Thanks to the University of Leeds and the Institute for Transport Studies [](https://environment.leeds.ac.uk/transport) <!-- This talk will outline to key concepts and products that will increasingly support evidence based transport planning and cost effective investment of public funds in the 21st Century, open source tools and open access models. Building on two recently published papers on the concepts, in the journal Transport Policy in 2020 and in the Journal of Geographical Systems in 2021, the talk will explore the concepts, demonstrate some evolving new tools and discuss future avenues of research and development. Open tools/models ranged in size from single-purpose tools such as the QGIS plugin AwaP to sophisticated stand-alone multi-modal traffic simulation software such as MATSim, SUMO and Veins. Building on their ability to re-use the most effective components from other open source projects, developers of open source transport planning tools can avoid `reinventing the wheel' and focus on innovation, the βgamifiedβ A/B Street software, based on OpenStreetMap, a case in point. The talk discusses how to realise the great potential of new approaches to generate the strategic visions of change and evidence that are needed by transport planners in the twenty-first century. --> <!-- Bio: --> <!-- Robin Lovelace is Associate Professor of Transport Data Science at the Leeds Institute for Transport Studies (ITS) specialising in the analysis of regional transport systems and modelling scenarios of change. Robin has experience not only researching but deploying transport models in inform sustainable policies and more effective use of transport investment, notably as Lead Developer of the Propensity to Cycle Tool (see www.pct.bike). Robin is also the Principal Investigator of the Department for Transport funded SaferActive project and author of popular open source software packages (such as stplanr) and books including Geocomputation with R. -->