Skip to content

tomoumer/api_project-pizza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Team DS 6 Project - with team Pizza

This project was a collaboration between Hayden Greer, Monica Weiss-Sharp and myself. We each worked on our individual branches and discussed what we were working on, exchanging feedback. Finally, I also incorporated some additional models when our instructor Michael helped us review the project.

Analyzing Aggravated Burglaries in Davidson County

Part 1 - Data Gathering using APIs

  1. A dataset containing details about Metro Nashville Police Department reported incidents is available at https://data.nashville.gov/Police/Metro-Nashville-Police-Department-Incidents/2u6v-ujjs. Make use of the API to find all aggravated burglary incidents () that were reported during the nine month period from January 1, 2022 through September 30, 2021. (Hint: Check out the API Docs to see how to narrow down the response to just the desired results).

  2. Using the 2020 American Community Survey API, obtain, for each census tract, the population (B01001_001E in the detailed tables) and the median income (S1901_C01_012E in the subject tables). Hint: Tennessee's FIPS code is 47 and Davidson County's FIPS code is 37.

Part 2 - Spatial Joining and Data Merging

  1. Download the 2020 census tract shapefiles for Tennessee from https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.2020.html. (The FIPS code for Tennessee is 47). Perform a spatial join to determine the census tract in which each burglary incident occurred.

  2. Aggregate the data by census tract. Warning: each incident can appear multiple times if there are multiple victims, so be sure that you aren't double-counting any incidents. Which census tract had the highest number of burglaries? Which census tract had the highest number of burglaries per 1000 residents? Note: Make sure that you keep all census tracts, not just those that have had a burglary.

  3. Merge in the census data that you gathered in question 2. Remove any rows that have zero population or negative median income values.

Part 3 - Statistical Modeling

  1. Finally, we'll build some statistical models to see how well we can explain the number of aggravated burglaries using the median income of each census tract. Start with some EDA to look at the relationship between median income and number of aggravated burglaries.

  2. Fit a Poisson regression model with target variable the rate of burglaries per census tract and with predictor the median income. Offset using the log of the population so that we are looking at the rate of burglaries per population instead of the number of burglaries. How can you interpret the meaning of the output?

  3. Bonus: Try out a negative binomial model. To get started with a negative binomial model, you can check out this tutorial. How does this model compare to the Poisson model?

Additional Resources for Generalized Linear Models:

About

api_project-pizza created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •