Construct query URL for Ember data API
Usage
construct_query_url(
endpoint = c("electricity-generation", "power-sector-emissions", "electricity-demand",
"carbon-intensity"),
temporal_resolution = c("yearly", "monthly"),
year = NA,
min_date = "2015",
max_date = "2023",
entity = "all",
api_key = Sys.getenv("EMBER_API_KEY")
)
Arguments
- endpoint
Default = "electricity-generation"
- temporal_resolution
"yearly" (default) or "monthly"
- year
(optional) If specified, retrieve data for a single year
- min_date
Mininum date to retrieve data for. YYYY or YYYY-MM format. Default=2015
- max_date
Maximum date to retrieve data for. YYYY or YYYY-MM format. Default=2023
- entity
List of comma-separated country(s) or region(s) to return data for. Default is all (no filter)
- api_key
Default is Sys.getenv("EMBER_API_KEY")