gie_gas_aggregate: Get the aggregated historical data export for Europe or Non...

View source: R/gie_aggregate.R

gie_gas_aggregateR Documentation

Get the aggregated historical data export for Europe or Non Europe

Description

Get the aggregated historical data export for Europe or Non Europe

Usage

gie_gas_aggregate(area, api_key = NULL, max_pages = 1000)

Arguments

area

eu for Europe, ne for Non Europe.

api_key

The default is NULL and searches for your GIE_PAT in you .Renviron file.

max_pages

How many pages to return in the paginated results. Defaults to 1000 so all results are returned as default.

Examples

{

library(gie)
library(tidyverse)

ne <- gie_gas_aggregate("ne")
eu <- gie_gas_aggregate("eu")

eu %>%
  mutate(yr = year(gasDayStartedOn),
         mnth = month(gasDayStartedOn),
         mday = mday(gasDayStartedOn)) %>%
  filter(mnth == 7) %>%
  group_by(yr) %>%
  filter(mday == max(mday)) %>%
  ungroup() %>%
  ggplot(., aes(gasDayStartedOn, gasInStorage)) +
  geom_col() +
  geom_point(aes(gasDayStartedOn, workingGasVolume)) +
  labs(title = "End of June Gas Storage")
}


krose/gie documentation built on June 29, 2023, 1:29 a.m.