Skip to contents

Reports, for every catalogued layer, which required template fields are missing — either absent from the readme or left as an unedited placeholder — plus any data folder found with no readme at all. Use it to find the datasets that need documenting before the catalogue can be trusted.

Usage

check_metadata(theme = NULL, detail = FALSE, verbose = TRUE, ...)

Arguments

theme

Optional character; restrict the audit to one or more themes.

detail

Logical; if TRUE, return one row per missing field instead of one row per layer. Default FALSE.

verbose

Logical; if TRUE (default), return the table classed so that printing it gives the compact view. Set FALSE for the plain data.frame, with missing untruncated and every column shown.

...

Passed to build_catalogue(), e.g. root or refresh.

Value

A data.frame, classed sciSpatial_audit unless verbose = FALSE, so that printing it gives the same compact view list_layers() does. With detail = FALSE, one row per layer with id, name, theme, n_missing, complete (proportion of required fields present), and missing (a comma-separated list). With detail = TRUE, one row per id/field pair. Folders holding spatial data but no readme are reported with field = "readme".

Examples

if (FALSE) { # \dontrun{
check_metadata()
check_metadata(theme = "elevation", detail = TRUE)
check_metadata(refresh = TRUE, verbose = FALSE)
} # }