Eia ======================== .. py:module:: gridstatus.eia Module Contents --------------- Classes Summary ~~~~~~~~~~~~~~~ .. autoapisummary:: gridstatus.eia.EIA Attributes Summary ~~~~~~~~~~~~~~~~~~~ .. autoapisummary:: gridstatus.eia.DATASET_HANDLERS Contents ~~~~~~~~~~~~~~~~~~~ .. py:data:: DATASET_HANDLERS .. py:class:: EIA(api_key=None) Initialize EIA API object :param api_key: EIA API key. If not provided, will look for EIA_API_KEY environment variable. :type api_key: str, optional **Attributes** .. list-table:: :widths: 15 85 :header-rows: 0 * - **BASE_URL** - https://api.eia.gov/v2/ **Methods** .. autoapisummary:: :nosignatures: gridstatus.eia.EIA.get_dataset gridstatus.eia.EIA.list_routes .. py:method:: get_dataset(dataset, start, end, n_workers=1, verbose=False) Get data from a dataset Only supports "electricity/rto/interchange-data" dataset for now. :param dataset: Dataset path :type dataset: str :param start: Start date :type start: str or pd.Timestamp :param end: End date :type end: str or pd.Timestamp :param n_workers: Number of workers to use for fetching data. Defaults to 1. :type n_workers: int, optional :param verbose: Whether to print progress. Defaults to False. :type verbose: bool, optional :returns: Dataframe with data from the dataset :rtype: pd.DataFrame .. py:method:: list_routes(route='/') List all available routes