GithubHelp home page GithubHelp logo

fagan2888 / cannabis-cash-crop-or-crime-boom- Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whimsicalnose03/cannabis-cash-crop-or-crime-boom-

0.0 0.0 0.0 7.66 MB

Repo for Cannabis: Cash Crop or Crime Boom?

Python 100.00%

cannabis-cash-crop-or-crime-boom-'s Introduction

Cannabis: Cash Crop or Crime Boom?

Analyzing how crime rates may have been affected by the Legalization of Cannabis

Inspiration and Goals

This project was inspired by an article I read on Forbes:

https://www.forbes.com/sites/mikeadams/2018/03/28/california-officials-say-marijuana-legalization-causing-more-violent-crime/#357310d62c3b

In summary, the article alleges that criminals are crossing state borders to snatch up all the Cannabis they can and transport it back to their home state. In particular the author mentions a rise in "home invasions, violent crimes and robberies" perpetrated by people coming in from other states. The goal of my project is to test these claims of "Weed Pirates" by looking at crime data from Seattle and Portland.

Process

To observe the immediate effects of legalization I began by finding crime data from cities that had fully legalized as test groups and data from cities that had medical programs as controls. After digging through several cities I decided to use Seattle as my test and Portland as a control.

This focus of this project is weed piracy, so I decided to look at crime types I associated with piracy: Homicides, Thefts, Robberies, and Burglaries.

I used a One-Tail Z-Test with the following hypotheses to test the articles claims for each crime category:

Critical Value = 0.05, Bonferonni Corrected to 0.00625

H(null): There is no significant rise in violent crime rates coinciding with legalization of Cannabis

H(alt): There is significant rise in violent crime rates coinciding with legalization of Cannabis

Results

alt textalt text alt text alt text

(note: crime rates for Portland in 2015 are imputed averages from 2010 to 2014)

City Homicide Theft Burglary Robbery
Seattle 0.472 0.536 0.999 0.5
Portland 0.999 0.974 0.00008 0.425

From our graphs and p-values above I do not find enough evidence of increasing rates of violent crimes to accept our alternate hypothesis. Instead, I find more evidence that violent crimes trend downward once legalization occurs.

Challenges

The most challenging part of this project was sifting through crime datasets and finding a city that could serve as a viable control against Seattle. In addition, each city had a slightly different method of data entry, so cleaning followed a similar but different process each set. Furthermore, my data only covers reported crimes - if a crime gets unreported or miscategorized it will affect our analysis.

Moving Forward

While I found some significant results, there are a few other directions I'd like to explore:

  • Identify more control cities to compare against Seattle.
  • Apply the same process to cities that participate in a different part of the product cycle.
  • Dig deeper into the data I have to determine if proximity to dispensaries has an effect on neighborhood crime rates.
  • Apply clustering to crime data to see if perpetrators were high during arrest. (Only viable for certain datasets.)

Technologies and Libraries Used

  • Python
  • Numpy
  • Pandas
  • MatPlotLib
  • GitHub

cannabis-cash-crop-or-crime-boom-'s People

Contributors

whimsicalnose03 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.