reVeal.load.apportion_load_to_regions#
- apportion_load_to_regions(load_df, load_value_col, load_year_col, region_weights)[source]#
Apportion aggregate load projections to regions based on a priori input region weights.
- Parameters:
load_df (pandas.DataFrame) – Load projections dataframe. Should be aggregate totals.
load_value_col (str) – Name of column containing values of load projections.
load_year_col (str) – Name of column containing the years associated with each projected load.
region_weights (dict) – Dictionary indicating weights to use for apportioning load to regions. Keys should correspond to region names and values to the proportion of total load that should be apportioned to that region. All weights must sum to 1.
- Returns:
pandas.DataFrame – Returns a pandas dataframe with the load projections apportioned to regions. Dataframe will have a year column (named based on
load_year_col), a region column (named"region"), and a load projection value column (named based onload_value_col.)- Raises:
ValueError – A ValueError will be raised if the input region_weights do not sum to 1.