prereise.gather.hydrodata.eia package

Submodules

prereise.gather.hydrodata.eia.decompose_profile module

prereise.gather.hydrodata.eia.decompose_profile.get_normalized_profile(plant_df, plant_profile)[source]

Normalize plant level profile by Pmax of the corresponding plant

Parameters:
  • plant_df (pandas.DataFrame) – plant dataframe contains generator capacity as ‘Pmax’ for each entry.

  • plant_profile (pandas.DataFrame) – plant level profile with values of generation

Returns:

(pandas.DataFrame) – normalized plant level profile

Raises:
  • TypeError – if plant_df and/or plant_profile is not a pandas.Dataframe

  • ValueError – if plant_df does not contain ‘Pmax’ as a column and/or plants in plant_df don’t match the ones in plant_profile

prereise.gather.hydrodata.eia.decompose_profile.get_profile_by_plant(plant_df, total_profile)[source]

Decompose total hydro profile into plant level profile based on hydro generator capacities in the dataframe.

Parameters:
  • plant_df (pandas.DataFrame) – plant dataframe contains generator capacity as ‘Pmax’ for each entry.

  • total_profile (pandas.Series/list) – aggregated profile to decompose

Returns:

(pandas.DataFrame) – hydro profile for each plant decomposed from the total_profile.

Raises:
  • TypeError – if plant_df is not a pandas.Dataframe and/or total_profile is not a time-series and/or all elements in total_profile are numbers.

  • ValueError – if plant_df does not contain ‘Pmax’ as a column.

prereise.gather.hydrodata.eia.decompose_profile.get_profile_by_state(profile, state, grid=None)[source]

Decompose total hydro profile into plant level profile based on hydro generator capacities in the query state.

Parameters:
  • profile (pandas.Series/list) – profile in query state.

  • state (str) – the query state.

  • grid (powersimdata.input.grid.Grid) – Grid instance. Use the generator capacities in the given grid if provided, otherwise use the base grid.

Returns:

(pandas.DataFrame) – hydro profile for each plant in the query state.

Raises:
  • TypeError – if profile is not a time-series and/or state is not a str.

  • ValueError – if state is invalid.

prereise.gather.hydrodata.eia.helpers module

prereise.gather.hydrodata.eia.helpers.scale_profile(profile, weight)[source]

Scale hourly profile using a list of monthly weights.

Parameters:
  • profile (pandas.DataFrame) – hourly profile.

  • weight (list) – list of monthly weights.

Returns:

(pandas.DataFrame) – scaled hourly profile.

Raises:
  • TypeError – if profile is not a time series or weight is not a list.

  • ValueError – if frequency of time series is not 1h or size of weight is not 12

prereise.gather.hydrodata.eia.interpolate_capacity_factors module

prereise.gather.hydrodata.eia.interpolate_capacity_factors.get_profile(plant_id, start=Timestamp('2016-01-01 00:00:00'), end=Timestamp('2016-12-31 23:00:00'))[source]

Creates hydro profile from monthly capacity factors reported by EIA here.

Parameters:
  • plant_id (list) – id of the hydro plants.

  • start (pandas.Timestamp/numpy.datetime64/datetime.datetime) – start date.

  • end (pandas.Timestamp/numpy.datetime64/datetime.datetime) – end date.

Returns:

(pandas.DataFrame) – data frame with UTC timestamp as indices and plant id as column names. Values are the capacity factor. Note that a unique capacity factor is given for each month and for the entire US. Therefore, each plant will have the same profile.

Raises:
  • TypeError – if plant_id is not a list and/or dates are str.

  • ValueError – if dates are invalid.

prereise.gather.hydrodata.eia.net_demand module

prereise.gather.hydrodata.eia.net_demand.get_net_demand_profile(state, scenario=None, interconnect=None, profile_version='vJan2021')[source]

Get the net demand profile of a specific state based on base profiles or a given scenario.

Parameters:
  • state (str) – state abbreviation.

  • scenario (powersimdata.scenario.scenario.Scenario) – Scenario instance. Get the net demand profile of the given scenario if provided, otherwise use base profiles.

  • interconnect (str) – Interconnection name when scenario is not provided.

  • profile_version (str) – Version of the base profiles used in calculations.

Returns:

(pandas.Series) – net demand profile in the state.

Raises:
  • TypeError – scenario is not a Scenario object and/or state is not a string.

  • ValueError – if state is invalid and/or the scenario is not in analyze state and/or both scenario and interconnect are not provided.

Module contents