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 R - GitHub Tutorial
From the course: Data Pipeline Automation with GitHub Actions Using R and Python
Sending a simple GET request with R
- [Instructor] In the previous video, we saw how we can use the EIA metadata function to pull metadata from the API. In this video, we will use the metadata we pull 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 will need to define the follow four arguments, API key, API path, frequency, 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 defines the API access key and route. We will use the same method as before to load the API key using the Sys.getenv function and load it from the env variable, EI_API_KEY. Likewise, we will use the same route as before and add the data at the end of the route as we wanted to inform the API that this is a data request and not a metadata. Next, is the frequency argument. Let's go ahead to the metadata output and see what are the options. You can have it over here on the…
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)
-
-
-
-