get_giedata: get_giedata

View source: R/get_giedata.R

get_giedataR Documentation

get_giedata

Description

Function to download data from GIE's AGSI+ API

Usage

get_giedata(
  country,
  company = NULL,
  facility = NULL,
  from = NULL,
  to = NULL,
  date = NULL,
  size = 30,
  timeout = 3,
  database = "agsi",
  verbose = FALSE,
  apikey = Sys.getenv("GIE_APIKEY")
)

Arguments

country

Character. Specify the country of interest as two-digit country code (e.g., 'DE', 'IE').

company

Character. EIC code for the requested company.

facility

Character. EIC code for the requested facility.

from

Character. Specify the start of the time span you are
interested in downloading (format: YYYY-MM-DD).

to

Character. Specify the end of the time span you are
interested in downloading (format: YYYY-MM-DD).

date

Character. If you want to have data only for one date.
If you set 'date', you cannot set the 'from' and/or 'to' parameters
(format: YYYY-MM-DD).

size

Integer. The number of results per page.

timeout

Numeric. If the amount of pages of your request exceeds 60, a timeout
will be enforced to prevent the API from timing out. Defaults to 3 seconds, any
values must be set in seconds, too.

database

Character. The type of API you want to address ('agsi' or 'alsi').

verbose

Logical. Prints information on function progress to the console (default: FALSE).

apikey

Character. Your personal API key.

Value

A data.frame or list with the results.

Examples

## Not run: 
get_giedata(country = "DE", date = "2022-01-03")

## End(Not run)

giedata documentation built on Nov. 27, 2022, 1:05 a.m.