An important but often overlooked fact of crime analysis is that crime data changes every year. I don’t mean that crime changes every year, though of course it does. The data itself changes. More specifically, the agencies that report data change. Each year, different police agencies report their data to the FBI.
This means that we can’t simply compare UCR data in 2016 to UCR data from 2015. 2016 has different agencies to 2015 so it isn’t an apples-to-apples comparison.
Writing a thesis is stressful. R Markdown can help by reducing the number of things you have to think about. This guide can be used as an introduction to R Markdown, specifically for people working on a research thesis.
If you’d like to follow along with the actual R Markdown file, here is a link to that. The file you want is “2018-03-11-introduction-to-r-markdown.Rmd” and you can download it by right clicking and downloading.
The new year brings the start of recreational marijuana sales in California. According to an article on capradio.com, only part of the state has accesses to recreational marijuana stores. That is due to a mix of municipalities banning stores within their jurisdiction as well as only a limited number of stores given licenses to sell.
I decided to look at where people in California could buy recreational marijuana. The state government’s Bureau of Cannabis Control lists all businesses with licenses to be involved with marijuana.
The majority of old (pre-2010) government data on crime comes in fixed-width ASCII files that have SPSS (file extension .sps) or SAS (file extension .sas) setup files. Important crime data (e.g. UCR and NIBRS) is still being released in this format. I created the R package asciiSetupReader to use R users be able to read this type of data. Here I will explain how these files work in theory, then walk through an example of using the package.
There has been a lot of talk lately about immigration. In particular, about if immigrants cause crime in the cities they go to. Like a lot of controversial topics, this one is based mainly in anecdotes and exaggerations. Here is some data regarding the issue.
In this post I look at the relationship between crime rates and Mexican immigrant population in 102 counties between 1980 and 2010. For a full methodology and the R code used to analyze the data, see below.