tox
The config.ini
file contains the local docker and test database config. If an external database is to be used, add the environment variable OVERRIDE_DATABASE
and the database config (found in settings.py)
In some cases the scraped data doesn't need to be persistent and can be rebuilt everyday then restored to the production db. In other cases like Ovfiets
the database is long running and persistent it is necessary to write to the production db directly.
The following scripts (mostly) apply to all data sources, with some requiring specific arguments.
export PYTHONPATH=.
python load_wfs_postgres.py https://map.data.amsterdam.nl/maps/gebieden stadsdeel,buurt_simple 4326 --db externaldata
python data_sources/{data_source}/models.py {--drop}
python data_sources/{data_source}/slurp.py {args}
python data_sources/{data_source}/copy_to_model.py {args}
python data_sources/{data_source}/copy_to_model.py {args} --link_areas
Under import/deploy
there are multiple directories for different scripts run by jenkins
import/deploy/import
contains data source importsimport/deploy/summarize
contains script that summarizes the data imported daily for ndw (used by tableau)import/deploy/verkeersmanagement
Specific aggregations for the verkeersmanagement team for ndw (used by tablau)