CORE Pipeline Quality Report


Form: 990ez Tax year: 2014 Generated: 2026-05-11 17:06:20

✅ PASSED — Strict mode: TRUE

Executive Summary

Metric Value
Row count 220,180
Column count 76
Vintage-aware completeness 99.02%
Raw completeness (all cols / all rows) 98.79%
Unique EINs 219,567
Duplicate EINs (amendments) 613
Missing columns vs schema 0
Extra columns vs schema 0
YoY row-count delta vs prior run outside_bounds

Identity-Field Checks

Code
ein  <- r$critical_field_issues$ein
tp   <- r$critical_field_issues$tax_period
sub  <- r$critical_field_issues$subsection
typ  <- r$critical_field_issues$types

ident <- data.table(
  Check = c("EIN format (XX-XXXXXXX)", "EIN null count", "EIN duplicates (soft)",
            "tax_period format (YYYYMM)", "tax_period out-of-range",
            "subsection_cd whitelist", "Column types"),
  Result = c(
    if (is.null(ein))  "✅ all valid" else sprintf("❌ %d malformed", ein$malformed),
    if (is.null(ein) && r$summary_stats$duplicate_eins >= 0) "✅ no nulls" else sprintf("❌ %d nulls", ein$null_count),
    sprintf("ℹ %d (soft, not a failure)", r$summary_stats$duplicate_eins),
    if (is.null(tp))   "✅ all valid"  else sprintf("❌ %d malformed", tp$malformed_count),
    if (is.null(tp))   "✅ all in range" else sprintf("❌ %d out of range", tp$out_of_range_count),
    if (is.null(sub))  "✅ all in IRM whitelist" else sprintf("❌ %d unknown codes", sub$unknown_count),
    if (is.null(typ))  "✅ all types correct" else sprintf("❌ %s", paste(typ$issues, collapse = "; "))
  )
)
kable(ident)
Check Result
EIN format (XX-XXXXXXX) ✅ all valid
EIN null count ✅ no nulls
EIN duplicates (soft) ℹ 613 (soft, not a failure)
tax_period format (YYYYMM) ✅ all valid
tax_period out-of-range ✅ all in range
subsection_cd whitelist ✅ all in IRM whitelist
Column types ✅ all types correct

Subsection Code Distribution

(IRC 501(c) / 501(d) / 501(e) / 501(f) / 501(k) / 501(n) / 521 / 527 / 529 / 4947 / 1381 subsection codes per IRM 25.7.1. See data/lookups/subsection_codes.csv.)

Code
sd <- r$summary_stats$subsection_distribution
if (length(sd$top_values) == 0L) {
  cat("(no subsection data)")
} else {
  tab <- rbindlist(lapply(sd$top_values, as.data.table))
  setnames(tab, c("code", "count", "pct"))
  tab[, pct := paste0(pct, "%")]
  tab[, count := format(count, big.mark = ",")]
  kable(tab)
}
code count pct
3 162,256 73.69%
4 14,754 6.7%
6 14,554 6.61%
5 8,826 4.01%
7 8,730 3.96%
8 3,541 1.61%
19 3,422 1.55%
13 1,036 0.47%
10 921 0.42%
12 768 0.35%

Financial Summary

Code
fin <- r$summary_stats$financial
if (length(fin) == 0L) {
  cat("(no financial summary)")
} else {
  tab <- data.table(
    metric = c("total_revenue", "total_expenses", "total_assets_eoy"),
    sum = c(fmt_money(fin$revenue$total),  fmt_money(fin$expenses$total),  fmt_money(fin$assets$total)),
    median = c(fmt_money(fin$revenue$median), fmt_money(fin$expenses$median), fmt_money(fin$assets$median))
  )
  kable(tab)
}
metric sum median
total_revenue $13,163,531,754 $50,428
total_expenses $12,596,314,974 $46,236
total_assets_eoy $16,732,765,132 $37,126

Tax Period Year Coverage

Code
d <- r$summary_stats$tax_period_year_distribution
if (length(d) == 0L) {
  cat("(no coverage data)")
} else {
  tab <- data.table(tax_year = names(d), n = as.integer(unlist(d)))
  setorder(tab, tax_year)
  tab[, pct := sprintf("%.2f%%", 100 * n / sum(n))]
  tab[, n := format(n, big.mark = ",")]
  kable(tab)
}
tax_year n pct
2014 220,180 100.00%

Field Completeness by Category

Columns are grouped by Form section parsed from the crosswalk’s location field.

Code
cats <- r$category_reports
if (length(cats) == 0L) {
  cat("(no category breakdown)")
} else {
  tab <- rbindlist(lapply(cats, function(c) data.table(
    category         = c$category_name,
    n_cols           = c$column_count,
    cols_present     = c$columns_present,
    avg_completeness = sprintf("%.2f%%", c$avg_completeness)
  )))
  setorder(tab, -n_cols)
  kable(tab)
}
category n_cols cols_present avg_completeness
sched_a 32 32 99.99%
part_i 20 20 100.00%
part_v 13 13 94.29%
header 3 3 100.00%
part_ii 3 3 100.00%
other 1 1 82.67%

Completeness by Vintage Cohort

When a single tax-year file blends rows from multiple extract_year × source_form cohorts, the per-cohort completeness reveals whether any vintage is dragging the overall metric down. A clean run produces 100% for every cohort.

Code
pc <- r$completeness_by_cohort
if (length(pc) == 0L) {
  cat("(single cohort)")
} else {
  tab <- rbindlist(lapply(pc, function(c) data.table(
    extract_year     = c$extract_year,
    source_form      = c$source_form,
    rows             = format(c$n_rows, big.mark = ","),
    expected_cols    = c$n_expected_cols,
    completeness_pct = sprintf("%.2f%%", c$completeness_pct)
  )))
  kable(tab)
}
extract_year source_form rows expected_cols completeness_pct
2014 990ez 38,018 75 100.00%
2015 990ez 163,265 76 98.68%
2016 990ez 13,293 76 100.00%
2017 990ez 2,707 76 100.00%
2018 990ez 1,531 76 100.00%
2019 990ez 628 76 99.55%
2020 990ez 131 76 98.06%
2021 990ez 229 76 99.42%
2022 990ez 147 76 99.47%
2023 990ez 138 76 99.43%
2024 990ez 93 76 97.47%

Data Issues

Code
issues <- character(0)
if (length(r$missing_columns)) issues <- c(issues, sprintf("Missing %d columns: %s",
  length(r$missing_columns), paste(head(r$missing_columns, 10), collapse = ", ")))
if (length(r$extra_columns)) issues <- c(issues, sprintf("Extra %d columns: %s",
  length(r$extra_columns), paste(head(r$extra_columns, 10), collapse = ", ")))
if (length(r$critical_field_issues)) {
  for (k in names(r$critical_field_issues)) {
    issues <- c(issues, sprintf("%s: %s", k, paste(unlist(r$critical_field_issues[[k]]), collapse = " | ")))
  }
}

if (length(issues) == 0L) {
  cat("✅ No hard-check issues detected.\n")
} else {
  for (i in issues) cat("- ", i, "\n", sep = "")
}
✅ No hard-check issues detected.

Generated from /mnt/c/Users/tpoongundranar/Documents/Urban/NCCS/nccs-data-core/data/logs/quality_990ez_2014.rds. See R/quality/post_checks.R for the validator implementation and docs/05-quality-gates.qmd for the gate definitions.