Fetch records from a Vancouver Open Data dataset by ID
Source:R/datasets_vancouver.R
morie_datasets_vancouver_opendata_by_id.RdPhase 3CCC4. Hits the Opendatasoft v2.1 /records endpoint for
an arbitrary Vancouver dataset slug. Returns the results array
as a data.frame. For larger pulls, use format = "csv" to hit
the unrestricted /exports/csv endpoint instead.
Usage
morie_datasets_vancouver_opendata_by_id(
dataset_id,
limit = 100L,
format = c("json", "csv")
)Arguments
- dataset_id
Opendatasoft dataset slug (from
morie_datasets_vancouver_opendata_layers()).- limit
Page size (max 100 for
/records).- format
One of
"json"(default,/recordsendpoint) or"csv"(/exports/csvendpoint, no row limit).
Examples
if (FALSE) { # \dontrun{
df <- morie_datasets_vancouver_opendata_by_id("non-market-housing",
limit = 50)
nrow(df)
} # }