Skip to contents

Compares the concordance with filing evidence from build_evidence() and returns one row per (xpath, flag). Flag definitions are in PLAN.md, section 6.2. Until the component tables exist, the v1-layout concordance.csv is used for variable and table attributes.

Usage

flag_xpaths(concordance, evidence_dir = "evidence", min_filings = 30)

Arguments

concordance

Data frame in the v1 layout (xpath, variable_name, rdb_table, rdb_relationship, data_type_simple), optionally with multi_value (otherwise read from variables.csv). List-valued (multi_value) fields repeat by design and are not flagged ONE_REPEATS.

evidence_dir

Directory written by combine_evidence().

min_filings

Minimum filings before value-based flags are raised.

Value

A data.table with xpath, variable_name, rdb_table, flag_code, severity, n_filings, years, detail.