Eia
Contents
Eia#
Module Contents#
Classes Summary#
Initialize EIA API object |
Attributes Summary#
Contents#
- class gridstatus.eia.EIA(api_key=None)[source]#
Initialize EIA API object
- Parameters
api_key (str, optional) – EIA API key. If not provided, will look for EIA_API_KEY environment variable.
Attributes
BASE_URL
Methods
Get data from a dataset
List all available routes
- get_dataset(dataset, start, end, n_workers=1, verbose=False)[source]#
Get data from a dataset
Only supports “electricity/rto/interchange-data” dataset for now.
- Parameters
dataset (str) – Dataset path
start (str or pd.Timestamp) – Start date
end (str or pd.Timestamp) – End date
n_workers (int, optional) – Number of workers to use for fetching data. Defaults to 1.
verbose (bool, optional) – Whether to print progress. Defaults to False.
- Returns
Dataframe with data from the dataset
- Return type
pd.DataFrame