introduction to spatial microsimulation with r · 11/7/2016  · the course materials i...

27
Introduction to Spatial Microsimulation with R Robin Lovelace 2016-11-07

Upload: others

Post on 17-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Introduction to Spatial Microsimulation with R

Robin Lovelace

2016-11-07

Page 2: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Introduction

I HousekeepingI About the course and its teachersI Lectures and practicalsI Getting help

Page 3: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Housekeeping

I Thanks to the hosts, the JRC

Page 4: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Spatial Microsimulation with R

Aims:

1. To provide a solid understanding of the method andapplications

2. To teach its implementation in R in general terms3. To provide guidance on next steps

Page 5: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Objectives:

I Become proficient with R and RStudio for handling dataI Understand some applications where spatial microsimulation is

usefulI Realise the limitations of the methodI Know about a range of packages for doing spatial

microsimulation with RI Understand code for generating spatial microdata with mipfpI Have ideas for trying the methods on your own datasets

Page 6: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

About the course and its teachers

Page 7: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

The request to teach at the EU

I Links with much of the research taking place at the JRCI Big DataI ModellingI Social impact assessmentI Scenarios of the future

Page 8: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

The course materials

I Based on our book, (Lovelace and Dumont 2016). Digitalversions available on-line

I Slides available on-lineI We’ll be making small ‘code chunks’ and scripts available

during the courseI Any feedback welcome

Page 9: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Robin Lovelace

I Environmental Geographer turned Computational andTransport Geographer

I Now on 5 year University Academic Fellowship (UAF) inTransport and Big Data at Leeds Institute for TransportStudies (ITS)

I Creator of many online teaching materials - seegithub.com/robinlovelace

I Creator of the stplanr packageI Lead developer of the Propensity to Cycle Tool (PCT)

Page 10: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Robin Lovelace

I Environmental Geographer turned Computational andTransport Geographer

I Now on 5 year University Academic Fellowship (UAF) inTransport and Big Data at Leeds Institute for TransportStudies (ITS)

I Creator of many online teaching materials - seegithub.com/robinlovelace

I Creator of the stplanr packageI Lead developer of the Propensity to Cycle Tool (PCT)

Page 11: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Robin Lovelace

I Environmental Geographer turned Computational andTransport Geographer

I Now on 5 year University Academic Fellowship (UAF) inTransport and Big Data at Leeds Institute for TransportStudies (ITS)

I Creator of many online teaching materials - seegithub.com/robinlovelace

I Creator of the stplanr packageI Lead developer of the Propensity to Cycle Tool (PCT)

Page 12: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Robin Lovelace

I Environmental Geographer turned Computational andTransport Geographer

I Now on 5 year University Academic Fellowship (UAF) inTransport and Big Data at Leeds Institute for TransportStudies (ITS)

I Creator of many online teaching materials - seegithub.com/robinlovelace

I Creator of the stplanr package

I Lead developer of the Propensity to Cycle Tool (PCT)

Page 13: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Robin Lovelace

I Environmental Geographer turned Computational andTransport Geographer

I Now on 5 year University Academic Fellowship (UAF) inTransport and Big Data at Leeds Institute for TransportStudies (ITS)

I Creator of many online teaching materials - seegithub.com/robinlovelace

I Creator of the stplanr packageI Lead developer of the Propensity to Cycle Tool (PCT)

Page 14: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Morgane Dumont

I Applied Mathematician with coding, algorithmic and statisticsbackground

I Now on a project of the Wallonia Region developping anevolutionary spatial microsimulation to forecast health needs ofelderly in 2030 for Belgium

I Teach statistics in R to the master’s student in appliedmathematics at university of Namur

Page 15: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Morgane Dumont

I Applied Mathematician with coding, algorithmic and statisticsbackground

I Now on a project of the Wallonia Region developping anevolutionary spatial microsimulation to forecast health needs ofelderly in 2030 for Belgium

I Teach statistics in R to the master’s student in appliedmathematics at university of Namur

