Skip to content

EPA_GHGRPFacilities_EPA_GHGRP_ParentCompanies_Ownership_refresh - #2271

Open
balit-raibot wants to merge 10 commits into
datacommonsorg:masterfrom
balit-raibot:EPA_GHGRPFacilities_EPA_GHGRP_ParentCompanies_Ownership_refresh
Open

balit-raibot wants to merge 10 commits into
datacommonsorg:masterfrom
balit-raibot:EPA_GHGRPFacilities_EPA_GHGRP_ParentCompanies_Ownership_refresh

Conversation

@balit-raibot

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the EPA facility processing scripts to use the consolidated PUB_DIM_FACILITY table, introducing row deduplication, coordinate cleaning, and pre-fetching of GeoJSON and county candidates to optimize performance. It also adds robust error handling, caching, and unit tests. Feedback on these changes highlights a bug where caching a single _oris_df across different years will incorrectly reuse the first year's crosswalk data, and suggests caching by year instead. Additionally, using continue instead of break is recommended when skipping existing downloads to ensure other years are still checked, and the private _COUNTY_CANDIDATES_CACHE should not be accessed directly.

Comment thread scripts/us_epa/ghgrp/download.py Outdated
Comment thread scripts/us_epa/ghgrp/download.py Outdated
Comment thread scripts/us_epa/facility/process_facility.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant