Scraper tools for the following databases:
You will need python, some dependencies, a postgres database and an environmental variable pointing to it and that's it:
export EMISSIONS_DATABASE="postgres://malev@localhost:5432/emission_events"
pip install -r requirements.txt
make setup
And to start the party, you will need to populate the database. So far we have 4 different commands to start working:
python emission_events/manage.py COMMAND
Where command can be:
downloadbatch to download a batch of emission events starting with --initial.updateemissions will download 100 emissions from the last one stored in the database. If you run this command daily, you will always have the latest data on your system.updateregulatedentities Regulated Entities don't change too ofter. But from time to time you can check wheather you have a new kid on the block.downloadissuedorders will download the issued orders emited for every regulated entity on your database.For now, we are only focusing on the following emission events:
psql -h 127.0.0.1 -U postgres -p 5433
pg_dump -h 127.0.0.1 -U postgres -p 5433 emissions_project > database.sql
psql emission_events < database.sql
export EMISSIONS_DATABASE=postgres://malev@localhost/emission_events
phd pg_dump > marcosdb-today.sql
docker build -t emissions .
EMISSIONS_DATABASE=postgres://malev@localhost:5433/emission_events\
docker run -e EMISSIONS_DATABASE --rm emissions
Content type
Image
Digest
sha256:dbc2efbb2…
Size
260.6 MB
Last updated
over 9 years ago
docker pull texastribune/emissions-database