pudl.models.epacems module

Database models for PUDL tables derived from EPA CEMS Data.

class pudl.models.epacems.HourlyEmissions(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Hourly emissions data by month as reported to EPA CEMS.

co2_mass_measurement_code
co2_mass_tons
facility_id
gross_load_mw
heat_content_mmbtu
id
nox_mass_lbs
nox_mass_measurement_code
nox_rate_lbs_mmbtu
nox_rate_measurement_code
operating_datetime_utc
operating_time_hours
plant_id_eia
so2_mass_lbs
so2_mass_measurement_code
state
steam_load_1000_lbs
unit_id_epa
unitid
pudl.models.epacems.finalize(engine)[source]

Finalizes the EPA CEMS table.

This function does a few things after all the data have been written because it’s faster to do these after the fact.

  1. Add individual indexes for operating_datetime_utc, plant_id_eia, and the date part of operating_datetime_utc,

  2. Add a unique index for the combination of operating_datetime_utc, plant_id_eia, and unitid.

Parameters

engine (sqlalchemy engine) –