class: center, middle, inverse, title-slide # Open source software for decaRbonisation ## A case study of tools to support sustainable transport plans ### Robin Lovelace, for UseR Edinburgh (EdinbR) ### 2021-11-17. Source code:
github.com/robinlovelace/presentations
--- ## Bio I'm an Associate Professor of Transport Data Science at the Leeds Institute for Transport Studies (ITS) with research interests ranging from optimal zoning systems for urban analysis to analysis of road safety data. I have experience not only researching but deploying transport models in inform sustainable policies, and have used R heavily in my role as Lead Developer of the Propensity to Cycle Tool (see www.pct.bike), an open source and open access tool used by dozens of transport authorities to support evidence-based design of strategic cycle networks. I'm also a keen R user, developer and teacher, author of [Geocomputation with R](https://geocompr.robinlovelace.net/) and several R packages. -- <img src="https://docs.ropensci.org/stplanr/reference/figures/stplanr.png" width="30%" /><img src="https://raw.githubusercontent.com/ropensci/stats19/master/man/figures/logo.png" width="30%" /><img src="https://github.com/Robinlovelace/geocompr/blob/main/images/geocompr_hex.png?raw=true" width="30%" /> --- # Background, collaborations, interests - BSc in Geography (Bristol) and MSc in Environmental Science (York), PhD in energy costs of commuting [2014](http://etheses.whiterose.ac.uk/5027/) - Limitations of available tools for modelling led to the development of new methodologies and the book Spatial Microsimulation with R ([2016](https://spatial-microsim-book.robinlovelace.net/)) - Co-authored Efficient R Programming ([2016](https://csgillespie.github.io/efficientR/)) - Lead Developer of Propensity to Cycle Tool (PCT) ([2017](https://www.jtlu.org/index.php/jtlu/article/view/862)) - Author of Geocomputation with R ([2019](http://geocompr.robinlovelace.net/transport.html)) - Lots of [papers](https://www.robinlovelace.net/publication/)! --- # Teaching materials and data science training ```r knitr::include_graphics(c( "https://images.tandf.co.uk/common/jackets/amazon/978149871/9781498711548.jpg", "https://csgillespie.github.io/efficientR/figures/f0_web.png", "https://geocompr.robinlovelace.net/images/cover.png" )) ``` <img src="https://images.tandf.co.uk/common/jackets/amazon/978149871/9781498711548.jpg" width="33%" /><img src="https://csgillespie.github.io/efficientR/figures/f0_web.png" width="33%" /><img src="https://geocompr.robinlovelace.net/images/cover.png" width="33%" /> -- - Data science training for the Department for Transport, Highways England, RAC Foundation - Hackathons sponsored by the R foundation and the Department for Transport <!-- --- --> <!-- ### The power of visualisation --> <!-- ![](https://user-images.githubusercontent.com/1825120/141866730-084be690-7b19-48cb-9747-81fb89319b8e.png) --> <!-- - Source: Geocomputation with R (Second Edition) --> --- ## Geographic methods for policy making .left-column[ Lead Developer of the DfT's PCT (Lovelace et al. 2017) : transformational impact on planning in the UK (source: REF Impact Case Study) COVID response: RAPID tool (Lovelace et al. 2020) ActDev tool for informing planning process ] .right-column[ <iframe width="560" height="315" src="https://www.youtube.com/embed/nNYroA16JEQ?start=120" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> ] --- --- # Open source software, community building ![](https://user-images.githubusercontent.com/1825120/142075245-3dee4b6e-e4d6-424d-b4aa-a72458e88fd6.png) --- .left-column[ ## Domain experience Close working relationship with DfT over past 6 years Collaborations with Ordnance Survey (LIDA), National Highways (training), links with DLUHC and Open Innovation Team Transport behaviour, infrastructure, safety, energy ] .right-column[ ![](https://raw.githubusercontent.com/cyipt/actdev/main/data-small/scenario-overview.png) ![](https://user-images.githubusercontent.com/1825120/142076842-bc87bf5b-f8b2-4fbc-bcb4-a4da575b171f.png) ] --- .left-column[ # Ideas Hackathons Active travel Road safety policy Post COVID recovery Levelling up metrics Nature recovery networks Citizen science and data literacy ] .right-column[ ![](https://saferactive.github.io/trafficalmr/articles/covid.png) ![](https://a-b-street.github.io/docs/project/history/retrospective/edit_roads.gif) ] --- ### Climate change: The elephant in the room <iframe src="https://giphy.com/embed/4bMoVkgc8QVCQo97kw" width="480" height="208" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p> ??? What is climate change? And how does it related to open source software? It's great to be able to talk about climate change upfront. Usually it's behind the scenes. To solve problems you need to talk about them. Everyone including the elephant knows that climate change means the world is getting warmer. But fewer people talk about 'global drying' and likely impacts such as sudden sea level rise that can only be described as catastrophic As with health, the most solutions tackle the root causes of the problem. So what is the root cause of the problem? We can go back a few steps... Climate change is caused by emissions. Emissions are (primarily) caused by combustion of fossil fuels But what causes that? Energy consumption. What causes energy use? Demand for energy intensive things, transport, manufacturing --- ## Example: Climate change, what data science can bring .left-column[ Emotive and potentially polarising issue Data can provide a shared starting point Nationally scenarios are vital Locally, visions, trust, buy-in and participation are key ] .right-column[ <!-- <iframe src="https://ourworldindata.org/grapher/annual-co-emissions-by-region" loading="lazy" style="width: 100%; height: 600px; border: 0px none;"></iframe> -->
] ??? The Downward trend during coronavirus saw emissions drop by ~10% The scale of the challenge is to reduce emissions by 10% every year, every year, and the challenge gets hard with each year That means: we need transformational --- ![](https://user-images.githubusercontent.com/1825120/141004976-f6dd6243-2bff-42bb-8045-4654df084906.png) --- <!-- <iframe src="https://ourworldindata.org/grapher/annual-co-emissions-by-region" loading="lazy" style="width: 100%; height: 600px; border: 0px none;"></iframe> --> ```r g = ggplot(emissions_regions) + geom_line(aes(Year, Emissions, colour = Entity), show.legend = FALSE) plotly::ggplotly(g) ```
??? The Downward trend during coronavirus saw emissions drop by ~10% The scale of the challenge is to reduce emissions by 10% every year, every year, and the challenge gets hard with each year That means: we need transformational change, we need to be on a war footing --- ### Decarbonisation <iframe src="https://ourworldindata.org/grapher/co2-mitigation-2c" loading="lazy" style="width: 100%; height: 600px; border: 0px none;"></iframe> --- # Root causes: scarcity and fear <iframe src="https://giphy.com/embed/H3I974qpIYExy" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/boybandabc-boy-band-eyebrow-raise-H3I974qpIYExy">via GIPHY</a></p> ??? That may sound counter-intuitive given that we have an over-supply of fossil fuels But it's a sense of scarcity that makes people move from being economic satisficers to maximers And a sense of scarcity is driven by fear - so an important response to climate change is to not respond fearfully but optimistically Consumption is often portrayed as a bottom-up process but in fact it's largely top-down: people who have too much wanting more, dedicating their lives to increasing their share of the pie In a society where people have a sense of abundance, there will be fewer people who feel the need to accumulate and compete --- ## Only demand side solutions can work <blockquote class="twitter-tweet"><p lang="en" dir="ltr">We're barrelling head first into a cataclysmic climate disaster of planetary scale, and our governments and economies are COMPLETELY disregarding the emergency exit that would spare us. We're not going to make it, and it's not because "solutions" don't exist. <br>A ๐งต, I guess. <br>1/</p>— Prof Julia ๐๐น๐ฑ ClimateAction FightFascism ๐ต๐ธ (@JKSteinberger) <a href="https://twitter.com/JKSteinberger/status/1415189267542904833?ref_src=twsrc%5Etfw">July 14, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- # How open source software can help? <iframe src="https://giphy.com/embed/3og0ICG4WxdKSRzE3K" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/annoyed-linux-open-source-3og0ICG4WxdKSRzE3K">via GIPHY</a></p> -- - Open source software creates a sense of abundance -- - Open source software is energy efficient -- - Open source software discourages waste -- Open source software enables transparent + participatory evidence -> buy-in --- .left-column[ ## Case studies ```r pkgs = c( "pct", "abstr" ) # install... install.packages(pkgs) vignette( "getting" ) ``` Check the docs and play with the example datasets. Ask questions and build the community! ] .right-column[ ![](https://user-images.githubusercontent.com/1825120/141021386-3ee6af6d-8ca8-4f4c-9856-c636f4a8fc0e.png) Source: [ATUMEdinburgh](https://rpubs.com/RobinLovelace/757669) project + [a-b-street.org](https://a-b-street.github.io/docs/project/retrospective/index.html#road-editor) ![](https://a-b-street.github.io/docs/project/retrospective/edit_roads.gif) Play with some data for your city (only England for now sorry) https://github.com/Robinlovelace/openTransportDataDemo ] --- class: center, middle # Thanks, links, happy R day travels ๐ถ, ๐ฒ + ๐! - Reproducible slides: [github.com/robinlovelace/presentations](https://github.com/robinlovelace/presentations) - Transport chapter in Geocomputation with R (feedback welcome): [geocompr.robinlovelace.net](http://geocompr.robinlovelace.net/transport.html) Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan).