From the course: Data Pipeline Automation with GitHub Actions Using R and Python

The EIA API dashboard

- [Instructor] In this video, we will review the eia API dashboard and learn how to use its functionality to search data, apply filters, and extract the query settings. This information, as you will see later on this course, will be used for when setting the get request via our Python to pull data from the API programmatically. Let's go now to the browser and log in again to eia.gov. Under the features section, click the API icon and then click the browse the API, which will open the API dashboard. First things first, we will select the API route, which defines the type of energy category and the subcategory below. For example, let's select the electricity category. Then a new popup will show with the electricity subcategories. As we are interested in the daily and hourly data, we'll select the electricity power operation daily and hourly. In this case, there is a second subcategory and we can see the options over here. And we are interested in the hourly demand for sub region. Let's click it. As you can see, it's loading all the information. Once we choose the route, we can start filtering and customizing the data sets that available in this route. You can customize the series start and end time with the frequency filter. For example, you can see the data is available since 2018. In addition, you can use the facet filter to select a specific balancing authority, which represent the region, or select a specific provider using the sub region filter. Let's select both of them and see the filter options. We choose the balancing authority, which is represented the parent. It's loading all the information on the backend, so it might take a second or two. And as you can see, there are eight balancing authority, and we can select the selection and we can add also the sub region and see the one below. Overall, there are 83 sub regions available under the parent category. So now let's say we want to narrow down and we want only the one that available for California independent system operator or CISO. Let's click it and click the save selection. Now you can see the number of sub region narrowed down to four, the one under CISO. We can finalize our selection by selecting the Pacific Gas and Electric Sub region and save the selection. Last but not least, let's submit the request. The dashboard will retain some useful information about the query such as the API endpoint on the left side and the query header on the right side in a JSON format, which we will use later to pull data directly from the API. We will talk later on in this chapter about the structure of the get request and how can we use the header and the API URL to set the get request. Last but not least, you can see the selection data below. You can plot it by clicking any of the chart symbols under the chart column.

Contents