Central utility crosswalk, tariff mapper fixes, and NY customer counts#155
Merged
jpvelez merged 10 commits intoFeb 17, 2026
Merged
Conversation
…y_electric_utility_stats.csv - Move NY data Justfile up to rate_design/ny/hp_rates/data/ - Add fetch-ny-utility-stats recipe (uses utils/get_utility_stats_from_eia861.py) - Add utils/get_utility_stats_from_eia861.py from main - Force-add ny_electric_utility_stats.csv (EIA-861 NY investor-owned utility stats) Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
9 tasks
- Add utils/utility_codes.py with UTILITIES list (one record per utility) - Derive lookup functions: get_ny_open_data_to_std_name, get_eia_utility_id_to_std_name, get_std_name_to_gas_tariff_key, etc. - Update utils/types.py: electric_utility and gas_utility Literals use std_name (coned, nyseg, nimo, keddy, kedli, etc.) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ames - Replace inline utility_name_map with get_ny_open_data_to_std_name() - Update tests to use _utility_name_map_lazy from utility_codes Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- electric_tariff_mapper: use sb.electric_utility when present, support metadata_utility path, accept std_name - gas_tariff_mapper: use get_std_name_to_gas_tariff_key for National Grid split (nimo/keddy/kedli), same metadata handling - Add tests for both mappers Co-authored-by: Cursor <cursoragent@cursor.com>
- Use coned, nimo, nyseg in map-electric-tariff and map-gas-tariff - Add map-electric-rie-default / map-gas-rie-default for RI - Regenerate ny_electric_utility_stats.csv with utility_code column Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
4d8eb48 to
8f8dca4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #119
Overview
Introduces a central utility crosswalk (
utils/utility_codes.py) as the single source of truth for utility identifiers across EIA-861, NY Open Data polygons, assign_utility_ny, tariff mappers, and types. Refactors assign_utility_ny to use it, addsutility_codeto EIA stats output, fixes electric and gas tariff mappers to use real assign_utility data when available, and updates Justfiles to usestd_name(coned, nimo, nyseg). Regeneratesny_electric_utility_stats.csvwith the new column.Reviewer focus
utility_codes.pycover all expected NY utilities and gas tariff keys?electric_utilityis missing—is that acceptable for now?Non-obvious details
nimo(National Grid Upstate).national_gridtariff key; crosswalk centralizes this.