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

Unlock the full course today

Join today to access over 25,000 courses taught by industry experts.

Querying data with R and Python

Querying data with R and Python

- [Instructor] So far in the previous videos, we viewed the API functionality and saw how to set and send a get request via the browser. We'll dedicate the rest of this chapter to learn and practice how to query data from the API using R and Python. To pull data with R we will use the EIA API library that provides a set of functions to query data from the current version of the API V2. The package is available on CRAN and we will use the current version 0.1.2. For Python, currently, there is no stable library that supports the V2 of the API. Therefore, to be consistent, I created a set of Python functions aligned with the ones available in the EIA API library, which we'll use to pull the data from the API with Python. Throughout this course, we will use the following three functions, which are available both in R and Python to pull data from the API. First, the EIA underscore metadata, which as its name implies returns metadata. In the coming example, we will see how to use the…

Contents