This book introduces the programming language R and covers the necessary skills to conduct quantitative research in criminology. By the end, a person without any prior programming experience can take raw crime data, be able to clean it, visualize the data, present it using R Markdown, and change it to a format ready for analysis.
Jacob Kaplan is the Chief Data Scientist of the Research on Policing Reform and Accountability (RoPRA), a multi-disciplinary, multi-institutional team of social scientists studying the feasibility and efficacy of policing reform, with a focus on statistically rigorous research and practical applications. His current appointment is at the Princeton School of Public and International Affairs. He holds a PhD and a master's degree in criminology from the University of Pennsylvania and a bachelor's degree in criminal justice from California State University, Sacramento. He is the author of several R packages that make it easier to work with data, including fastDummies and asciiSetupReader. He is also the author of books on the two primary criminal justice data sets: the FBI's Uniform Crime Reporting (UCR) Program Data, and the FBI's National Incident Based Reporting System (NIBRS) data.
1 A soup to nuts project example 2 Introduction to R and Rstudio 3 Data types and structures 4 Reading and writing Data 5 Mise en place 6 Collaboration 7 R Markdown 8 Testing your code 9 Git 10 Subsetting: Making big things small 11 Exploratory data analysis 12 Regular Expressions 13 Reshaping data 14 Graphing with ggplot2 15 More graphing with ggplot2 16 Hotspot maps 17 Choropleth maps 18 Interactive maps 19 Webscraping with rvest 20 Functions 21 For Loops 22 Scraping tables from PDFs 23 More scraping tables from PDFs 24 Geocoding