Skip to contents

Using the concordance

For parsers and data users (ef2, panel990, fiscal and others).

concordance()
The concordance: one row per xpath
xpath_map()
Lookup table from xpath to variable and table
data_dictionary()
Data dictionary: one row per variable
dd() print(<cc_dd>)
Look up the data dictionary
variable_page_url()
Address of a validation page
table_names()
Table names
cc_forms() cc_parts() cc_tables() cc_variables() cc_xpaths() cc_families()
Component tables
lookup_xpath()
Look up raw xpaths
normalize_xpath()
Normalize raw xpaths for lookup
concordance_version()
Version of the concordance
v1_columns concordance_columns
Columns of the v1 concordance, in order

Building the concordance

read_src()
Read the component tables
write_src()
Write component tables
build_concordance()
Build the unified concordance from the component tables
write_concordance()
Write the unified concordance
read_cc_csv()
Read a concordance CSV exactly as stored
write_cc_csv()
Write a concordance CSV in the v1 style
split_v1()
Split the v1 concordance into component tables

Change log and v1 crosswalk

read_changelog()
Read the change log
write_changelog()
Write the change log
change_types
Change types
derived_columns
Derived columns
diff_src()
Cell-level differences between two sets of component tables
apply_changes()
Apply change-log rows to component tables
check_changelog()
Check the change log against the current component tables
draft_changes()
Draft change-log rows for unlogged edits
baseline_src()
Baseline component tables (v1, split without changes)
v1_crosswalk()
Crosswalk from v1 rows to the current concordance

Validation

validation_rules
Structural validation rules (PLAN.md section 6.1)
validate_concordance()
Run the structural validation rules
validation_summary()
Summarise validation against the rule ceilings
read_validation_log()
Read the validation log
drop_accepted()
Drop issues accepted in the validation log

Filing evidence, flags and reports

build_evidence()
Build filing evidence from ef2 DuckDB builds
combine_evidence()
Stack per-year evidence files
load_evidence()
Load evidence tables for reporting
read_xpath_stats()
Read xpath_stats.csv with numeric quantiles
xpath_observations()
Xpath observations from filing evidence
xpath_version_fields()
Schema versions, current status and reporting rate of each xpath
update_xpath_versions()
Update the version fields of the component tables from filing evidence
flag_xpaths()
Flag xpaths that look mis-mapped
observed_table_groups()
Observed repeating groups per table
value_checks()
Value checks for one variable, by report type
run_value_checks()
Run the value checks for every variable
partial_year()
The partial final year of the evidence, if any
report_type()
Choose the report type for a variable
render_reports()
Render validation reports
render_variable_pages()
Render light validation pages
reports
Validation reports, one per variable
issue_catalog
Catalog of checks
collect_issues()
Collect every failing case
write_issues_report()
Write the issues report (HTML and CSV)
resolve_issues()
Resolve an issues list against the current concordance
write_resolved_report()
Write the resolved-issues report (HTML and CSV)