Walks root, parses every dataset readme it finds, and returns
one row per documented layer. Folders holding spatial data with
no readme are recorded separately in the undocumented
attribute and reported by check_metadata().
Usage
build_catalogue(
root = spatial_root(),
files = TRUE,
refresh = FALSE,
quiet = FALSE
)Arguments
- root
Character; directory to scan. Defaults to
spatial_root().- files
Logical; if
TRUE(default), inventory each layer's files to populaten_files,size_mb, anddata_type. SetFALSEfor a faster, metadata-only scan.- refresh
Logical; if
TRUE, rescan even when a cached manifest exists. DefaultFALSE.- quiet
Logical; if
TRUE, suppress progress messages. DefaultFALSE.
Value
A data.frame with one row per layer: id (path
relative to root), name, theme, sub_theme, the
template metadata fields (see as_metadata_row()), n_files,
size_mb, data_type, path, and readme. Carries the
scan root and the undocumented folders as attributes.
Details
The top-level _temp folder is skipped: it is the share's
scratch area, so its contents are neither catalogued as layers
nor reported as missing readmes.
The result is cached per root for the session, so list_layers()
and friends only pay for the scan once.
See also
list_layers() to query the manifest, check_metadata()
to audit it.
Examples
if (FALSE) { # \dontrun{
cat_df <- build_catalogue()
nrow(cat_df)
build_catalogue(refresh = TRUE, files = FALSE)
} # }