| Title: | Validate Data Against a 'data-dict.yaml' Data Dictionary |
|---|---|
| Description: | A data dictionary describes a collection of related tables: their columns, types, constraints, relationships, and glossary. Validate a dataset against its dictionary and read the findings as an HTML report. Reference: <https://data-dict.tidyverse.org>. |
| Authors: | Gábor Csárdi [aut, cre] (ORCID: <https://orcid.org/0000-0001-7098-9676>), Hadley Wickham [aut] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>) |
| Maintainer: | Gábor Csárdi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-09-18 11:37:46 UTC |
| Source: | https://github.com/tidyverse/data-dict |
data-dict binaryDownloads the release archive for this platform, checks it against the
published SHA-256, and unpacks the binary into
tools::R_user_dir("datadict", "cache").
dd_install(version = "latest", force = FALSE, quiet = FALSE, dest = NULL)dd_install(version = "latest", force = FALSE, quiet = FALSE, dest = NULL)
version |
Release to install, e.g. |
force |
Whether to download again when a binary is already installed. |
quiet |
Whether to suppress the download progress bar and messages. |
dest |
The destination path for the downloaded binary. Defaults to
machines canonical data directory, see |
The path to the installed binary, invisibly.
dd_install()dd_install()
data-dict binarySearched in order: the DATA_DICT environment variable, the copy installed
by dd_install() in the package's cache directory, then the PATH.
dd_path(check = TRUE)dd_path(check = TRUE)
check |
Whether to throw an error when no binary is found. With
|
Path to the binary, or "" if it was not found and check is
FALSE.
dd_path(check = FALSE)dd_path(check = FALSE)
data-dict binaryBoth output streams are captured, interleaved as the binary wrote them.
With echo = TRUE they are also printed as they arrive, so a long run
shows its progress.
dd_run(args, echo = FALSE, ...)dd_run(args, echo = FALSE, ...)
args |
Character vector of command line arguments. |
echo |
Whether to print the binary's output while it runs, on top of capturing it. |
... |
Passed on to |
A non-zero exit status is an error, carrying the captured output as the message.
A list with the exit status and the captured output, a character
vector of lines, invisibly.
dd_run("--version")dd_run("--version")
Runs data-dict render-report, which validates the data and writes the
findings as a self-contained HTML report, and opens it in a browser. The
data files themselves come from each
table's source: parquet: entry in the dictionary, resolved relative to the
dictionary's directory.
dd_validate_data( dict = ".", table = NULL, html = tempfile(fileext = ".html"), browse = interactive() )dd_validate_data( dict = ".", table = NULL, html = tempfile(fileext = ".html"), browse = interactive() )
dict |
A |
table |
Validate only this table, instead of every table in the dictionary. |
html |
Where to write the report. |
browse |
Whether to open the report with |
A dataset that fails validation is not an R error: the report is the point,
so check status to see whether the run passed.
A list with the html path and the CLI's exit status, where 0
means the dataset validated, invisibly.
# a directory holding a data-dict.yaml and the parquet files it points at dd_validate_data("inst/data")# a directory holding a data-dict.yaml and the parquet files it points at dd_validate_data("inst/data")