Public | Automated Build

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Emission events database

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/ 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.

Emission events type

For now, we are only focusing on the following emission events:

  • air-shutdown
  • air-startup
  • emissions-event
  • emissions-event-emergency-resp
  • excess-opacity
  • maintenance


psql -h -U postgres -p 5433
pg_dump -h -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 .
docker run -e EMISSIONS_DATABASE --rm emissions


Docker Pull Command
Source Repository