Isone Api#
Module Contents#
Classes Summary#
Class to authenticate with and make requests to the ISO New England API. |
Attributes Summary#
Contents#
- 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 the day-ahead hourly demand data for specified locations and date range.
Return fuel mix data for the specified date range
Get the hourly load forecast data for specified locations and date range.
Return hourly load data for a given date or date range
Get information for a specific location by its ID.
Get a list of core hub and zone locations.
Get detailed information for all locations.
Get the real-time hourly demand data for specified locations and date range.
Get the regional load forecast data for specified date range and vintages.
- 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