Returns a tibble describing each field in the dataset, including its API name, data type, display label, and description. Results are cached for the duration of the R session.
This function is called internally by [get_cov_data()] when `cast_types = TRUE` to determine column types and identify spatial fields.
get_cov_metadata(
dataset_id,
apikey = getOption("VancouverOpenDataApiKey"),
refresh = FALSE
)A tibble with one row per field and columns:
Field name as used in `where` and `select` queries
API data type (e.g. `"text"`, `"int"`, `"double"`, `"date"`, `"geo_shape"`)
Human-readable display label
Field description, if provided by the portal
[get_cov_data()], [list_cov_datasets()]
if (FALSE) { # \dontrun{
# View all fields in the street trees dataset
get_cov_metadata("street-trees")
# Find which fields are spatial
get_cov_metadata("property-parcel-polygons") |>
dplyr::filter(type == "geo_shape")
} # }