New York City’s (NYC’s) neighborhoods are a driving force in the lives of New Yorkers—their identities are closely intertwined and a source of pride. However, the history and evolution of NYC’s neighborhoods don’t follow the rigid, cold lines of statistical and administrative boundaries. Instead, the neighborhoods we live and work in are the result of a more organic confluence of factors.
Data Clinic developed NewerHoods with the goal of helping individuals and organizations better advocate for their communities by enabling them to tailor insights to meet their specific needs. NewerHoods is an interactive web-app that uses open data to generate localized features at the census tract-level and machine learning to create homogeneous clusters. Users are able to select characteristics of interest (currently open data on housing, crime, and 311 complaints), visualize NewerHood clusters on an interactive map, find similar neighborhoods, and compare them against existing administrative boundaries. The tool is designed to enable users without in-depth data expertise to compare and incorporate these redefined neighborhoods into their work and life.
The application is live and available to use here.
The below steps will help you get started and setting up and running NewerHoods locally. Since this is a RShiny application, install RStudio on your machine if you haven't already from here.
newerhoods/clean_data
contains just the cleaned/transformed data sets used directly by the Shiny App.
/src
contains all the code to merge and clean the data sets, extract features from it, and cluster the features.
/newerhoods
contains the code for the RShiny WebApp.
First, the R environment needs to be set up with all the necessary packages.
source("newerhoods/setup.R")
The project uses several APIs from loading data using the APIs developed by NYC Developer Portal and Mapbox for the underlying map visualization in the Shiny App. Getting all of these token are free by signing up here and here. Follow the instructions in the settings.R
file which can be found in the newerhoods
folder and source the local version of the file to get all the tokens stored in the environment. You would have to source this settings file everytime you start a new session.
Note: If you intend to run only the RShiny App, filling in just the MapBox API Token would suffice.
source("newerhoods/settings_local.R")
Run the App
library(shiny)
runApp("newerhoods")
Alternatively, you can run the application in docker. To build the docker container run
docker build -t newerhoods .
Then to run the docker container simply run
docker run -it --rm -p 3000:3000 -v $(pwd):/app newerhoods
any changes you make in the code should trigger an application reload so all you should need to do is refresh your browser to see them.
We invite feedback on the tool and encourage users to contribute. Check out this page for some ways in which you can contribute. To contact Data Clinic about NewerHoods, please email us at [email protected].
- NYC Annualized Property Sales Data (2012-2017)
- MapPLUTO (18v1)
- Geoclient API v1.1
- Property Assessment Roll Archives
- NYPD Complaint Data Historic
- 311 Service Requests from 2010 to Present
- NYC 2010 Census Tracts
- ClustGeo: an R package for hierarchical clustering with spatial constraints
- Making Neighborhoods - Understanding New York City Transitions 2000-2010
This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details