| gerda_join_diagnostics | R Documentation |
Returns the machine-readable reports attached by add_gerda_covariates()
and add_gerda_census(). Both helpers preserve earlier reports, so a pipe
that performs both joins returns one row per join in execution order.
gerda_join_diagnostics(x)
x |
A data frame returned by |
The diagnostics are stored as an attribute and are intended to be inspected immediately after the join pipeline. The GERDA join helpers preserve the full history, but unrelated data-frame transformations may remove custom attributes.
A tibble with one row per GERDA join and the following columns:
The helper, inferred
geographic level, identifier column, and join-key mapping. join_keys
is a list-column.
Row counts before and after the join.
Rows eligible for matching after excluding temporal out-of-coverage rows, plus total matched and unmatched rows. Census joins treat every row as eligible.
Unmatched-row classifications. A missing join key is unexpected, even when another key would fall outside coverage.
Counts of distinct non-missing geographic identifiers in each category.
Matched eligible rows divided by all eligible
rows, or NA if there are no eligible rows.
Temporal reference-data coverage;
NA for the time-invariant Census join.
The requested unmatched mode.
List-columns containing the distinct values in
each category. Missing identifiers are counted in missing_key_rows
but cannot appear in the identifier list.
add_gerda_covariates(), add_gerda_census()
census <- gerda_census()
election_data <- data.frame(ags = head(census$ags, 2))
joined <- add_gerda_census(election_data, unmatched = "error")
gerda_join_diagnostics(joined)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.