Skip to content

Commit

Permalink
Update eia860m and acp 2024 Q3
Browse files Browse the repository at this point in the history
  • Loading branch information
bendnorman committed Nov 22, 2024
1 parent 709e774 commit 9ed81af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
POSTGRES_PORT=8880
JUPYTER_PORT=8890
PUDL_VERSION=v2024.5.0
PUDL_VERSION=v2024.11.0
GOOGLE_APPLICATION_CREDENTIALS=/app/gcloud_application_default_credentials.json
GOOGLE_CLOUD_PROJECT=dbcp-dev-350818
2 changes: 1 addition & 1 deletion src/dbcp/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

FIPS_CODE_VINTAGE = 2020

PUDL_LATEST_YEAR = 2022
PUDL_LATEST_YEAR = 2023

US_STATES = set(
POLITICAL_SUBDIVISIONS.query("subdivision_type == 'state'").subdivision_name
Expand Down
2 changes: 1 addition & 1 deletion src/dbcp/etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def etl_manual_ordinances() -> dict[str, pd.DataFrame]:

def etl_acp_projects() -> dict[str, pd.DataFrame]:
"""ETL ACP projects."""
acp_uri = "gs://dgm-archive/acp/projects_Q2_2024.csv"
acp_uri = "gs://dgm-archive/acp/projects_Q3_2024.csv"
raw_dfs = dbcp.extract.acp_projects.extract(acp_uri)
transformed = dbcp.transform.acp_projects.transform(raw_dfs)
return transformed
Expand Down
2 changes: 2 additions & 0 deletions src/dbcp/metadata/data_mart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""SQL Alchemy metadata for the data mart tables."""

from sqlalchemy import (
Boolean,
CheckConstraint,
Expand Down Expand Up @@ -46,6 +47,7 @@
Column("infra_total_proposed_pm2_5_tonnes_per_year", Float),
Column("battery_storage_existing_capacity_mw", Float),
Column("battery_storage_existing_facility_count", Integer),
Column("battery_storage_existing_co2e_tonnes_per_year", Float),
Column("battery_storage_proposed_capacity_mw", Float),
Column("battery_storage_proposed_facility_count", Integer),
Column("coal_existing_capacity_mw", Float),
Expand Down
2 changes: 2 additions & 0 deletions src/dbcp/metadata/data_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
Column("fluidized_bed_tech", Boolean),
Column("fuel_cost_from_eiaapi", Boolean),
Column("fuel_cost_per_mmbtu", Float),
Column("fuel_cost_per_mmbtu_source", String),
Column("fuel_cost_per_mwh", Float),
Column("fuel_type_code_pudl", String),
Column("fuel_type_count", Integer, nullable=False),
Expand Down Expand Up @@ -577,6 +578,7 @@
Column("energy_storage_capacity_mwh", Float),
Column("fuel_type_code_pudl", String),
Column("generator_retirement_date", DateTime),
Column("generator_operating_date", DateTime),
Column("latitude", Float),
Column("longitude", Float),
Column("net_capacity_mwdc", Float),
Expand Down
2 changes: 1 addition & 1 deletion src/dbcp/validation/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_county_wide_coverage(engine: Engine):
df.shape[0] == n_counties
), "counties_wide_format does not contain all counties"
notnull = df.notnull()
n_expected_counties = 2459
n_expected_counties = 2471
assert notnull.any(axis=1).sum() == n_expected_counties, (
"counties_wide_format has unexpected county coverage."
f" Expected {n_expected_counties}, found {notnull.any(axis=1).sum()}"
Expand Down

0 comments on commit 9ed81af

Please sign in to comment.