Skip to contents

Retrieve the information of any indicator based on the id.

Usage

esios_indicators(
  indicator,
  locale = NULL,
  datetime = NULL,
  start_date = NULL,
  end_date = NULL,
  time_agg = NULL,
  time_trunc = NULL,
  geo_agg = NULL,
  geo_ids = NULL,
  geo_trunc = NULL
)

Arguments

indicator

ID code for an indicator

locale

Get translations for sources (es, en). Default language: es

datetime

A certain date to filter values by (iso8601 format)

start_date

Beginning of the date range to filter indicator values (iso8601 format)

end_date

End of the date range to filter indicator values (iso8601 format)

time_agg

How to aggregate indicator values when grouping them by time. Accepted values: 'sum', 'average'. Default value: 'sum'.

time_trunc

Tells the API how to trunc data time series. Accepted values: 'five_minutes', 'ten_minutes', 'fifteen_minutes', 'hour', 'day', 'month', 'year'.

geo_agg

How to aggregate indicator values when grouping them by geo_id. Accepted values: 'sum', 'average'. Default value: 'sum'.

geo_ids

Tells the API the geo ids to filter the date.

geo_trunc

Tells the API how to group data at geolocalization level when the geo_agg is informed. Accepted values: 'country', 'electric_system', 'autonomous_community', 'province', 'electric_subsystem', 'town' and 'drainage_basin'.

Examples

# \donttest{
ei10001 <- esios_indicators(10001)
#> Waiting 4s to retry ■■■■■■■■                        
#> Waiting 4s to retry ■■■■■■■■■■■■■■■■■■■■■■■■        
#> Waiting 4s to retry ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 
ei1700 <- esios_indicators(1700)
#> Waiting 5s to retry ■■■■■■■■■■■                     
#> Waiting 5s to retry ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■   
#> Waiting 5s to retry ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 
# }