|
2 | 2 |
|
3 | 3 | Single source of truth: UTILITIES list. All lookup tables are derived. |
4 | 4 | Add one record per utility; no duplication across modules. |
| 5 | +
|
| 6 | +Adding a new state |
| 7 | +----------------- |
| 8 | +
|
| 9 | +1. Add records to UTILITIES (below) for each investor-owned utility in the state. |
| 10 | + Each record needs: |
| 11 | + - std_name: short identifier (lowercase, e.g. "xyz") |
| 12 | + - state: 2-letter state code (e.g. "MA") |
| 13 | + - fuels: ["electric"], ["gas"], or ["electric", "gas"] |
| 14 | + - display_name: human-readable name |
| 15 | +
|
| 16 | +2. Optional fields by data source: |
| 17 | +
|
| 18 | + - ny_open_data_state_names: names from geometry/polygon data used to assign |
| 19 | + utility to buildings. For NY this comes from NY Open Data service-territory |
| 20 | + polygons. For other states, use the names from your state's equivalent |
| 21 | + source (e.g. PUC filings, service territory shapefiles), or [] if none. |
| 22 | + Used by assign_utility_<state> and get_ny_open_data_to_std_name(). |
| 23 | +
|
| 24 | + - eia_utility_ids: EIA-861 utility IDs for that utility in this state. |
| 25 | + Look up in EIA-861 data (e.g. Sales table) or use |
| 26 | + utils/get_utility_stats_from_eia861.py to discover IDs. |
| 27 | + Enables get_eia_utility_id_to_std_name() and the utility_code column. |
| 28 | +
|
| 29 | + - gas_tariff_key / electric_tariff_key: keys used in tariff filenames and |
| 30 | + tariff_map CSVs. Must match keys in rate_design/<state>/hp_rates/data/ |
| 31 | + tariff_structure and tariff_map. |
| 32 | +
|
| 33 | +3. Create or extend assign_utility_<state>.py to map building locations to |
| 34 | + std_name, using ny_open_data_state_names (or your state's equivalent) and |
| 35 | + get_ny_open_data_to_std_name() / a state-specific lookup. |
| 36 | +
|
| 37 | +4. Update utils/types.py: add new std_names to ElectricUtility / GasUtility |
| 38 | + Literals. Keep them in sync with get_electric_std_names() / get_gas_std_names(). |
| 39 | +
|
| 40 | +5. Add Justfile recipes in rate_design/<state>/hp_rates/data/ for |
| 41 | + map-electric-tariff and map-gas-tariff using the new std_names. |
5 | 42 | """ |
6 | 43 |
|
7 | 44 | from __future__ import annotations |
|
0 commit comments