knitr::opts_chunk$set(collapse=TRUE, comment="#>")
NOT_CRAN <- identical(tolower(Sys.getenv("NOT_CRAN")), "true") knitr::opts_chunk$set(purl = NOT_CRAN) ## Use `eval = NOT_CRAN` in any chunk that requires access to a secret. ## See https://cran.r-project.org/web/packages/httr/vignettes/secrets.html ## for further details.
The eiastats
package provides access to data from the United States' Energy
Information Administration (EIA).
## This code works - consider leaving this for users to extract relevant data ## Will deliver efficiencies, by first filtering before mapping and unnesting w <- z %>% mutate(data = map(data, ~ .x %>% as_tibble(data, .name_repair="unique") %>% set_names(c("period","value")) )) y <- tidyr::unnest(w, data)
## This code works - consider leaving this for users to extract relevant data ## Will deliver efficiencies, by first filtering before mapping and unnesting w <- z %>% mutate(data = map(data, ~ .x %>% as_tibble(data, .name_repair="unique") %>% set_names(c("period","value")) )) y <- tidyr::unnest(w, data)
I use the secret
package for managing the EIA API key.
To use these ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.