- This is the repo for the Backend API and database manager.
- For the frontend client, visit https://github.com/0xStarcat/nyc_building_monitor_client
The NYC Building monitor is a tool that NYC tenants can use to help them make informed housing decisions and fight for housing justice.
- Clone this repo and the frontend repo into separate directories.
- Install node packages
npm install
- This project requires python 3.5.2+. Check your python version with
python3 --version
and upgrade if needed. - Create a virtual env if desired inside the
python_scripts
directory withpython3 -m venv venv
and activate withsource venv/bin/activate
- Pip install the required python packages with
pip install -r requirements.txt
- Download the raw data from dropbox ( link ) and place the
data
directory into the project root. - Create a sqlite3 database file at root named
nyc_data_map.sqlite
- Create the database tables with alembic -
alembic upgrade head
- Seed the database tables with
python3 prepare.py
(may take about an hour) - Seed the rest of the data from the NYC open data portal API with
python3 update.py
(may take a couple hours) - Start the backend server with
npm run-script nodemon
- Start the frontend client with
npm run-script dev
and visitlocalhost:3000
- Server can started for development with
npm run-script nodemon
, for production withnpm start
in a production environment with PM2 installed. - Tests run with
npm test
Boroughs (clipped to shoreline) http://services5.arcgis.com/GfwWNkhOj9bNBqoJ/arcgis/rest/services/nybb/FeatureServer/0/query?where=1=1&outFields=*&outSR=4326&f=geojson
Neighborhoods http://data.beta.nyc/dataset/pediacities-nyc-neighborhoods/resource/35dd04fb-81b3-479b-a074-a27a37888ce7
Census tracts 2010 (clipped to shoreline) https://www1.nyc.gov/site/planning/data-maps/open-data/districts-download-metadata.page NOTE - needs to be converted from .shp to .geojson since the api only delivers 2000 (full number is 2166) https://services5.arcgis.com/GfwWNkhOj9bNBqoJ/arcgis/rest/services/nyct2010/FeatureServer/0/query?where=1=1&outFields=*&outSR=4326&f=geojson
Race https://www1.nyc.gov/site/planning/data-maps/nyc-population/census-2010.page