Notes for learning and applying R to questions about crime and the justice system
These notes form the basis of Penn Criminology's Criminal Justice Data Science course that I've taught since 2014. Students code in R to answer questions like "what happens to crime when big movies come out?" and "where are Chicago's crime hotspots?" and "which crimes happen inside LA's gang injunction areas?". On the way to answering these questions students learn about regular expressions, SQL, webscraping, parallel processing, geographic data, official data sources (NIBRS, NCVS, ACS), and basic data coding skills.
Table of contents
- Intro to R
- Dates and times
- Working with NIBRS data (replacing the older notes on Working with UCR data)
- Working with NCVS data
- Regular expressions
- Introduction to SQL, Part 1
- Crime hotspot maps
- Introduction to SQL, Part 2
- Webscraping and Parallel Processing
- PPD shootings extracting from text geocoding
- Working with geographic data