Learn Crime Mapping with R
2025 edition
Welcome!
This book will give you the knowledge and skills to effectively communicate information about crime and related topics using maps. We will cover the principles of analysing geographic information and the strengths and weaknesses of different maps for communicating it.
Who is this book for?
This book is for you if you are:
- Someone who wants to learn how to understand patterns of crime using maps and related forms of data analysis.
- Someone who already knows how to map crimes and would like to learn how to code in a familiar context.
Why use this book?
There are several books available for learning crime mapping. The advantages of using this book are that:
- It teaches up-to-date crime mapping techniques. Some of the most-popular books on crime mapping were written over a decade ago and do not reflect substantial developments in the field since then.
- It teaches crime mapping using exclusively free software (R and RStudio). Some other books teach crime mapping in expensive proprietary software that most people who need to make crime maps do not have access to.
- It is an online book, so includes videos to introduce theoretical concepts and walk you through the process of creating different maps.
- It uses examples from across the world, so it is not only useful to readers from one country.
- It’s completely free to read and redistribute!
Why learn crime mapping in R?
We could make crime maps in several different apps. This includes commercial geographic information systems such as ArcGIS or MapInfo, free software such as QGIS, and data analysis programmes such as Tableau. So why learn crime mapping in a programming language like R?
There are several reasons:
- Making maps using a programming language makes your work much more efficient, especially if (as is common in crime analysis) you need to produce similar maps periodically using updated data, or need to produce multiple similar maps for different areas or crime types.
- R is free. This can be important for people working in organisations with very limited budgets for software for data analysis.
- R has extensive mapping capabilities, supported by a large team of friendly experts who provide online support.
- R is good for other types of data analysis, so everything you learn here can be used for analysing crime data using techniques that are unrelated to maps.
Learning a programming language like R involves a little extra work at the start, but this book is written to make this as easy as possibly by gently introducing you to programming ideas a little at a time. Once you’ve got started, you’ll find mapping crime in this way makes it much easier to advance further in the future.
This book is used for teaching crime mapping to BSc Crime and Security Science students at University College London, so the code here has been tested by hundreds of people learning crime mapping before you.