This repository holds all aspects of MTA ridership project.
-
/data
- contains partial datasets that were used for research and analysis in this project. Note: due to the size of files, not all were commited to git, but the sources for all data sources (past and present) can be found in the data folder README. -
/processingScripts
- contains python processing scripts used to pull and restructure the data for the visualization. There are some older jupyter notebook files in there that were used for data exploration, but the final scripts that contributed to the data in the application are all.py
files.The primary scripts used were:
mtaSwipes.py
: scrapes MetroCard swipes data from MTA developer's page and compiles all into a single dataset.acsByNTA.py
: filters pre-downloaded census data for relevant metrics. Spatially joins MTA station locations into their surrounding Neighborhood Tabulation Areas. Savesstations_with_ntas.csv
andacs_nta.geojson
intodata/output
folder.
-
/app
- contains all the font-end application code.
This app was built with TypeScript, leveraging Webpack for code bundling.
In order to run, first navigate into the /app
folder (cd app
). From there you will have the following scripts available:
starts a hot-reloading webpack development server
creates a production level code build, saved to app/dist
folder
deploys dist
folder to project.two-n.com
starts up an aml-gdoc-server to pull structured JSON from the google doc that contains the application's narrative content.
To save an updated version, navigate to http://127.0.0.1:6006/1Dc9L6cVkBEpUPbp2vSby0Mpx40MzCeKqe_4cX5I11oE
and save the resulting .json
to app/public/content/narrativeCopy.json
.
- Ridership data comes from MTA MetroCard Swipe Data.
- American Community Survey (ACS) by Neighborhood Tabulation Area (NTA) data comes from NYC Planning Aggregates.
- MTA station locations come from this MTA dataset.
- Narrative copy is maintained and edited in this google doc.
- ArchiML to turn unstructured google doc data into structured JSON. Leveraged aml-gdoc-server to be able to connect directly to Google Drive.
- Scrollama for scroll triggers.
- GDAL for geographic transformations.