Page 16: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about us

Morgane Dumont

I Applied Mathematician with coding, algorithmic and statisticsbackground

I Now on a project of the Wallonia Region developping anevolutionary spatial microsimulation to forecast health needs ofelderly in 2030 for Belgium

I Teach statistics in R to the master’s student in appliedmathematics at university of Namur

Page 17: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about you

I Go-around - who you are, interests in the courseI With your neighbour:

I Experience with R

I Geographical data

I What you hope to get out of the course

Page 18: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

A bit about you

I Go-around - who you are, interests in the courseI With your neighbour:

I Experience with RI Geographical data

I What you hope to get out of the course

Page 19: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

What is spatial microsimulation and itsapplications

Page 20: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

What is spatial microsimulation?

1. A method2. An approach

Page 21: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Applications

I Wide variety of potential applicationsI So far main applications have been in health, poverty mapping

and transportI What do you want to use spatial microsimulation for?I Tomintz, Clarke, and Rigby (2008) The geography of smoking

in Leeds: estimating individual smoking rates and theimplications for the location of stop smoking services.

I Exploration of the energy costs of transport (Lovelace andPhilips 2014)

Page 22: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Agriculture

Hynes et al. (2008) is a classic example

Had 2 datasets:

I Individual level data on farmers participating inagri-environment scheme

I Farm level data with many attributes about the farmsI Geographical data on farms at the Enumeration District (ED)

level

For confidentiallity reasons, the individual-level datasets could notbe linked

Spatial microsimulation used to create a synthetic dataset

Page 23: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Agriculture IIResults show the probability of participation across Ireland:

Figure 1:

Page 24: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Tax policyCommonly used to evaluate distributional impacts of tax policies(Agostini et al. 2014)

Figure 2:

Page 25: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

Transport

A simulation of the car’s traffic for Namur (Barthélemy 2014)

Used tools : spatial microsimulation, agent based modelling, activitychains,. . .

Page 26: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

What’s next:

I The RStudio Graphical User Interface (GUI)I Using RI Project managementI GitHub

Page 27: Introduction to Spatial Microsimulation with R · 11/7/2016  · The course materials I Basedonourbook,(LovelaceandDumont2016). Digital versionsavailableon-line I Slidesavailableon-line

ReferencesAgostini, Paola De, John Hills, Holly Sutherland, Paola De Agostini,John Hills, and Holly Sutherland. 2014. “Were We Really All in ItTogether? The Distributional Effects of the UK CoalitionGovernment’s Tax-Benefit Policy Changes.”http://sticerd.lse.ac.uk/dps/case/spcc/wp10.pdf.Barthélemy, Johan. 2014. “A Parallelized Micro-SimulationPlatform for Population and Mobility Behaviour-Application toBelgium.” PhD thesis, University de Namur.Hynes, S, N Farrelly, E Murphy, and C Odonoghue. 2008.“Modelling Habitat Conservation and Participation inAgri-Environmental Schemes: A Spatial Microsimulation Approach.”Ecological Economics 66 (2-3): 258–69.doi:10.1016/j.ecolecon.2008.02.006.Lovelace, Robin, and Morgane Dumont. 2016. SpatialMicrosimulation with R. CRC Press.http://robinlovelace.net/spatial-microsim-book/.Lovelace, Robin, and Ian Philips. 2014. “The ‘Oil Vulnerability’ ofCommuter Patterns: A Case Study from Yorkshire and the Humber,UK.” Geoforum 51 (0): 169–82.doi:http://dx.doi.org/10.1016/j.geoforum.2013.11.005.Tomintz, Melanie N M.N., Graham P Clarke, and Janette E J.E.Rigby. 2008. “The Geography of Smoking in Leeds: EstimatingIndividual Smoking Rates and the Implications for the Location ofStop Smoking Services.” Area 40 (3): 341–53.http://onlinelibrary.wiley.com/doi/10.1111/j.1475-4762.2008.00837.x/full.