项目作者: kvn219

项目描述 :
Getting data behind domestic violence in NYC.
高级语言: Jupyter Notebook
项目地址: git://github.com/kvn219/dv-in-nyc.git
创建时间: 2018-02-02T02:45:46Z
项目社区:https://github.com/kvn219/dv-in-nyc

开源协议:MIT License

下载


Getting data behind intimate partner violence in NYC











While violent crimes in New York City has dropped precipitously since the early 1990s, domestic violence remains an ongoing and underreported problem, most commonly found in the form of Intimate Partner Violence (IPV). According to the CDC, one out of four women in the U.S. has experienced an incident of domestic violence by an intimate partner. In NYC, it’s estimated that nearly 352,000 residents are victimized by an intimate partner each year.

Incidents of domestic violence or intimate partner violence affect every neighborhood in the city, with varying degree of incidents reported at the local level, as filed under official precinct data.

This project aggregates and visualizes data on domestic violence incidents collected by the NYPD from January through December 2017.

Project





You can see the results here!

This project downloads monthly reports from the NYPD Domestic Violence reports webpage, extracts precinct information from public precinct websites, and merges the two sources to the boundaries of NYC’s police precincts.

Data Sources

Getting started

To get started with the project, you need to have Python 3 and virtualenv set up on your local machine.

  1. # Clone the repo and setup the environment and move into the dv-in-nyc directory
  2. git clone https://github.com/kvn219/dv-in-nyc.git && cd dv-in-nyc
  3. # Create a virtual environment and activate the virtual environment
  4. virtualenv -p python3 venv && source venv/bin/activate
  5. # Install the required packages
  6. pip install requirements.txt
  7. # Run the program!
  8. make run

Docker

If you’re comfortable with docker and make, you can run the following commands:

  1. # Build the dockerfile locally
  2. make docker_build
  3. # Get inside the running docker container
  4. make docker_run

Example use case

Create a choropleth Bokeh!