Skip to contents

Joins xpaths to their variables, applies the xpath-level overrides, adds table cardinality, and returns one row per xpath in v1 order.

  • format = "v1" returns the v1 layout: concordance_columns (the v1 columns with the version fields of fix 24). For the baseline tables, which still have the v1 columns, it returns exactly v1_columns and reproduces the v1 file byte for byte (see write_concordance()).

  • format = "v2" adds family_id and part_id after the v1 columns.

Usage

build_concordance(src_dir = src_path(), format = c("v1", "v2"), form = NULL)

Arguments

src_dir

Directory of component tables, or a list of component tables as returned by read_src().

format

"v1" or "v2".

form

NULL (every xpath, each with its primary mapping), "F990" (990 and 990-EZ returns with their schedules), or a database parsed separately: "F990PF" (the 990-PF xpaths, the shared return header and Schedule B) or "F990T" (the 990-T, its Schedule A and the forms filed with it, and the shared return header). For a separate database the form-specific mappings in xpath_forms.csv are applied (an attachment such as CompensationExplanation maps to a 990 variable in 990 returns and to a PF variable in 990-PF returns).

Value

A data.table.