Isone Api#

Module Contents#

Classes Summary#

ISONEAPI

Class to authenticate with and make requests to the ISO New England API.

Attributes Summary#

DEFAULT_PAGE_SIZE

EXCLUDE_FROM_REALTIME_HOURLY_DEMAND

ZONE_LOCATIONID_MAP

Contents#

isone_api.DEFAULT_PAGE_SIZE = 1000[source]#
isone_api.EXCLUDE_FROM_REALTIME_HOURLY_DEMAND = ['NEPOOL AREA', '.H.INTERNALHUB'][source]#
class isone_api.ISONEAPI(sleep_seconds: float = 5, max_retries: int = 3)[source]#

Class to authenticate with and make requests to the ISO New England API.

To authenticate, you need a username and password.

To register, create an account here: https://www.iso-ne.com/participate/applications-status-changes/access-software-systems#ws-api

Attributes

default_timezone

US/Eastern

Methods

get_dayahead_hourly_demand

Get the day-ahead hourly demand data for specified locations and date range.

get_fuel_mix

Return fuel mix data for the specified date range

get_hourly_load_forecast

Get the hourly load forecast data for specified locations and date range.

get_load_hourly

Return hourly load data for a given date or date range

get_location_by_id

Get information for a specific location by its ID.

get_locations

Get a list of core hub and zone locations.

get_locations_all

Get detailed information for all locations.

get_realtime_hourly_demand

Get the real-time hourly demand data for specified locations and date range.

get_reliability_region_load_forecast

Get the regional load forecast data for specified date range and vintages.

make_api_call

parse_problematic_datetime

get_dayahead_hourly_demand(date: str | pandas.Timestamp = 'latest', end: str | pandas.Timestamp | None = None, locations: list[str] = None, verbose: bool = False) pandas.DataFrame[source]#

Get the day-ahead hourly demand data for specified locations and date range.

Parameters:
  • date (str) – The start date for the data request. Use “latest” for most recent data.

  • end_date (str | None) – The end date for the data request. Only used if date is not “latest”.

  • locations (list[str], optional) – List of specific location names to request data for. If None, data for all locations will be retrieved.

Returns:

A DataFrame containing the day-ahead hourly demand data for all requested locations.

Return type:

pandas.DataFrame

get_fuel_mix(date: str | pandas.Timestamp = 'latest', end: str | pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame[source]#

Return fuel mix data for the specified date range

Parameters:
  • date (str | pd.Timestamp) – The start date for the data request. Use “latest” for most recent data.

  • end (str | pd.Timestamp | None) – The end date for the data request. Only used if date is not “latest”.

  • verbose (bool) – Whether to print verbose logging information.

Returns:

DataFrame containing fuel mix data with timestamps and generation by fuel type

Return type:

pd.DataFrame

get_hourly_load_forecast(date: str | pandas.Timestamp = 'latest', end: str | pandas.Timestamp | None = None, vintage: Literal[latest, all] = 'all', verbose: bool = False) pandas.DataFrame[source]#

Get the hourly load forecast data for specified locations and date range.

NB: ISO NE publishes load forecasts roughly every 30 minutes for the next 48-72 future intervals. Getting all forecasts (all “vintages”) can be a lot of data, potentially thousands of rows for a single day. Sometimes you may want this, and that’s why ISO NE provides the option to get all vintages, but you may be most interested in the most recent forecast for a given historical interval, essentially the shortest vintages, most accurate forecast, which they also provide. All vintages is typically 5x to 20x more data than latest, so it’s something to consider when making a request.

Giving the option for just the “latest” forecast (aka shortest horizon, aka most recent publish time/vintage) for a given historical interval avoids this large data pull and collation since ISO NE API has done that work for you already.

Parameters:
  • date (str) – The start date for the data request. Use “latest” for most recent data.

  • end_date (str | None) – The end date for the data request. Only used if date is not “latest”.

  • vintage (Literal["latest", "all"]) – The vintage for the data request. Options are “latest” or “all”, defaults to “all”.

Returns:

A DataFrame containing the hourly load forecast data for the system.

Return type:

pandas.DataFrame

get_load_hourly(date: str | pandas.Timestamp, end: str | pandas.Timestamp = None, verbose: bool = False) pandas.DataFrame[source]#

Return hourly load data for a given date or date range

Parameters:
  • date (str | pd.Timestamp) – The start date for the data request. Use “latest” for most recent data.

  • end (str | pd.Timestamp, optional) – The end date for the data request. Only used if date is not “latest”.

  • locations (list[str], optional) – List of specific location names to request data for. If None, data for all locations will be retrieved.

  • verbose (bool, optional) – Whether to print verbose logging information.

Returns:

DataFrame containing load data with timestamps and load

Return type:

pd.DataFrame

get_location_by_id(location_id: int) pandas.DataFrame[source]#

Get information for a specific location by its ID.

Parameters:

location_id (int) – The ID of the location to retrieve.

Returns:

A DataFrame containing the location information.

Return type:

pandas.DataFrame

get_locations() pandas.DataFrame[source]#

Get a list of core hub and zone locations.

Returns:

A DataFrame containing location information.

Return type:

pandas.DataFrame

get_locations_all() pandas.DataFrame[source]#

Get detailed information for all locations.

Returns:

A DataFrame containing detailed information for all locations.

Return type:

pandas.DataFrame

get_realtime_hourly_demand(date: str | pandas.Timestamp = 'latest', end: str | pandas.Timestamp | None = None, locations: list[str] = None, verbose: bool = False) pandas.DataFrame[source]#

Get the real-time hourly demand data for specified locations and date range.

Parameters:
  • date (str) – The start date for the data request. Use “latest” for most recent data.

  • end_date (str | None) – The end date for the data request. Only used if date is not “latest”.

  • locations (list[str], optional) – List of specific location names to request data for. If None, data for all locations will be retrieved.

Returns:

A DataFrame containing the real-time hourly demand data for all requested locations.

Return type:

pandas.DataFrame

get_reliability_region_load_forecast(date: str | pandas.Timestamp = 'latest', end: str | pandas.Timestamp | None = None, vintage: Literal[latest, all] = 'all', verbose: bool = False) pandas.DataFrame[source]#

Get the regional load forecast data for specified date range and vintages.

Parameters:
  • date (str) – The start date for the data request. Use “latest” for most recent data.

  • end (str | None) – The end date for the data request. Only used if date is not “latest”.

  • vintages (Literal["latest", "all"]) – The vintage for the data request. Options are “latest” or “all”.

Returns:

A DataFrame containing the regional load forecast data for all requested locations.

Return type:

pandas.DataFrame

make_api_call(url: str, api_params: dict = None, parse_json: bool = True, verbose: bool = False)[source]#
parse_problematic_datetime(date_string: str | pandas.Timestamp) datetime.datetime[source]#
isone_api.ZONE_LOCATIONID_MAP[source]#