Skip to contents

Accepts 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.

Usage

morie_arsau_sidecar_schema(sidecar)

Arguments

sidecar

A list as returned by morie_arsau_read_sidecar().

Value

A data.frame with columns name, type, notes.

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.