From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Solution: Query the API with Python - GitHub Tutorial
From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Solution: Query the API with Python
(upbeat music) - [Instructor] We are going to use this Jupyter notebook for the solution of chapter one challenge. This notebook Py_challenge_solutions can be found under the course repository chapter one folder. In addition, we're going to use the AI_API Python script as before. This Python script provides a set of functions that will enable us to query data from the API. Let's get started by loading those libraries, and we're going to use the same libraries as before, EIA_API and set it as API. The OS library we're going to use to load environment variables. The date/time we'll use to reformat date and time objects. And last is Plotly, which we're going to use to visualize the data. Let's go to the first question. We were asked to extract from the EIA dashboard, the metadata of the San Diego Gas and Electric Balancing Authority sub region. Let's go to the eia.gov website and navigate to the dashboard. So on the main page of eia.gov, scroll down to the feature section, then click on…
Contents
-
-
-
(Locked)
EIA API2m 47s
-
(Locked)
Setting an environment variable3m 22s
-
(Locked)
The EIA API dashboard4m 10s
-
(Locked)
GET request structure5m 41s
-
Querying the data via the browser4m 4s
-
(Locked)
Querying data with R and Python2m 50s
-
(Locked)
Pulling metadata from API with R3m 5s
-
(Locked)
Sending a simple GET request with R5m 19s
-
(Locked)
API limitations with R4m 43s
-
Handling a large data request with R4m 27s
-
Pulling metadata from API with Python3m 47s
-
(Locked)
Sending a simple GET request with Python4m 44s
-
(Locked)
API limitations with Python3m 54s
-
(Locked)
Handling a large data request with Python3m 10s
-
(Locked)
Challenge: Query the API1m 2s
-
(Locked)
Solution: Query the API with R7m 28s
-
(Locked)
Solution: Query the API with Python7m 45s
-
(Locked)
-
-
-
-