282 Pages 35 B/W Illustrations
    by Chapman & Hall

    282 Pages
    by Chapman & Hall

    282 Pages 35 B/W Illustrations
    by Chapman & Hall

    Generate and Analyze Multi-Level Data
    Spatial microsimulation involves the generation, analysis, and modeling of individual-level data allocated to geographical zones. Spatial Microsimulation with R is the first practical book to illustrate this approach in a modern statistical programming language.

    Get Insight into Complex Behaviors
    The book progresses from the principles underlying population synthesis toward more complex issues such as household allocation and using the results of spatial microsimulation for agent-based modeling. This equips you with the skills needed to apply the techniques to real-world situations. The book demonstrates methods for population synthesis by combining individual and geographically aggregated datasets using the recent R packages ipfp and mipfp. This approach represents the "best of both worlds" in terms of spatial resolution and person-level detail, overcoming issues of data confidentiality and reproducibility.

    Implement the Methods on Your Own Data
    Full of reproducible examples using code and data, the book is suitable for students and applied researchers in health, economics, transport, geography, and other fields that require individual-level data allocated to small geographic zones. By explaining how to use tools for modeling phenomena that vary over space, the book enhances your knowledge of complex systems and empowers you to provide evidence-based policy guidance.

    Introducing spatial microsimulation with R
    Who this book is for and how to use it
    A definition of spatial microsimulation
    Learning by doing
    Why spatial microsimulation with R?
    Learning the R language
    Typographic conventions
    An overview of the book

    SimpleWorld: A worked example of spatial microsimulation
    Getting setup with the RStudio environment
    SimpleWorld data
    Generating a weight matrix
    Spatial microdata
    SimpleWorld in context

    What is spatial microsimulation?
    What spatial microsimulation is not

    Generating spatial microdata
    Data preparation
    Accessing the input data
    Target and constraint variables
    Loading input data
    Subsetting to remove excess information
    Re-categorising individual level variables
    Matching individual and aggregate level data names
    ‘Flattening’ the individual level data

    Population synthesis
    Weighting algorithms
    Iterative Proportional Fitting
    Integerisation and expansion
    Comparing ipfp with mipfp

    Alternative approaches to population synthesis
    Population synthesis as an optimization problem
    The Urban Data Science Toolkit (UDST)

    Spatial microsimulation in the wild
    Selection of constraint variables
    Preparing the input data
    Using the ipfp package
    Using the mipfp package
    Comparing methods of reweighting large datasets

    Model checking and evaluation
    Internal validation
    Empty cells
    External validation

    Population synthesis without microdata
    Global cross-tables and local marginal distributions
    Two level aggregated data

    Household allocation
    Independent data (individuals and households)
    Cross data: individual and household level information

    Modelling spatial microdata
    The TRESIS approach to spatial microsimulation
    Overview of TRESIS modelling system
    Synthetic households
    Using demand models to allocate synthetic households to zones using R

    Spatial microsimulation for agent-based models
    ABM software
    Setting up SimpleWorld in NetLogo
    Allocating attributes to agents
    Running SimpleWorld
    Control the ABM from R

    Appendix: Getting up to speed with R



    A summary appears at the end of each chapter.


    Robin Lovelace is a University Academic Fellow at the University of Leeds specializing in methods of spatial data analysis and applied transport modeling. Creator of the stplanr package and a number of popular tutorials, he is an experienced R user, teacher, and developer. Robin uses open source software daily for spatial analysis, map making, statistics, and modeling. His current research focuses on online interactive mapping and modeling to provide the evidence base needed for a transition away from fossil fuels in the transport sector. Morgane Dumont is an applied mathematician currently undertaking a PhD at the University of Namur. She has a wealth of experience programming in R, Python, C, Fortran, and MATLAB®. Her research focuses on forecasting the health needs of the elderly in 2030 for Belgium. To achieve this aim, Morgane is developing a synthetic population for Belgium as an input to an agent-based model.

    ". . . the book provides an excellent introduction to the theory and practice of spatial microsimulation, as well as a bridge to working in R to actually do the various tasks described . . ."
    —Ezra Haber Glenn, Journal of Statistical Software

    "In this groundbreaking book, the authors present the ideas behind spatial microsimulation, giving clear, user-friendly guidance using the open source software R. Spatial Microsimulation with R provides the reader with firm knowledge of the field as well as the tools to apply the methods to his or her own data. Written in an extremely accessible way, this book demonstrates the key steps in spatial microsimulation, from theory into practice. It will be deservedly instrumental in fuelling the growing interest in spatial microsimulation amongst geographers, economists, urban and regional planners, and public- and private-sector decision makers."
    —Richard Harris, Professor of Quantitative Social Geography, University of Bristol

    "This book fills an important gap in the existing literature. What is currently missing is a book mapping out the complete picture from what spatial microsimulation is and why it is useful, how to prepare the data, how to actually build the model, how to validate it, and how to use the resulting dataset. A particular strength of the book is the close connection between theory and implementation. The book includes very useful code snippets while the complete scripts are provided on the corresponding Github repository—this clearly sets standards for open science."
    —Ulrike Deetjen, Oxford University

    "Lovelace and Dumont provide a great service to the microsimulation community in developing a clear and coherent exposition of the use of the R computer language for implementing spatial applications. Required reading for all those involved in agent-based and microsimulation modeling."
    —Michael Batty, Centre for Advanced Spatial Analysis, University College London

    "Spatial Microsimulation with R is a well-written and concise work on a topic of broad appeal. The book is structured in a logical way, which makes it straightforward for the reader to pull out pertinent information. It is a useful reference that provides value for individuals of diverse backgrounds and can be a valuable resource for individuals seeking new applications for spatial microsimulation."
    —Journal of the American Statistical Association

    " . . .this book is an excellent resource for everyone who want to learn how to do spatial microsimulation. The possibility to download the contents of the book, compile it andwork interactively with the code also makes it a great example of dynamic documents and reproducible research."
    —Netherlands Environmental Assessment Agency (PBL)

    "There are multiple books on spatial microsimulation and hundreds more research papers detailing the various applications of studies. However, bar a few exceptions, they lack transparency and reproducibility. It creates a situation whereby researchers simultaneously encourage the uptake of the method, whilst also creating barriers by obscuring methodologies. Lovelace and Dumont’s book sets to address this flaw through demonstrating how to undertake a spatial microsimulation. . . Where the book sets itself apart from other books is in its applied nature. At the centre of their approach is a ‘learn by doing’ mentality which serves the book well. Examples are used to demonstrate approaches and the authors encourage thinking beyond the material presented. Of note, Lovelace and Dumont show step-by-step what is happening when using IPF and how to code this, rather than jumping straight to bespoke R packages that can run it in single lines of code (which are also covered). Content is always clearly set out, with each step explained in detail. The approach helps to guide the reader along in understanding fairly complicated methods. . . Lovelace and Dumont’s book is a fine addition to the library of anyone interested in quantitative methods, let alone those wanting to generate their own spatial microdata."
    —Mark A. Green, Applied Spatial Analysis