get_consumption: Retrieve consumption data

Description Usage Arguments Value Examples

Description

Data on French electricity consumption in real time. Forecasts are also available, they include electricity losses on the grid but do not include pumping consumption of waterworks.

Usage

1
2
3
get_consumption(resource = c("short_term", "weekly_forecast",
  "annual_forecast"), type = c("REALISED", "ID", "D-1", "D-2"),
  start_date = NULL, end_date = NULL, token = NULL, raw = FALSE)

Arguments

resource

Which ressource to use between short_term (short-term consumption forecasts), weekly_forecast (weekly consumption forecasts) and annual_forecast (annual consumption forecasts).

type

Forecast type of consumption, one or several between 'REALISED', 'ID', 'D-1', 'D-2'.

start_date

Optional, starting date to filter results.

end_date

Optional, ending date to filter results.

token

Token obtained with get_token.

raw

Return output from fromJSON.

Value

a data.table or a list if raw = TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

# First you need a token
id_client <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
id_secret <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
token <- get_token(
  key = list(id_client = id_client, id_secret = id_secret)
)

# Then you can retrieve consumption data
consumption <- get_consumption("short_term", token = token)


## End(Not run)

dreamRs/rte.data documentation built on June 18, 2019, 8:02 a.m.