Gridstatus#
Subpackages#
- Ercot Api
- Tests
- base_test_iso
- conftest
- decorators
- test_base
- test_caiso
- test_decorators
- test_eia
- test_ercot
- test_ercot_api
- test_gridstatus
- test_ieso
- test_interconnection_queue
- test_isone
- test_isone_api
- test_lmp_config
- test_logger
- test_miso
- test_nyiso
- test_pjm
- test_save_to
- test_spp
- test_utils
- test_version
- test_viz
- vcr_utils
Submodules#
Package Contents#
Classes Summary#
California Independent System Operator (CAISO) |
|
Electric Reliability Council of Texas (ERCOT) |
|
Independent Electricity System Operator (IESO) |
|
ISO New England (ISONE) |
|
Names of LMP Markets |
|
Midcontinent Independent System Operator (MISO) |
|
New York Independent System Operator (NYISO) |
|
PJM |
|
Southwest Power Pool (SPP) |
Exceptions Summary#
Functions#
Get an ISO by its id |
|
List available ISOs |
|
Load a single DataFrame for same schema csv files in a folder |
Contents#
- class gridstatus.CAISO[source]#
Bases:
gridstatus.base.ISOBase
California Independent System Operator (CAISO)
Attributes
default_timezone
US/Pacific
interconnection_homepage
iso_id
caiso
markets
None
name
California ISO
status_homepage
trading_hub_locations
[‘TH_NP15_GEN-APND’, ‘TH_SP15_GEN-APND’, ‘TH_ZP26_GEN-APND’]
Methods
Return AS prices for a given date for each region
Get ancillary services procurement data from CAISO.
Return curtailed non-operational generator report for a given date.
Return curtailment data for a given date
Get fuel mix in 5 minute intervals for a provided day
Retrieves the (mostly static) list of fuel regions with associated data.
Return gas prices at a previous date
Return ghg allowance at a previous date
Get LMP pricing starting at supplied date for a list of locations.
Return load at a previous date in 5 minute intervals
Returns load forecast for a previous date in 1 hour intervals
Return data from OASIS for a given dataset
Return wind and solar forecast in hourly intervals
Get Current Status of the Grid. Only date="latest" is supported
Return storage charging or discharging for today in 5 minute intervals
Return real time tie flow data.
- get_as_prices(date, end=None, market='DAM', sleep=4, verbose=False)[source]#
Return AS prices for a given date for each region
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
market (str) – DAM or HASP. Defaults to DAM.
verbose (bool, optional) – print out url being fetched. Defaults to False.
- Returns:
A DataFrame of AS prices
- Return type:
pandas.DataFrame
- get_as_procurement(date, end=None, market='DAM', sleep=4, verbose=False)[source]#
Get ancillary services procurement data from CAISO.
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
market – DAM or RTM. Defaults to DAM.
- Returns:
A DataFrame of ancillary services data
- Return type:
pandas.DataFrame
- get_curtailed_non_operational_generator_report(date, end=None, verbose=False)[source]#
- Return curtailed non-operational generator report for a given date.
Earliest available date is June 17, 2021.
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
verbose (bool, optional) – print out url being fetched. Defaults to False.
- Returns:
A DataFrame of curtailed non-operational generator report
column glossary: http://www.caiso.com/market/Pages/OutageManagement/Curtailed -OperationalGeneratorReportGlossary.aspx
if requesting multiple days, may want to run following to remove outages that get reported across multiple days: ```df.drop_duplicates(
subset=[“OUTAGE MRID”, “CURTAILMENT START DATE TIME”], keep=”last”)```
- Return type:
pandas.DataFrame
- get_curtailment(date, verbose=False)[source]#
Return curtailment data for a given date
Notes
requires java to be installed in order to run
Data available from June 30, 2016 to present
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
verbose – print out url being fetched. Defaults to False.
- Returns:
A DataFrame of curtailment data
- Return type:
pandas.DataFrame
- get_fuel_mix(date, start=None, end=None, verbose=False)[source]#
Get fuel mix in 5 minute intervals for a provided day
- Parameters:
date (datetime.date, str) – “latest”, “today”, or an object that can be parsed as a datetime for the day to return data.
start (datetime.date, str) – start of date range to return. alias for date parameter. Only specify one of date or start.
end (datetime.date, str) – “today” or an object that can be parsed as a datetime for the day to return data. Only used if requesting a range of dates.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with columns - ‘Time’ and columns for each fuel type.
- Return type:
pandas.DataFrame
- get_fuel_regions(verbose=False)[source]#
Retrieves the (mostly static) list of fuel regions with associated data. This file can be joined to the gas prices on Fuel Region Id
- get_gas_prices(date, end=None, fuel_region_id='ALL', sleep=4, verbose=False)[source]#
Return gas prices at a previous date
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
fuel_region_id (str, or list) – single fuel region id or list of fuel region ids to return data for. Defaults to ALL, which returns all fuel regions.
- Returns:
A DataFrame of gas prices
- Return type:
pandas.DataFrame
- get_ghg_allowance(date, end=None, sleep=4, verbose=False)[source]#
Return ghg allowance at a previous date
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
- get_lmp(date, market: str, locations: list = None, sleep: int = 5, end=None, verbose=False)[source]#
Get LMP pricing starting at supplied date for a list of locations.
- Parameters:
date (datetime.date, str) – date to return data
market – market to return from. supports:
locations (list) – list of locations to get data from. If no locations are provided, defaults to NP15, SP15, and ZP26, which are the trading hub locations. USE “ALL_AP_NODES” for all Aggregate Pricing Node. Use “ALL” to get all nodes. For a list of locations, call
CAISO.get_pnodes()
sleep (int) – number of seconds to sleep before returning to avoid hitting rate limit in regular usage. Defaults to 5 seconds.
- Returns:
A DataFrame of pricing data
- Return type:
pandas.DataFrame
- get_load(date, end=None, verbose=False)[source]#
Return load at a previous date in 5 minute intervals
- get_load_forecast(date, end=None, sleep=4, verbose=False)[source]#
Returns load forecast for a previous date in 1 hour intervals
- Parameters:
date (datetime.date, pd.Timestamp, str) – day to return. If string, format should be YYYYMMDD e.g 20200623
sleep (int) – number of seconds to sleep before returning to avoid hitting rate limit in regular usage. Defaults to 5 seconds.
- get_oasis_dataset(dataset, date, end=None, params=None, raw_data=True, sleep=5, verbose=False)[source]#
Return data from OASIS for a given dataset
- Parameters:
dataset (str) – dataset to return data for. See CAISO.list_oasis_datasets for supported datasets
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data. If None, returns only date. Defaults to None.
params (dict) – dictionary of parameters to pass to dataset. See CAISO.list_oasis_datasets for supported parameters
raw_data (bool, optional) – return raw data from OASIS. Defaults to True.
sleep (int, optional) – number of seconds to sleep between requests. Defaults to 5.
verbose (bool, optional) – print out url being fetched. Defaults to False.
- Returns:
A DataFrame of OASIS data
- Return type:
pandas.DataFrame
- get_solar_and_wind_forecast_dam(date, end=None, verbose=False)[source]#
Return wind and solar forecast in hourly intervals
Data at: http://oasis.caiso.com/mrioasis/logon.do at System Demand > Wind and Solar Forecast
- get_status(date='latest', verbose=False) str [source]#
Get Current Status of the Grid. Only date=”latest” is supported
Known possible values: Normal, Restricted Maintenance Operations, Flex Alert
- get_storage(date, verbose=False)[source]#
Return storage charging or discharging for today in 5 minute intervals
Negative means charging, positive means discharging
- Parameters:
date (datetime.date, str) – date to return data
- get_tie_flows_real_time(date, end=None, verbose=False)[source]#
Return real time tie flow data.
From OASIS: Energy > Energy Imbalance Market > EIM Transfer by Tie
- Parameters:
date (datetime.date, str) – date to return data
end (datetime.date, str) – last date of range to return data.
- Returns:
pandas.DataFrame
- class gridstatus.Ercot[source]#
Bases:
gridstatus.base.ISOBase
Electric Reliability Council of Texas (ERCOT)
Attributes
ACTUAL_LOADS_FORECAST_ZONES_URL_FORMAT
https://www.ercot.com/content/cdr/html/{timestamp}_actual_loads_of_forecast_zones.html
ACTUAL_LOADS_WEATHER_ZONES_URL_FORMAT
https://www.ercot.com/content/cdr/html/{timestamp}_actual_loads_of_weather_zones.html
BASE
default_timezone
US/Central
interconnection_homepage
http://mis.ercot.com/misapp/GetReports.do?reportTypeId=15933
iso_id
ercot
LOAD_HISTORICAL_MAX_DAYS
14
location_types
None
markets
None
name
Electric Reliability Council of Texas
status_homepage
Methods
Get 60 day DAM Disclosure data. Returns a dict with keys
Get 60 day SCED Disclosure data
Get Ancillary Service Capacity Monitor.
Ancillary Service requirements by type and quantity for each hour of the
Get ancillary service clearing prices in hourly intervals in Day Ahead Market
Get Ancillary Services Reports.
Retrieves the forecasted demand (Load Forecast) and the forecasted available
Retrieves the actual committed capacity (the amount of power available from
Retrieves the forecasted committed capacity (Committed Capacity) and the
Get RTM Price Corrections
Get Historical DAM Settlement Point Prices(SPPs)
Get Day-Ahead Market System Lambda
Get energy storage resources.
Get fuel mix 5 minute intervals
Get the offer price and the name of the Entity submitting
Hourly Resource Outage Capacity report sourced
Get Hourly Solar Report.
Get Hourly Wind Report.
Get interconnection queue for ERCOT
Get LMP data for ERCOT normally produced by SCED every five minutes
Get load for a date
Get hourly load for ERCOT forecast zones
Get hourly load for ERCOT weather zones
Returns load forecast of specified forecast type.
Get Real-Time ORDC and Reliability Deployment Price Adders and
Get Real-Time System Conditions.
Retrieves the 5-minute data behind this dashboard:
Get RTM Price Corrections
Get Historical RTM Settlement Point Prices(SPPs)
Parse SARA data from url.
Get System lambda of each successful SCED
Get Short Term System Adequacy published between date and end.
Get SPP data for ERCOT
Returns status of grid
Get 15-minute system-wide actual load.
Get temperature forecast by weather zone in hourly intervals. Published
Get Unplanned Resource Outages.
- get_60_day_dam_disclosure(date, end=None, process=False, verbose=False)[source]#
Get 60 day DAM Disclosure data. Returns a dict with keys
“dam_gen_resource”
“dam_gen_resource_as_offers”
“dam_load_resource”
“dam_load_resource_as_offers”
“dam_energy_bids”
“dam_energy_bid_awards”
and values as pandas.DataFrame objects
The date passed in should be the report date. Since reports are delayed by 60 days, the passed date should not be fewer than 60 days in the past.
- get_60_day_sced_disclosure(date, end=None, process=False, verbose=False)[source]#
Get 60 day SCED Disclosure data
- Parameters:
date (datetime.date, str) – date to return
end (datetime.date, str, optional) – if declared, function will return data as a range, from “date” to “end”
process (bool, optional) – if True, will process the data into standardized format. if False, will return raw data
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
- dictionary with keys “sced_load_resource”, “sced_gen_resource”, and
”sced_smne”, mapping to pandas.DataFrame objects
- Return type:
dict
- get_as_monitor(date='latest', verbose=False)[source]#
Get Ancillary Service Capacity Monitor.
Parses table from https://www.ercot.com/content/cdr/html/as_capacity_monitor.html
- Parameters:
date (str) – only supports “latest”
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with ancillary service capacity monitor data
- Return type:
pandas.DataFrame
- get_as_plan(date, end=None, verbose=False)[source]#
Ancillary Service requirements by type and quantity for each hour of the current day plus the next 6 days
- Parameters:
date (datetime.date, str) – date of delivery for AS services
end (datetime.date, str, optional) – if declared, function will return data as a range, from “date” to “end”
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with prices for ECRS, NSPIN, REGDN, REGUP, RRS
- Return type:
pandas.DataFrame
- get_as_prices(date, end=None, verbose=False)[source]#
Get ancillary service clearing prices in hourly intervals in Day Ahead Market
- Parameters:
date (datetime.date, str) – date of delivery for AS services
end (datetime.date, str, optional) – if declared, function will return data as a range, from “date” to “end”
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with prices for “Non-Spinning Reserves”, “Regulation Up”, “Regulation Down”, “Responsive Reserves”, “ERCOT Contingency Reserve Service”
- Return type:
pandas.DataFrame
- get_as_reports(date, verbose=False)[source]#
Get Ancillary Services Reports.
Published with a 2 day delay around 3am central
- get_available_seasonal_capacity_forecast(date='latest', verbose=False)[source]#
Retrieves the forecasted demand (Load Forecast) and the forecasted available seasonal capacity (Available Capacity) for the next 6 days.
Data is ephemeral and does not support past days.
- get_capacity_committed(date='latest', verbose=False)[source]#
Retrieves the actual committed capacity (the amount of power available from generating units that were on-line or providing operating reserves).
Data is ephemeral and does not support past days.
- get_capacity_forecast(date='latest', verbose=False)[source]#
Retrieves the forecasted committed capacity (Committed Capacity) and the forecasted available capacity (Available Capacity) for the current day.
Data is ephemeral and does not support past days.
- get_dam_price_corrections(dam_type, verbose=False)[source]#
Get RTM Price Corrections
- Parameters:
rtm_type (str) – ‘DAM_SPP’, ‘DAM_MCPC’, ‘DAM_EBLMP’
- get_dam_spp(year, verbose=False)[source]#
Get Historical DAM Settlement Point Prices(SPPs) for each of the Hubs and Load Zones
- Parameters:
year (int) – year to get data for. Starting 2011, returns data for the entire year
- get_dam_system_lambda(date, end=None, verbose=False)[source]#
Get Day-Ahead Market System Lambda
File is typically published around 12:30 pm for the day ahead
https://www.ercot.com/mp/data-products/data-product-details?id=NP4-523-CD
- Parameters:
date (str, datetime) – date to get data for
end (str, datetime, optional) – end time to get data for. If None, return 1 day of data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with day-ahead market system lambda data
- Return type:
pandas.DataFrame
- get_energy_storage_resources(date='latest', verbose=False)[source]#
Get energy storage resources. Always returns data from previous and current day
- get_fuel_mix(date, verbose=False)[source]#
Get fuel mix 5 minute intervals
- Parameters:
date (datetime.date, str) – “latest”, “today”, and yesterday’s date are supported.
verbose (bool) – print verbose output. Defaults to False.
- Returns:
A DataFrame with columns; Time and columns for each fuel type
- Return type:
pandas.DataFrame
- get_highest_price_as_offer_selected(date, verbose=False)[source]#
Get the offer price and the name of the Entity submitting the offer for the highest-priced Ancillary Service (AS) Offer.
Published with 3 day delay
- Parameters:
date (str, datetime) – date to get data for
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrameq
- Return type:
pandas.DataFrame
- get_hourly_resource_outage_capacity(date, end=None, verbose=False)[source]#
Hourly Resource Outage Capacity report sourced from the Outage Scheduler (OS).
Returns outage data for for next 7 days.
Total Resource MW doesn’t include IRR, New Equipment outages, retirement of old equipment, seasonal mothballed (during the outage season), and mothballed.
As such, it is a proxy for thermal outages.
- Parameters:
date (str) – time to download. Returns last hourly report before this time. Supports “latest”
end (str, optional) – end time to download. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with hourly resource outage capacity data
- Return type:
pandas.DataFrame
- get_hourly_solar_report(date, end=None, verbose=False)[source]#
Get Hourly Solar Report.
Posted every hour and includes System-wide and geographic regional hourly averaged solar power production, STPPF, PVGRPP, and COP HSL for On-Line PVGRs for a rolling historical 48-hour period as well as the system-wide and regional STPPF, PVGRPP, and COP HSL for On-Line PVGRs for the rolling future 168-hour period.
- Parameters:
date (str) – date to get report for. Supports “latest” or a date string
end (str, optional) – end date for date range. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with hourly solar report data
- Return type:
pandas.DataFrame
- get_hourly_wind_report(date, end=None, verbose=False)[source]#
Get Hourly Wind Report.
This report is posted every hour and includes System-wide and Regional actual hourly averaged wind power production, STWPF, WGRPP and COP HSLs for On-Line WGRs for a rolling historical 48-hour period as well as the System-wide and Regional STWPF, WGRPP and COP HSLs for On-Line WGRs for the rolling future 168-hour period. Our forecasts attempt to predict HSL, which is uncurtailed power generation potential.
- Parameters:
date (str) – date to get report for. Supports “latest”
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with hourly wind report data
- Return type:
pandas.DataFrame
- get_interconnection_queue(verbose=False)[source]#
Get interconnection queue for ERCOT
- Monthly historical data available here:
- get_lmp(date, end=None, location_type: str = SETTLEMENT_POINT_LOCATION_TYPE, verbose=False)[source]#
Get LMP data for ERCOT normally produced by SCED every five minutes
Can specify the location type to return “electrical bus” or “settlement point” data. Defaults to “settlement point”
- get_load(date, end=None, verbose=False)[source]#
Get load for a date
- Parameters:
date (datetime.date, str) – “latest”, “today”, or a date string are supported.
- get_load_by_forecast_zone(date, verbose=False)[source]#
Get hourly load for ERCOT forecast zones
- Parameters:
date (datetime.date, str) – “today”, or a date string are supported.
verbose (bool) – print verbose output. Defaults to False.
- Returns:
pandas.DataFrame
- get_load_by_weather_zone(date, verbose=False)[source]#
Get hourly load for ERCOT weather zones
- Parameters:
date (datetime.date, str) – “today”, or a date string are supported.
verbose (bool) – print verbose output. Defaults to False.
- Returns:
pandas.DataFrame
- get_load_forecast(date, end=None, forecast_type=ERCOTSevenDayLoadForecastReport.BY_FORECAST_ZONE, verbose=False)[source]#
Returns load forecast of specified forecast type.
If date range provided, returns all hourly reports published within.
Note: only limited historical data is available
- Parameters:
date (str, datetime) – datetime to download. If end not provided, returns last hourly report published before. if “latest”, returns most recent hourly report. if end provided, returns all hourly reports published after this date and before end.
end (str, datetime,) – if provided, returns all hourly reports published after date and before end
forecast_type (ERCOTSevenDayLoadForecastReport) – The load forecast type. Enum of possible values.
verbose (bool, optional) – print verbose output. Defaults to False.
- get_real_time_adders_and_reserves(date, end=None, verbose=False)[source]#
- Get Real-Time ORDC and Reliability Deployment Price Adders and
Reserves by SCED Interval
At: https://www.ercot.com/mp/data-products/data-product-details?id=NP6-323-CD
- Parameters:
date (str, datetime) – date to get data for
end (str, datetime) – end date to get data for
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with ORDC data
- Return type:
pandas.DataFrame
NOTE: data only goes back 5 days
- get_real_time_system_conditions(date='latest', verbose=False)[source]#
Get Real-Time System Conditions.
Parses table from https://www.ercot.com/content/cdr/html/real_time_system_conditions.html
- Parameters:
date (str) – only supports “latest”
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with real-time system conditions
- Return type:
pandas.DataFrame
- get_reported_outages(date=None, end=None, verbose=False)[source]#
Retrieves the 5-minute data behind this dashboard: https://www.ercot.com/gridmktinfo/dashboards/generationoutages
Data available at https://www.ercot.com/api/1/services/read/dashboards/generation-outages.json
This data is ephemeral in that there is only one file available that is constantly updated. There is no historical data.
- get_rtm_price_corrections(rtm_type, verbose=False)[source]#
Get RTM Price Corrections
- Parameters:
rtm_type (str) – ‘RTM_SPP’, ‘RTM_SPLMP’, ‘RTM_EBLMP’, ‘RTM_ShadowPrice’, ‘RTM_SOGLMP’, ‘RTM_SOGPRICE’
- get_rtm_spp(year, verbose=False)[source]#
- Get Historical RTM Settlement Point Prices(SPPs)
for each of the Hubs and Load Zones
- Parameters:
year (int) – year to get data for Starting 2011, returns data for the entire year
- get_sara(url='https://www.ercot.com/files/docs/2023/05/05/SARA_Summer2023_Revised.xlsx', verbose=False)[source]#
Parse SARA data from url.
Seasonal Assessment of Resource Adequacy for the ERCOT Region (SARA)
- Parameters:
url (str, optional) – url to download SARA data from. Defaults to Summer 2023 SARA data.
- get_sced_system_lambda(date, end=None, verbose=False)[source]#
Get System lambda of each successful SCED
Normally published every 5 minutes
- Parameters:
date (str, datetime, pd.Timestamp) – date or start time to get data for
end (str, datetime, optional) – end time to get data for. If None, return 1 day of data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame
- Return type:
pandas.DataFrame
- get_short_term_system_adequacy(date, end=None, verbose=False)[source]#
Get Short Term System Adequacy published between date and end.
- Parameters:
date (str, datetime) – date to get data for
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with system adequacy data
- Return type:
pandas.DataFrame
- get_spp(date, end=None, market: str = None, locations: list = 'ALL', location_type: str = 'ALL', verbose=False)[source]#
Get SPP data for ERCOT
- Supported Markets:
REAL_TIME_15_MIN
DAY_AHEAD_HOURLY
- Supported Location Types:
Load Zone
Trading Hub
Resource Node
- get_system_wide_actual_load(date, end=None, verbose=False)[source]#
Get 15-minute system-wide actual load.
This report is posted every hour five minutes after the hour.
- Parameters:
date (str, datetime) – date to get data for
end (str, datetime, optional) – end time to get data for. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with system actuals data
- Return type:
pandas.DataFrame
- get_temperature_forecast_by_weather_zone(date, end=None, verbose=False)[source]#
Get temperature forecast by weather zone in hourly intervals. Published once a day at 5 am central.
- Parameters:
date (str, datetime) – date to get data for
end (str, datetime, optional) – end time to get data for. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with temperature forecast data
- Return type:
pandas.DataFrame
- get_unplanned_resource_outages(date, end=None, verbose=False)[source]#
Get Unplanned Resource Outages.
Data published at ~5am central on the 3rd day after the day of interest. Since the date argument is the publish date, if you want to get data for a specific date, pass in the date of interest - 3 days.
- Parameters:
date (str, datetime) – publish date of the report
end (str, datetime, optional) – end date to download. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with unplanned resource outages
- Return type:
pandas.DataFrame
- class gridstatus.IESO[source]#
Bases:
gridstatus.base.ISOBase
Independent Electricity System Operator (IESO)
Attributes
default_timezone
EST
iso_id
ieso
name
Independent Electricity System Operator
status_homepage
Methods
Hourly output and capability for each fuel type (summed over all generators)
Hourly output for each generator for a given date or from date to end.
Get 5-minute load for the Market and Ontario for a given date or from
Get forecasted load for Ontario. Supports only "latest" and "today" because
Get forecasted load by forecast zone (Ontario, East, West) for a given date
- get_fuel_mix(date, end=None, verbose=False)[source]#
Hourly output and capability for each fuel type (summed over all generators) for a given date or from date to end. Variable generators (solar and wind) have a forecast.
- Parameters:
date (datetime.date | datetime.datetime | str) – The date to get the load for Can be a datetime.date or datetime.datetime object, or a string with the values “today” or “latest”. If end is None, returns only data for this date.
end (datetime.date | datetime.datetime, optional) – End date. Defaults None If provided, returns data from date to end date. The end can be a datetime.date or datetime.datetime object.
verbose (bool, optional) – Print verbose output. Defaults to False.
- Returns:
fuel mix
- Return type:
pd.DataFrame
- get_generator_report_hourly(date, end=None, verbose=False)[source]#
Hourly output for each generator for a given date or from date to end. Variable generators (solar and wind) have a forecast and available capacity. Non-variable generators have a capability.
- Parameters:
date (datetime.date | datetime.datetime | str) – The date to get the load for Can be a datetime.date or datetime.datetime object, or a string with the values “today” or “latest”. If end is None, returns only data for this date.
end (datetime.date | datetime.datetime, optional) – End date. Defaults None If provided, returns data from date to end date. The end can be a datetime.date or datetime.datetime object.
verbose (bool, optional) – Print verbose output. Defaults to False.
- Returns:
generator output and capability/available capacity
- Return type:
pd.DataFrame
- get_load(date, end=None, verbose=False)[source]#
Get 5-minute load for the Market and Ontario for a given date or from date to end date.
- Parameters:
date (datetime.date | datetime.datetime | str) – The date to get the load for Can be a datetime.date or datetime.datetime object, or a string with the values “today” or “latest”. If end is None, returns only data for this date.
end (datetime.date | datetime.datetime, optional) – End date. Defaults None If provided, returns data from date to end date. The end can be a datetime.date or datetime.datetime object.
verbose (bool, optional) – Print verbose output. Defaults to False.
frequency (str, optional) – Frequency of data. Defaults to “5min”.
- Returns:
zonal load as a wide table with columns for each zone
- Return type:
pd.DataFrame
- get_load_forecast(date, verbose=False)[source]#
Get forecasted load for Ontario. Supports only “latest” and “today” because there is only one load forecast.
- Parameters:
date (str) – Either “today” or “latest”
verbose (bool, optional) – Print verbose output. Defaults to False.
- Returns:
Ontario load forecast
- Return type:
pd.DataFrame
- get_zonal_load_forecast(date, end=None, verbose=False)[source]#
Get forecasted load by forecast zone (Ontario, East, West) for a given date or from date to end date. This method supports future dates.
Supports data 90 days into the past and up to 34 days into the future.
- Parameters:
date (datetime.date | datetime.datetime | str) – The date to get the load for Can be a datetime.date or datetime.datetime object, or a string with the values “today” or “latest”. If end is None, returns only data for this date.
end (datetime.date | datetime.datetime, optional) – End date. Defaults None If provided, returns data from date to end date. The end can be a datetime.date or datetime.datetime object.
verbose (bool, optional) – Print verbose output. Defaults to False.
- Returns:
forecasted load as a wide table with columns for each zone
- Return type:
pd.DataFrame
- class gridstatus.ISONE[source]#
Bases:
gridstatus.base.ISOBase
ISO New England (ISONE)
Attributes
default_timezone
US/Eastern
hubs
None
interconnection_homepage
interfaces
None
iso_id
isone
lmp_real_time_intervals
[‘00-04’, ‘04-08’, ‘08-12’, ‘12-16’, ‘16-20’, ‘20-24’]
markets
None
name
ISO New England
status_homepage
https://www.iso-ne.com/markets-operations/system-forecast-status/current-system-status
zones
None
Methods
Return BTM solar at a previous date in 5 minute intervals
Return fuel mix at a previous date
Get the interconnection queue. Contains active and withdrawm applications.
Find Node ID mapping:
Return load at a previous date in 5 minute intervals
Return forecast at a previous date
Extract raw ISONE interconnection queue data.
Return solar forecast published on a specific date
Get latest status for ISO NE
Return wind forecast published on a specific date
- get_btm_solar(date, end=None, verbose=False)[source]#
Return BTM solar at a previous date in 5 minute intervals
- get_fuel_mix(date, end=None, verbose=False)[source]#
Return fuel mix at a previous date
Provided at frequent, but irregular intervals by ISONE
- get_interconnection_queue(verbose=False)[source]#
Get the interconnection queue. Contains active and withdrawm applications.
More information: https://www.iso-ne.com/system-planning/interconnection-service/interconnection-request-queue/
- Returns:
interconnection queue
- Return type:
pandas.DataFrame
- get_lmp(date, end=None, market: str = None, locations: list = None, include_id=False, verbose=False)[source]#
- Find Node ID mapping:
https://www.iso-ne.com/markets-operations/settlements/pricing-node-tables/
- get_load(date, end=None, verbose=False)[source]#
Return load at a previous date in 5 minute intervals
- get_raw_interconnection_queue(verbose=False) BinaryIO [source]#
Extract raw ISONE interconnection queue data.
ISONE interconnection queue data is available on a webpage as an HTML table or you can download it as an excel file. Obviously an excel file would be much easier to work with however, the helpful generalized “Status” column (Withdrawn, Active, Commercial) and the “Jurisdiction” column are only available as HTML.
Also, there is helpful detailed status information in the FS, SIS, OS, FAC, IA columns that are represented as <img> tags in the HTML.
This function replaces the <img> tags that convey detailed status information as text and extracts the html as a dataframe. You can see the image to text mapping in the upper left hand corner of the ISONE Queue data page: https://irtt.iso-ne.com/reports/external.
- get_solar_forecast(date, end=None, verbose=False)[source]#
Return solar forecast published on a specific date
Forecast is published for 7 days and generated daily by 10 am. https://www.iso-ne.com/isoexpress/web/reports/operations/-/tree/seven-day-solar-power-forecast
- get_wind_forecast(date, end=None, verbose=False)[source]#
Return wind forecast published on a specific date
Forecast is published for 7 days and generated daily by 10 am. https://www.iso-ne.com/isoexpress/web/reports/operations/-/tree/seven-day-wind-power-forecast
- gridstatus.load_folder(path, time_zone=None, verbose=True)[source]#
Load a single DataFrame for same schema csv files in a folder
- Parameters:
path (str) – path to folder
time_zone (str) – time zone to localize to timestamps. By default returns as UTC
verbose (bool, optional) – print verbose output. Defaults to True.
- Returns:
A DataFrame of all files
- Return type:
pandas.DataFrame
- class gridstatus.Markets[source]#
Bases:
enum.Enum
Names of LMP Markets
Attributes
DAY_AHEAD_HOURLY
DAY_AHEAD_HOURLY
REAL_TIME_15_MIN
REAL_TIME_15_MIN
REAL_TIME_5_MIN
REAL_TIME_5_MIN
REAL_TIME_5_MIN_WEEKLY
REAL_TIME_5_MIN_WEEKLY
REAL_TIME_HOURLY
REAL_TIME_HOURLY
REAL_TIME_HOURLY_FINAL
REAL_TIME_HOURLY_FINAL
REAL_TIME_HOURLY_PRELIM
REAL_TIME_HOURLY_PRELIM
REAL_TIME_SCED
REAL_TIME_SCED
Methods
- class gridstatus.MISO[source]#
Bases:
gridstatus.base.ISOBase
Midcontinent Independent System Operator (MISO)
Attributes
BASE
https://api.misoenergy.org/MISORTWDDataBroker/DataBrokerServices.asmx
default_timezone
EST
hubs
[‘ILLINOIS.HUB’, ‘INDIANA.HUB’, ‘LOUISIANA.HUB’, ‘MICHIGAN.HUB’, ‘MINN.HUB’, ‘MS.HUB’, ‘TEXAS.HUB’, ‘ARKANSAS.HUB’]
interconnection_homepage
https://www.misoenergy.org/planning/generator-interconnection/GI_Queue/
iso_id
miso
markets
None
name
Midcontinent ISO
solar_and_wind_forecast_cols
None
solar_and_wind_forecast_region_cols
[‘North’, ‘Central’, ‘South’, ‘MISO’]
Methods
Get the fuel mix for a given day for a provided MISO.
Get the estimated generation outages published on the date for the past 30
Get the forecasted generation outages published on the date for the next
Get the interconnection queue
Supported Markets:
Retrieves weekly lmp data that includes price corrections to the real time
https://docs.misoenergy.org/marketreports/YYYYMMDD_df_al.xls
- get_fuel_mix(date, verbose=False)[source]#
Get the fuel mix for a given day for a provided MISO.
- Parameters:
date (datetime.date, str) – “latest”, “today”, or an object that can be parsed as a datetime for the day to return data.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
DataFrame with columns “Time”, “Load”, “Fuel Mix”
- Return type:
pandas.DataFrame
- get_generation_outages_estimated(date: str | pandas.Timestamp, end: str | pandas.Timestamp = None, verbose: bool = False)[source]#
Get the estimated generation outages published on the date for the past 30 days. NOTE: since these are estimates, they change with each file published.
- get_generation_outages_forecast(date: str | pandas.Timestamp, end: str | pandas.Timestamp = None, verbose: bool = False)[source]#
Get the forecasted generation outages published on the date for the next seven days.
- get_interconnection_queue(verbose=False)[source]#
Get the interconnection queue
- Returns:
Interconnection queue
- Return type:
pandas.DataFrame
- get_lmp(date, end=None, market: str = Markets.REAL_TIME_5_MIN, locations: list = 'ALL', verbose=False)[source]#
- Supported Markets:
REAL_TIME_5_MIN
- (FiveMinLMP)DAY_AHEAD_HOURLY
- (DayAheadExPostLMP)REAL_TIME_HOURLY_FINAL
- (RealTimeFinalLMP)REAL_TIME_HOURLY_PRELIM
- (RealTimePrelimLMP) Only 4 days of dataavailable, with the most recent being yesterday.
- get_lmp_weekly(date, end=None, verbose=False)[source]#
Retrieves weekly lmp data that includes price corrections to the real time data.
- get_load_forecast(date, end=None, verbose=False)[source]#
https://docs.misoenergy.org/marketreports/YYYYMMDD_df_al.xls
- exception gridstatus.NotSupported[source]#
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- class gridstatus.NYISO[source]#
Bases:
gridstatus.base.ISOBase
New York Independent System Operator (NYISO)
Attributes
default_timezone
US/Eastern
interconnection_homepage
iso_id
nyiso
markets
None
name
New York ISO
status_homepage
Methods
Returns estimated BTM solar generation at a previous date in hourly
Pull the most recent capacity market report's market clearing prices
Get a list of generators in NYISO
Return NYISO interconnection queue
Supported Markets:
Returns load at a previous date in 5 minute intervals for
Get load forecast for a date in 1 hour intervals
Get a list of loads in NYISO
- get_btm_solar(date, end=None, verbose=False)[source]#
- Returns estimated BTM solar generation at a previous date in hourly
intervals for system and each zone.
Available ~8 hours after the end of the operating day.
- Parameters:
date (str, pd.Timestamp, datetime.datetime) – Date to get load for. Can be “latest”, “today”, or a date
end (str, pd.Timestamp, datetime.datetime) – End date for date range. Optional.
verbose (bool) – Whether to print verbose output. Optional.
- Returns:
BTM solar data for NYISO system and each zone
- Return type:
pandas.DataFrame
- get_capacity_prices(date=None, verbose=False)[source]#
Pull the most recent capacity market report’s market clearing prices
- Parameters:
date (pandas.Timestamp) – date that will be used to pull latest capacity report (will refer to month and year)
verbose (bool, optional) – print out requested url. Defaults to False.
- Returns:
a DataFrame of monthly capacity prices (all three auctions) for each of the four capacity localities within NYISO
- get_generators(verbose=False)[source]#
Get a list of generators in NYISO
When possible return capacity and fuel type information
- Parameters:
verbose (bool, optional) – print out requested url. Defaults to False.
- Returns:
a DataFrame of generators and locations
Possible Columns
Generator Name
PTID
Subzone
Zone
Latitude
Longitude
Owner, Operator, and / or Billing Organization
Station Unit
Town
County
State
In-Service Date
Name Plate Rating (V) MW
2022 CRIS MW Summer
2022 CRIS MW Winter
2022 Capability MW Summer
2022 Capability MW Winter
Is Dual Fuel
Unit Type
Fuel Type 1
Fuel Type 2
2021 Net Energy GWh
Notes
Generator Type
- Return type:
pandas.DataFrame
- get_interconnection_queue(verbose=False)[source]#
Return NYISO interconnection queue
Additional Non-NYISO queue info: https://www3.dps.ny.gov/W/PSCWeb.nsf/All/286D2C179E9A5A8385257FBF003F1F7E?OpenDocument
- Returns:
Interconnection queue containing, active, withdrawn, and completed project
- Return type:
pandas.DataFrame
- get_lmp(date, end=None, market: str = None, locations: list = None, location_type: str = None, verbose=False)[source]#
- Supported Markets:
REAL_TIME_5_MIN
(RTC)REAL_TIME_15_MIN
(RTD)DAY_AHEAD_HOURLY
- Supported Location Types:
zone
generator
REAL_TIME_5_MIN is the Real Time Dispatch (RTD) market. REAL_TIME_15_MIN is the Real Time Commitment (RTC) market. For documentation on real time dispatch and real time commitment, see: https://www.nyiso.com/documents/20142/1404816/RTC-RTD%20Convergence%20Study.pdf/f3843982-dd30-4c66-6c21-e101c3cb85af
- get_load(date, end=None, verbose=False)[source]#
- Returns load at a previous date in 5 minute intervals for
each zone and total load
- Parameters:
date (str) – Date to get load for. Can be “latest”, “today”, or a date in the format YYYY-MM-DD
end (str) – End date for date range. Optional.
verbose (bool) – Whether to print verbose output. Optional.
- Returns:
Load data for NYISO and each zone
- Return type:
pandas.DataFrame
- get_load_forecast(date, end=None, verbose=False)[source]#
Get load forecast for a date in 1 hour intervals
- class gridstatus.PJM(api_key=None, retries=DEFAULT_RETRIES)[source]#
Bases:
gridstatus.base.ISOBase
PJM
- Parameters:
api_key (str, optional) – PJM API key. Alternatively, can be set in PJM_API_KEY environment variable. Register for an API key at https://www.pjm.com/
Attributes
default_timezone
US/Eastern
hub_node_ids
[‘51217’, ‘116013751’, ‘35010337’, ‘34497151’, ‘34497127’, ‘34497125’, ‘33092315’, ‘33092313’, ‘33092311’, ‘4669664’, ‘51288’, ‘51287’]
interconnection_homepage
https://www.pjm.com/planning/service-requests/services-request-status
iso_id
pjm
load_forecast_endpoint_name
load_frcstd_7_day
load_forecast_historical_endpoint_name
load_frcstd_hist
locale_abbreviated_to_full
None
location_types
[‘ZONE’, ‘LOAD’, ‘GEN’, ‘AGGREGATE’, ‘INTERFACE’, ‘EXT’, ‘HUB’, ‘EHV’, ‘TIE’, ‘RESIDUAL_METERED_EDC’]
markets
None
name
PJM
price_node_ids
[‘5021703’, ‘5021704’, ‘5021723’, ‘5021724’, ‘93354015’, ‘93354017’, ‘93354019’, ‘34887765’, ‘34887767’, ‘34887769’, ‘34887771’, ‘34887773’, ‘34887775’, ‘34887777’, ‘2156111970’, ‘34887779’, ‘34887781’, ‘34887783’, ‘34887787’, ‘34887789’, ‘34887791’, ‘34887793’, ‘74008711’, ‘34887819’, ‘34887821’, ‘34887823’, ‘2156112027’, ‘34887845’, ‘1439658151’, ‘34887847’, ‘34887849’, ‘74008743’, ‘34887851’, ‘34887853’, ‘1123180720’, ‘34887857’, ‘1123180722’, ‘34887859’, ‘1123180723’, ‘34887861’, ‘1123180721’, ‘34887871’, ‘34887873’, ‘34887887’, ‘34887889’, ‘34887891’, ‘34887893’, ‘34887895’, ‘1207075032’, ‘34887897’, ‘34887899’, ‘34887901’, ‘34887911’, ‘34887913’, ‘34887915’, ‘34887917’, ‘34887923’, ‘1097732340’, ‘34887925’, ‘34887927’, ‘34887929’, ‘34887935’, ‘34887937’, ‘34887939’, ‘34887941’, ‘34887949’, ‘34887951’, ‘34887953’, ‘34887955’, ‘1552845076’, ‘34887957’, ‘1552845077’, ‘34887959’, ‘1552845078’, ‘34887961’, ‘34887963’, ‘34887965’, ‘34887967’, ‘34887969’, ‘34887971’, ‘1305131304’, ‘34887977’, ‘1305131306’, ‘34887993’, ‘34887997’, ‘34887999’, ‘34888001’, ‘119118151’, ‘2156114262’, ‘1379266905’, ‘1379266906’, ‘1097732449’, ‘1292915048’, ‘1132294512’, ‘1132294513’, ‘1132294514’, ‘1132294515’, ‘1552845186’, ‘106856851’, ‘2156112284’, ‘1305131444’, ‘119118263’, ‘119118265’, ‘119118267’, ‘119118269’, ‘119118271’, ‘106856905’, ‘2156110343’, ‘40243747’, ‘71856675’, ‘40243749’, ‘71856677’, ‘40243751’, ‘40243753’, ‘40243755’, ‘40243757’, ‘40243759’, ‘40243761’, ‘40243763’, ‘40243765’, ‘40243767’, ‘40243769’, ‘40243771’, ‘40243773’, ‘40243775’, ‘40243777’, ‘40243779’, ‘1248991825’, ‘1248991826’, ‘1248991827’, ‘40243801’, ‘40243803’, ‘40243805’, ‘40243807’, ‘135389793’, ‘135389819’, ‘40243837’, ‘1666116222’, ‘1666116223’, ‘1666116224’, ‘1666116225’, ‘40243839’, ‘1356163765’, ‘38367965’, ‘38367967’, ‘38367969’, ‘1218915048’, ‘1218915049’, ‘1218915050’, ‘1218915051’, ‘1388614399’, ‘2156110624’, ‘32418611’, ‘32418613’, ‘32418615’, ‘32418617’, ‘1388614460’, ‘1084390238’, ‘1218915186’, ‘1218915187’, ‘1369011076’, ‘1369011077’, ‘1369011078’, ‘1268571042’, ‘98370477’, ‘1084390354’, ‘93140’, ‘93141’, ‘93142’, ‘93143’, ‘93144’, ‘93145’, ‘98370523’, ‘98370525’, ‘98370527’, ‘98370529’, ‘98370531’, ‘98370533’, ‘98370535’, ‘1552843818’, ‘57967665’, ‘1552843913’, ‘1552843915’, ‘1552843916’, ‘1356162213’, ‘1356162214’, ‘50401’, ‘48934161’, ‘48934163’, ‘48934165’, ‘48934167’, ‘48934169’, ‘36181299’, ‘50488’, ‘50489’, ‘50490’, ‘36181325’, ‘2156113262’, ‘50542’, ‘50543’, ‘50557’, ‘50558’, ‘2156113284’, ‘50578’, ‘50579’, ‘50581’, ‘50621’, ‘50622’, ‘87901631’, ‘50628’, ‘50629’, ‘50654’, ‘50655’, ‘50659’, ‘50660’, ‘50661’, ‘50662’, ‘2156111333’, ‘1048047’, ‘1048049’, ‘1048050’, ‘1048051’, ‘1048052’, ‘21601782’, ‘21601783’, ‘21601784’, ‘21601785’, ‘21601786’, ‘50695’, ‘50696’, ‘50697’, ‘50698’, ‘50699’, ‘2041990671’, ‘123901459’, ‘123901461’, ‘123901463’, ‘123901465’, ‘123901467’, ‘50715’, ‘50716’, ‘50717’, ‘50727’, ‘50728’, ‘50729’, ‘50730’, ‘2156113457’, ‘2156113469’, ‘50764’, ‘2156113488’, ‘50769’, ‘50770’, ‘50771’, ‘50777’, ‘50778’, ‘50779’, ‘123901537’, ‘123901539’, ‘123901543’, ‘31020649’, ‘123901545’, ‘31020651’, ‘31020653’, ‘50809’, ‘50810’, ‘50811’, ‘50812’, ‘50813’, ‘50814’, ‘50817’, ‘50818’, ‘1165479564’, ‘2156109456’, ‘50887’, ‘50888’, ‘50893’, ‘50894’, ‘50911’, ‘50915’, ‘32417525’, ‘32417527’, ‘2156111608’, ‘1218914041’, ‘1218914042’, ‘1218914043’, ‘32417545’, ‘32417547’, ‘1183231801’, ‘32417599’, ‘32417601’, ‘32417603’, ‘32417605’, ‘51019’, ‘51020’, ‘51021’, ‘1348263767’, ‘32417625’, ‘32417627’, ‘32417629’, ‘32417631’, ‘32417633’, ‘32417635’, ‘1379268471’, ‘1379268472’, ‘1379268473’, ‘1379268474’, ‘1379268475’, ‘1379268476’, ‘63381383’, ‘63381385’, ‘2156111770’, ‘2156109760’, ‘2156109763’, ‘2156109765’, ‘2156109768’, ‘2156109772’, ‘2156109777’, ‘5021665’, ‘5021666’, ‘5021667’, ‘2156111847’, ‘93353961’, ‘93353963’, ‘93353965’]
service_type_abbreviated_to_full
None
zone_node_ids
[‘1’, ‘3’, ‘51291’, ‘51292’, ‘51293’, ‘51295’, ‘51296’, ‘51297’, ‘51298’, ‘51299’, ‘51300’, ‘51301’, ‘7633629’, ‘8394954’, ‘8445784’, ‘33092371’, ‘34508503’, ‘34964545’, ‘37737283’, ‘116013753’, ‘124076095’, ‘970242670’, ‘1709725933’]
Methods
Retrieves the day-ahead ancillary service market results from :
Retrieves the forecasted generation outages for the next 90 days from:
Get fuel mix for a date or date range in hourly intervals
Retrieves the generation outage data
Get 5 minute LMPs from the Integrated Forward Market (IFM)
Returns LMP at a previous date
Returns load at a previous date at 5 minute intervals
Load forecast made today extending for six days in hourly intervals.
Historical load forecast in hourly intervals. Historical forecasts include all
Retrieves the hourly metered load data from:
Retrieves the reserve market quantities in Megawatts from:
Area projected data for the peak of the day
RTO-wide projected data for the peak of the day
Retrieves the real-time ancillary service market results from :
Retrieves the 5-min solar forecast including behind the meter solar forecast.
Retrieves the hourly solar forecast including behind the meter solar forecast.
Retrieves the 5 min solar generation data from:
Retrieves the current solar generation information from:
Retrieves the transfer interface information from:
Retrieves the current transmission limit information from:
Retrieves the 5-min wind forecast
Retrieves the hourly wind forecast
Retrieves the current wind generation information from:
Retrieves the instantaneous wind generation data from:
- get_dam_as_market_results(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the day-ahead ancillary service market results from : https://dataminer2.pjm.com/feed/da_reserve_market_results/definition Data is published daily.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with day-ahead ancillary service market results.
- Return type:
pandas.DataFrame
- get_forecasted_generation_outages(date, end=None, verbose=False)[source]#
Retrieves the forecasted generation outages for the next 90 days from:
https://dataminer2.pjm.com/feed/frcstd_gen_outages/definition
- get_fuel_mix(date, end=None, verbose=False)[source]#
Get fuel mix for a date or date range in hourly intervals
- get_gen_outages_by_type(date, end=None, verbose=False)[source]#
Retrieves the generation outage data From: https://dataminer2.pjm.com/feed/gen_outages_by_type/definition
- get_it_sced_lmp_5_min(date, end=None, verbose=False)[source]#
Get 5 minute LMPs from the Integrated Forward Market (IFM)
- get_lmp(date, market: str, end=None, locations='hubs', location_type=None, verbose=False)[source]#
Returns LMP at a previous date
Notes
If start date is prior to the PJM archive date, all data
must be downloaded before location filtering can be performed due to limitations of PJM API. The archive date is 186 days (~6 months) before today for the 5 minute real time market and 731 days (~2 years) before today for the Hourly Real Time and Day Ahead Hourly markets. Node type filter can be performed for Real Time Hourly and Day Ahead Hourly markets.
If location_type is provided, it is filtered after data
is retrieved for Real Time 5 Minute market regardless of the date. This is due to PJM api limitations
Return Location Id, Location Name, Location Short Name.
- Parameters:
date (datetime.date, str) – date to get LMPs for
end (datetime.date, str) – end date to get LMPs for
market (str) – Supported Markets: REAL_TIME_5_MIN, REAL_TIME_HOURLY, DAY_AHEAD_HOURLY
locations (list, optional) – list of pnodeid to get LMPs for. Defaults to “hubs”. Use get_pnode_ids() to get a list of possible pnode ids. If “all”, will return data from all p nodes (warning there are over 10,000 unique pnodes, so expect millions or billions of rows!)
location_type (str, optional) – If specified, will only return data for nodes of this type. Defaults to None. Possible location types are: ‘ZONE’, ‘LOAD’, ‘GEN’, ‘AGGREGATE’, ‘INTERFACE’, ‘EXT’, ‘HUB’, ‘EHV’, ‘TIE’, ‘RESIDUAL_METERED_EDC’.
- get_load(date, end=None, verbose=False)[source]#
Returns load at a previous date at 5 minute intervals
- Parameters:
date (datetime.date, str) – date to get load for. must be in last 30 days
- Returns:
Load data time series. Columns: Time, Load, and all areas
Load columns represent PJM-wide load
Returns data for the following areas: AE, AEP, APS, ATSI,
BC, COMED, DAYTON, DEOK, DOM, DPL, DUQ, EKPC, JC, ME, PE, PEP, PJM MID ATLANTIC REGION, PJM RTO, PJM SOUTHERN REGION, PJM WESTERN REGION, PL, PN, PS, RECO
- Return type:
pd.DataFrame
- get_load_forecast(date, end=None, verbose=False)[source]#
Load forecast made today extending for six days in hourly intervals.
Today’s forecast updates every every half hour on the quarter E.g. 1:15 and 1:45
- get_load_forecast_historical(date, end=None, verbose=False)[source]#
Historical load forecast in hourly intervals. Historical forecasts include all vintages of the forecast but has fewer regions than the current forecast.
- get_load_metered_hourly(date, end=None, verbose=False)[source]#
Retrieves the hourly metered load data from:
- get_operational_reserves(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the reserve market quantities in Megawatts from: https://dataminer2.pjm.com/feed/operational_reserves/definition Only available in past 15 days.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
- A DataFrame with reserve market quantities
in 15 second intervals.
- Return type:
pandas.DataFrame
- get_projected_area_statistics_at_peak(date, end=None, verbose=False)[source]#
Area projected data for the peak of the day
https://dataminer2.pjm.com/feed/ops_sum_frcst_peak_area/definition
- get_projected_rto_statistics_at_peak(date, end=None, verbose=False)[source]#
RTO-wide projected data for the peak of the day
https://dataminer2.pjm.com/feed/ops_sum_frcst_peak_rto/definition
- get_real_time_as_market_results(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the real-time ancillary service market results from : https://dataminer2.pjm.com/feed/reserve_market_results/definition Data for the previous day is published daily on business days, typically between 11am and 12pm market time.
Data granularity changed on Sep 1, 2022 so when querying data, start and end dates must both be before or both after that date.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with real-time ancillary service market results.
- Return type:
pandas.DataFrame
- get_solar_forecast_5_min(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame [source]#
Retrieves the 5-min solar forecast including behind the meter solar forecast. From: https://dataminer2.pjm.com/feed/five_min_solar_power_forecast/definition Only available in past 30 days
- Parameters:
date (str | pd.Timestamp) – Start datetime for data
end (str | pd.Timestamp | None, optional) – End datetime for data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with the solar forecast data.
- Return type:
pd.DataFrame
- get_solar_forecast_hourly(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame [source]#
Retrieves the hourly solar forecast including behind the meter solar forecast. From: https://dataminer2.pjm.com/feed/hourly_solar_power_forecast/definition Only available in past 30 days
- Parameters:
date (str | pd.Timestamp) – Start datetime for data
end (str | pd.Timestamp | None, optional) – End datetime for data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with the solar forecast data.
- Return type:
pd.DataFrame
- get_solar_generation_5_min(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the 5 min solar generation data from: https://dataminer2.pjm.com/feed/five_min_solar_generation/definition Only available in past 30 days.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with 5 minute solar generation data.
- Return type:
pandas.DataFrame
- get_solar_generation_by_area(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the current solar generation information from: https://dataminer2.pjm.com/feed/solar_gen/definition Data is published daily around 7am market time.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with solar generation information.
- Return type:
pandas.DataFrame
- get_transfer_interface_information_5_min(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the transfer interface information from: https://dataminer2.pjm.com/feed/transfer_interface_infor/definition Only available in past 30 days.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with transfer interface information in 5 minute intervals.
- Return type:
pandas.DataFrame
- get_transmission_limits(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the current transmission limit information from: https://dataminer2.pjm.com/feed/transfer_interface_infor/definition Only available in past 30 days. Data is published only when constraints exist for that five minute interval.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with transmission limit information in 5 minute intervals, when data is available.
- Return type:
pandas.DataFrame
- get_wind_forecast_5_min(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame [source]#
Retrieves the 5-min wind forecast From: https://dataminer2.pjm.com/feed/five_min_wind_power_forecast/definition Only available in past 30 days
- Parameters:
date (str | pd.Timestamp) – Start datetime for data
end (Optional[str | pd.Timestamp], optional) – End datetime for data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with the wind forecast data.
- Return type:
pd.DataFrame
- get_wind_forecast_hourly(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame [source]#
Retrieves the hourly wind forecast From: https://dataminer2.pjm.com/feed/hourly_wind_power_forecast/definition Only available in past 30 days
- Parameters:
date (str | pd.Timestamp) – Start datetime for data
end (Optional[str | pd.Timestamp], optional) – End datetime for data. Defaults to None.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with the wind forecast data.
- Return type:
pd.DataFrame
- get_wind_generation_by_area(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the current wind generation information from: https://dataminer2.pjm.com/feed/wind_gen/definition Data is published daily around 7am market time.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
A DataFrame with wind generation information.
- Return type:
pandas.DataFrame
- get_wind_generation_instantaneous(date: str | pandas.Timestamp, end: str | pandas.Timestamp | None = None, verbose: bool | None = False)[source]#
Retrieves the instantaneous wind generation data from: https://dataminer2.pjm.com/feed/instantaneous_wind_gen/definition Only available in past 30 days.
- Parameters:
date (str or pandas.Timestamp) – Start datetime for data
end – (str or pandas.Timestamp, optional): End datetime for data. Defaults to one day past date if not specified.
verbose (bool, optional) – print verbose output. Defaults to False.
- Returns:
- A DataFrame with instantaneous wind generation data
in 15 second intervals.
- Return type:
pandas.DataFrame
- class gridstatus.SPP[source]#
Bases:
gridstatus.base.ISOBase
Southwest Power Pool (SPP)
Attributes
default_timezone
US/Central
interconnection_homepage
iso_id
spp
location_types
None
markets
None
name
Southwest Power Pool
status_homepage
https://www.spp.org/markets-operations/current-grid-conditions/
Methods
Get Capacity of Generation on Outage.
Get VER Curtailments for a year. Starting 2014.
Provides Marginal Clearing Price information by Reserve Zone for each
Get fuel mix
Get Hourly Load
Get Hourly Load for a year. Starting 2011.
Get interconnection queue
Get day ahead hourly LMP data
Get LMP data by bus for the Real-Time 5 Minute Market
Get LMP data by location for the Real-Time 5 Minute Market
Get LMP data for real time WEIS
Returns load for last 24hrs in 5 minute intervals
Returns load forecast for next 7 days in hourly intervals
Returns load forecast for +7 days in hourly intervals. Includes actual load
5-minute load forecast data for the SPP footprint (system-wide) for +/- 10
Returns solar and wind generation forecast for +7 days in hourly intervals.
Returns solar and wind generation forecast for +4 hours in 5 minute intervals.
Get VER Curtailments
Get VER Curtailments for a year. Starting 2014.
- get_capacity_of_generation_on_outage(date, end=None, verbose=False)[source]#
Get Capacity of Generation on Outage.
Published daily at 8am CT for next 7 days
- Parameters:
date – start date
end – end date
- get_capacity_of_generation_on_outage_annual(year, verbose=True)[source]#
Get VER Curtailments for a year. Starting 2014. Recent data use get_capacity_of_generation_on_outage
- Parameters:
year – year to get data for
verbose – print url
- Returns:
VER Curtailments
- Return type:
pd.DataFrame
- get_day_ahead_operating_reserve_prices(date, end=None, verbose=False)[source]#
Provides Marginal Clearing Price information by Reserve Zone for each Day-Ahead Market solution for each Operating Day. Posting is updated each day after the DA Market results are posted. Available at https://portal.spp.org/pages/da-mcp#
- Parameters:
date – date to get data for
end – end date
verbose – print url
- Returns:
Day Ahead Marginal Clearing Prices
- Return type:
pd.DataFrame
- get_fuel_mix(date, detailed=False, verbose=False)[source]#
Get fuel mix
- Parameters:
date – supports today and latest
detailed – if True, breaks out self scheduled and market scheduled
Note
if today, returns last 2 hours of data. maybe include previous day
- Returns:
fuel mix
- Return type:
pd.DataFrame
- get_hourly_load(date, end=None, verbose=False)[source]#
Get Hourly Load
Supports recent data. For historical annual data use get_hourly_load_annual
- Parameters:
date – start date
end – end date
- Returns:
Hourly Load
- Return type:
pd.DataFrame
- get_hourly_load_annual(year, verbose=True)[source]#
Get Hourly Load for a year. Starting 2011. For recent data use get_hourly_load
- Parameters:
year – year to get data for
verbose – print url
- Returns:
Hourly Load
- Return type:
pd.DataFrame
- get_interconnection_queue(verbose=False)[source]#
Get interconnection queue
- Returns:
Interconnection queue
- Return type:
pandas.DataFrame
- get_lmp_day_ahead_hourly(date, end=None, location_type: str = LOCATION_TYPE_ALL, verbose=False)[source]#
Get day ahead hourly LMP data
- Supported Location Types:
Hub
Interface
ALL
- get_lmp_real_time_5_min_by_bus(date, end=None, verbose=False)[source]#
Get LMP data by bus for the Real-Time 5 Minute Market
- Parameters:
date – date to get data for
end – end date
verbose – print url
NOTE: does not take a location_type argument because it always returns LOCATION_TYPE_BUS.
- get_lmp_real_time_5_min_by_location(date, end=None, location_type=LOCATION_TYPE_ALL, verbose=False)[source]#
Get LMP data by location for the Real-Time 5 Minute Market
- Parameters:
date – date to get data for
end – end date
location_type – location type to get data for. Options are: -
ALL
(LOCATION_TYPE_ALL) -Hub
(LOCATION_TYPE_HUB) -Interface
(LOCATION_TYPE_INTERFACE) -Settlement Location
(LOCATION_TYPE_SETTLEMENT_LOCATION)verbose – print url
- get_lmp_real_time_weis(date, end=None, verbose=False)[source]#
Get LMP data for real time WEIS
- Parameters:
date – date to get data for. if end is not provided, will get data for 5 minute interval that date is in.
end – end date
verbose – print url
- get_load_forecast(date, forecast_type='MID_TERM', verbose=False)[source]#
Returns load forecast for next 7 days in hourly intervals
- Parameters:
forecast_type (str) – MID_TERM is hourly for next 7 days or SHORT_TERM is every five minutes for a few hours
- Returns:
forecast for current day
- Return type:
pd.DataFrame
- get_load_forecast_mid_term(date, end=None, verbose=False)[source]#
Returns load forecast for +7 days in hourly intervals. Includes actual load for the past 24 hours. Data from https://portal.spp.org/pages/mtlf-vs-actual
- Parameters:
date (pd.Timestamp|str) – date to get data for. Supports “latest” and “today”
verbose (bool) – print info
- Returns:
forecast as dataframe.
- Return type:
pd.DataFrame
- get_load_forecast_short_term(date, end=None, verbose=False)[source]#
5-minute load forecast data for the SPP footprint (system-wide) for +/- 10 minutes. Also includes actual load.
Data from https://portal.spp.org/pages/stlf-vs-actual
- Parameters:
date (pd.Timestamp|str) – date to get data for. Supports “latest” and “today”
verbose (bool) – print info
- Returns:
forecast as dataframe.
- Return type:
pd.DataFrame
- get_solar_and_wind_forecast_mid_term(date, end=None, verbose=False)[source]#
Returns solar and wind generation forecast for +7 days in hourly intervals.
Data from https://portal.spp.org/pages/midterm-resource-forecast.
- Parameters:
date (pd.Timestamp|str) – date to get data for. Supports “latest” and “today”
verbose (bool) – print info
- Returns:
forecast as dataframe.
- Return type:
pd.DataFrame
- get_solar_and_wind_forecast_short_term(date, end=None, verbose=False)[source]#
Returns solar and wind generation forecast for +4 hours in 5 minute intervals. Include actuals for past day in 5 minute intervals.
Data from https://portal.spp.org/pages/shortterm-resource-forecast
- Parameters:
date (pd.Timestamp|str) – date to get data for. Supports “latest” and “today”
verbose (bool) – print info
- Returns:
forecast as dataframe.
- Return type:
pd.DataFrame
- get_ver_curtailments(date, end=None, verbose=False)[source]#
Get VER Curtailments
Supports recent data. For historical annual data use get_ver_curtailments_annual
- Parameters:
date – start date
end – end date