R/datasets.R
aggregate_cov_data.Rd
Get aggregates from dataset from Vancouver Open Data Portal
aggregate_cov_data(
dataset_id,
select = "count(*) as count",
group_by = NULL,
where = NULL,
apikey = getOption("VancouverOpenDataApiKey"),
refresh = FALSE
)
Dataset id from the Vancouver Open Data catalogue
select string for aggregation, default is `count(*) as count` It accepts ODSQL syntax.
grouping variables for the query It accepts ODSQL syntax.
Query parameter to filter data (default `NULL` no filter) It accepts ODSQL syntax.
Vancouver Open Data API key, default `getOption("VancouverOpenDataApiKey")`
refresh cached data, default `FALSE``
tibble format data table output
# Count all parking tickets that relate to fire hydrants by ticket status
if (FALSE) {
aggregate_cov_data("parking-tickets-2017-2019",
group_by = "status",
where = "infractiontext LIKE 'FIRE'")
}