City of Somerville's Somerstat Dashboard pipeline code.
This code hits several endpoints based on clients built to the API specs, grooms and deidentifies data to city spec, and uploads the groomed data into prepared Socrata endpoints.
This is the companion repo to the stat_dashboard_frontend
Please file found bugs or other issues here in the github repo, it's maintained and monitored. Would you like to contribute a fix? Please do!
git clone https://github.com/cityofsomerville/stat_dashboard_pipeline.git
cd stat_dashboard_pipeline
# Development
pip install -e .
# Production
pip install .
Copy the config/sample_auth.yaml
file and rename it to auth.yaml
. Put the credentials in the file within the empty quotation marks and save.
stat_pipeline
NOTE: Does not store in Socrata To initialize the data for the datasets: Simple one-off queries that dump to CSV files for upload to the Somerville Socrata instance via the UI.
stat_pipeline -i
Run a complete historical migration of QScend activities (takes some time)
stat_pipeline -m
NOTE: These also run as acceptance tests against pull requests in github
python setup.py test
NOTE: These run as acceptance tests against pull requests in github
python setup.py lint
(c)2019 City of Somerville