Skip to contents

Installation

# install.packages("devtools") # if not installed
devtools::install_github("energyRt/nrel.dev.api")

Registration

The first step is to register in the NREL’s Network and request API credentials. After registration, the key will be sent to the provided email address. The email address and the key will be used as credentials to access NREL’s data-sets.

Get an API Key

Storing credentials

The email address and the API key can be stored in the home folder of the system and will be loaded with the package next time. This procedure should be run once on every system unless the credentials changed.

library(nrel.dev.api)
set_nrel_api_key(nrel.api.email = "YOUR_EMAIL", 
                 nrel.api.key = "YOUR_NREL_API_KEY")
# retrieve the credentials
x <- get_nrel_api_email()
x
get_nrel_api_key(invisible = FALSE)