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.
Sending a simple GET request with Python - GitHub Tutorial
From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Sending a simple GET request with Python
- [Instructor] In the previous video, we leveraged the AI metadata function to pull metadata from the API for the PG AE series. In this video, we'll use the metadata we pulled to set and send to the API a simple get request to pull data with the EIA get function. To set a simple get request with the EIA get function, we'll need to define the following four arguments, API key, API path, frequency, and facets. Let's go and set those arguments using the above variables similar to the get metadata function, the API key, and the API path, define the API access key and route. We'll use the same method as before to load the API key using the get N function. Likewise, we will use the same route as before and add data at the end of the route to indicate that this is a data request as opposed to metadata request. So I'm going to add your data to ensure that the API will return us data. Next, is the frequency argument, which defines the series timestamp format. Let's go to the metadata above and…
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)
-
-
-
-