/perceived-safety

using machine learning to determine the socioeconomic impacts of perceived safety in urban environments

Primary LanguageJupyter Notebook

Perceptions of Urban Perception

A project that uses machine learning to determine the socioeconomic impacts of perceived safety in urban environments.

Our perceptions of the urban landscape--sidewalks, buildings, roads--can differ wildly from the actual experience of neighborhoods. This project investigates the differences between perception and reality in terms of safety/crime in New York City neighborhoods. Which neighborhoods are perceived as more dangerous or safer than they actually are? What are the socioeconomic and physical features that characterize these neighborhoods? Answering these questions can help urban dwellers and policymakers understand the way urban perception is related to livability and guide future planning initiatives.

For more information on the project, see my blog post.

For the neighborhood explorer tool, see this link.

In this repo

  • app/: Contains code and artifacts for the interactive neighborhood explorer tool.
  • reverse-geocode.ipynb: Jupyter notebook containing code to reverse geolocate crime, perceived safety, and other select socioeconomic/physical data. Converts from longitude and latitude pairs into census tracts.
  • safety-analysis-final.ipynb: Jupyter notebook containing code to develop a custom scoring mechanism to categorize neighborhoods as safer than perceived, neutral, or more dangerous than perceived. Also contains code to build models to predict the category of each neighborhood based on its socioeconomic and physical features.
  • neighborhood-finder-app.ipynb: Jupyter notebook containing code to generate data for app.
  • archive/: Contains scratchwork documenting the evolution of the project.

Data Sources