
Extract a simplified [name, type, notes] schema from a parsed CKAN sidecar.
Source: R/arsau_datasets.R
morie_arsau_sidecar_schema.RdAccepts the result of morie_arsau_read_sidecar (a
list with fields and records entries) and returns a
tidy data.frame of column metadata. Entries that lack an
id are dropped.
Arguments
- sidecar
A list as returned by
morie_arsau_read_sidecar().
References
CKAN datastore_search response schema, as
served by datastore_search (https://data.ontario.ca/).
Examples
sc <- list(fields = list(
list(id = "PoliceService", type = "text",
info = list(notes = "Name of the service.")),
list(id = "IncidentYear", type = "int",
info = list(notes = "Reporting year."))))
morie_arsau_sidecar_schema(sc)
#> name type notes
#> 1 PoliceService text Name of the service.
#> 2 IncidentYear int Reporting year.