Releases: Matt-Brigida/EIAdata
Releases · Matt-Brigida/EIAdata
Updated for version 2 of the EIA API
getEIA()
will now work with version 2 of the EIA API. getCatEIA()
has been removed, so if you don't already know the Series ID you want you'll need to find it using an alternative method. For example:
- Go to EIA's Opendata website.
- Go to the "Bulk File Downloads" by scrolling down a bit and looking on the right margin.
- Choose the bulk download for the category that contains the series you want. Foe example if it is a Crude Oil series download the "Petroleum" file.
- After the file downloads unzip it and find the Series ID you want.
Note you only have to do the above once to get the Series ID.
Switch to https
This version responds to the following notice from the EIA:
Notice: As of February 11st, 2022 The API now only responds to HTTPS. Insecure (HTTP) web protocols are no longer supported.
Changes:
- Changed requests to EIA API from http to https.
- New depends on
httr
package.
Thanks to @MoreCoffee12 for identifying the issue, and providing code fixes.