Preprocessing
Preprocessing functions for NY grid data.
Created: 2023-12-26, by Bo Yuan (Cornell University) Last modified: 2023-12-26, by Bo Yuan (Cornell University)
- nygrid.preprocessing.add_load_weighted(hourly_load_zonal: DataFrame, bus_info: DataFrame) DataFrame[source]
Distribute zonal load to individual buses based on load distribution ratio.
- Parameters:
hourly_load_zonal (pd.DataFrame) – Zonal load timeseries
bus_info (pd.DataFrame) – Bus information
- Returns:
bus_wload – Bus-level load timeseries
- Return type:
pd.DataFrame
- nygrid.preprocessing.agg_demand_county2bus(demand_inc_county: DataFrame, county2bus: DataFrame) DataFrame[source]
County-level consumption to bus-level consumption.
- Parameters:
demand_inc_county (pd.DataFrame) – County-level consumption
county2bus (pd.DataFrame) – County to bus mapping
- Returns:
demand_inc_bus – Bus-level consumption
- Return type:
pd.DataFrame
- nygrid.preprocessing.get_building_load_change_county(county_id: str, upgrade_id: int, bldg_type_list: List[str], bldg_proc_dir: str) Tuple[DataFrame, DataFrame, DataFrame][source]
Read building timeseries data aggregated by county and building type.
- Parameters:
county_id (str) – County ID
upgrade_id (int) – Upgrade ID
bldg_type_list (list) – List of building types
bldg_proc_dir (str) – Directory for processed building data
- Returns:
df_county_base (pd.DataFrame) – Dataframe with baseline energy consumption
df_county_future (pd.DataFrame) – Dataframe with future energy consumption
df_county_saving (pd.DataFrame) – Dataframe with energy savings