What
We need to map every bldg_id to an gas tariff structure.
Why
We need a function that accepts utility mapping for ResStock buildings and maps them to their corresponding rate.
How (optional)
Write python script gas_tariff_mapper.py that contains function that does:
Takes inputs:
- Path for
metadata-sb.parquet for a specific release/state/upgrade (which is assumed to have electrical_utility_name and gas_utility_name columns already)
electrical_utility_name that specifies the electrical utility that we are selecting
The function performs:
- Read in
metadata-sb.parquet using scan_parquet() (gives you lazyDataFrame)
- Filter
bldg_id by electrical_utility_name
- based on
gas_utility_name assign different gas tariff key's for each bldg_id
- writes to
<state>/hp_rates/data/tariff_maps/<electrical_utility_name>_gas.csv
In addition, the script will do this before calling the function above:
- Since the metadata-sb.parquet does not have the electrical utility or gas utility mapping yet, add a "dummy electrical utility column" with dummy electrical utility values (e.g. "A", "B", etc.) and
gas_utility_name columns that have values A, B, etc. in the script before passing it to the function above
- Add CLI interface to take in input values above
- Justfile command for running this script via CLI
Deliverables
- function in
rate-design-platform/utils/gas_tariff_mapper.py
What
We need to map every
bldg_idto an gas tariff structure.Why
We need a function that accepts utility mapping for ResStock buildings and maps them to their corresponding rate.
How (optional)
Write python script
gas_tariff_mapper.pythat contains function that does:Takes inputs:
metadata-sb.parquetfor a specific release/state/upgrade (which is assumed to haveelectrical_utility_nameandgas_utility_namecolumns already)electrical_utility_namethat specifies the electrical utility that we are selectingThe function performs:
metadata-sb.parquetusingscan_parquet()(gives you lazyDataFrame)bldg_idbyelectrical_utility_namegas_utility_nameassign different gas tariff key's for eachbldg_id<state>/hp_rates/data/tariff_maps/<electrical_utility_name>_gas.csvIn addition, the script will do this before calling the function above:
gas_utility_namecolumns that have values A, B, etc. in the script before passing it to the function aboveDeliverables
rate-design-platform/utils/gas_tariff_mapper.py