Nason commited on
Commit
d74af2e
·
verified ·
1 Parent(s): f57d363

Clarify dataset units, query setup and snapshot caveats

Browse files
Files changed (1) hide show
  1. README.md +14 -6
README.md CHANGED
@@ -25,23 +25,31 @@ tags: [campaign-finance, fec, elections, duckdb]
25
  | `individual_contributions` | 282,086,037 | 22 |
26
  | `operating_expenditures` | 19,760,627 | 26 |
27
 
28
- ## Query
29
 
30
  ```sql
31
  INSTALL httpfs; LOAD httpfs;
32
- SET memory_limit='256MiB'; SET threads=1;
33
- ATTACH 'https://huggingface.co/datasets/Nason/fec-database/resolve/main/fec.duckdb' AS fec (READ_ONLY);
34
  SELECT CAND_ID,CAND_NAME FROM fec.candidates WHERE cycle=2026 AND CAND_OFFICE='H' ORDER BY CAND_ID LIMIT 5;
35
  ```
36
 
37
- R: `install.packages("datapond")` from [CRAN](https://cran.r-project.org/package=datapond), registry id `fec`. Remote queries may read large ranges; set resource limits before attachment and select narrow columns/filters.
 
 
38
 
39
  ## Interpretation and source quality
40
 
 
 
 
 
41
  All 37 historical changes have documented parsing/upstream explanations. A strict double-quote CSV interpretation removes balanced wrapper quotes from fourteen 2022 fields (twelve RETIRED occupations, one POLICY occupation, one NOT EMPLOYED CURRENTLY employer). Thirteen separate malformed literal-quote recoveries retain literal quotes. FEC's field description does not specify quote escaping; this is a disclosed interpretation choice, not an official rule. Eight malformed nonblank dates in 2016/2018 remain NULL, with raw tokens/identifiers retained in the provenance. No guessed date repair was applied.
42
 
43
  A later source added committee **C00962951, CARMELA CONROY VICTORY FUND**, after the validated cutoff. It is outside this frozen snapshot. Source outlier dates, inconsistent amounts and prank filings remain; inspect unusual records against filings. Blank fields become NULL; DOUBLE amounts preserve the existing floating-point representation. For net contributions, account for memo rows, conduit transfers and refunds; avoid join fan-out.
44
 
45
- The complete typed-row multiset audits, source hash/CRC checks, exact small-table comparisons and metadata verification are documented in [provenance](sources-2026-10-18.json). Fingerprints preserve multiplicity but are not a claim of hash injectivity. [Dictionary](DICTIONARY.md); [source repository](https://github.com/ian-nason/fec-database). The bounded-loader source patch is merged in [source PR #1](https://github.com/ian-nason/fec-database/pull/1). That source merge does not replace this frozen data artifact.
 
 
46
 
47
- Underlying records: U.S. Federal Election Commission. Build code: MIT. Candidate SHA-256: `6227fb7c162c3d48a10bb677d2bfd74b21c1acba3aff68eafac2afc49d57a2d4`.
 
25
  | `individual_contributions` | 282,086,037 | 22 |
26
  | `operating_expenditures` | 19,760,627 | 26 |
27
 
28
+ ## Quick start
29
 
30
  ```sql
31
  INSTALL httpfs; LOAD httpfs;
32
+ SET memory_limit='128MiB'; SET threads=1; SET max_temp_directory_size='0B';
33
+ ATTACH 'https://huggingface.co/datasets/Nason/fec-database/resolve/aee3ae8b28685104765fb1b1e3ebc2588cb907a3/fec.duckdb' AS fec (READ_ONLY);
34
  SELECT CAND_ID,CAND_NAME FROM fec.candidates WHERE cycle=2026 AND CAND_OFFICE='H' ORDER BY CAND_ID LIMIT 5;
35
  ```
36
 
37
+ Install/upgrade Python with `python -m pip install --upgrade datapond` (the examples use 0.1.5), or install released R datapond from [CRAN](https://cran.r-project.org/package=datapond) with `install.packages("datapond")`. R 0.1.1 remains a separate development version. The catalog ID is `fec`.
38
+
39
+ The file occupies 19.69 GiB on disk; that is not a RAM estimate. Remote execution can still transfer much of it. Contribution views aggregate large tables, so a final `LIMIT` does not guarantee a small scan. The SQL above sets limits before attachment; leave process and disk headroom, and expect larger queries to fail when spill is disabled.
40
 
41
  ## Interpretation and source quality
42
 
43
+ Transaction rows are not unique donors or a complete census of donations. The [FEC individual-contributions file](https://www.fec.gov/campaign-finance-data/contributions-individuals-file-description/) includes a subset of reported itemized contributions under rules that changed over time. Entity IDs recur across cycles: join with `cycle` and aggregate child transactions before combining them.
44
+
45
+ `v_candidate_totals` and `v_top_donors` net specified refund types. `v_daily_donations` instead excludes refunds and reports positive non-refund transactions; `v_pac_to_candidate` selects direct 24K/24Z contributions. Their outputs are different measures.
46
+
47
  All 37 historical changes have documented parsing/upstream explanations. A strict double-quote CSV interpretation removes balanced wrapper quotes from fourteen 2022 fields (twelve RETIRED occupations, one POLICY occupation, one NOT EMPLOYED CURRENTLY employer). Thirteen separate malformed literal-quote recoveries retain literal quotes. FEC's field description does not specify quote escaping; this is a disclosed interpretation choice, not an official rule. Eight malformed nonblank dates in 2016/2018 remain NULL, with raw tokens/identifiers retained in the provenance. No guessed date repair was applied.
48
 
49
  A later source added committee **C00962951, CARMELA CONROY VICTORY FUND**, after the validated cutoff. It is outside this frozen snapshot. Source outlier dates, inconsistent amounts and prank filings remain; inspect unusual records against filings. Blank fields become NULL; DOUBLE amounts preserve the existing floating-point representation. For net contributions, account for memo rows, conduit transfers and refunds; avoid join fan-out.
50
 
51
+ The complete typed-row multiset audits, source hash/CRC checks, exact small-table comparisons and metadata verification are documented in [provenance](https://huggingface.co/datasets/Nason/fec-database/blob/aee3ae8b28685104765fb1b1e3ebc2588cb907a3/sources-2026-10-18.json). Fingerprints preserve multiplicity but are not a claim of hash injectivity. [Dictionary](https://huggingface.co/datasets/Nason/fec-database/blob/aee3ae8b28685104765fb1b1e3ebc2588cb907a3/DICTIONARY.md); [source repository](https://github.com/ian-nason/fec-database). The bounded-loader source patch is merged in [source PR #1](https://github.com/ian-nason/fec-database/pull/1). That source merge does not replace this frozen data artifact.
52
+
53
+ Underlying records: U.S. Federal Election Commission. Build code: MIT. Published artifact: 21,140,877,312 bytes. SHA-256: `6227fb7c162c3d48a10bb677d2bfd74b21c1acba3aff68eafac2afc49d57a2d4`.
54
 
55
+ The release dictionary retains its prepublication “candidate” heading and historical audit terminology; it describes the published hash above. Its ID join hints are shorthand: include `cycle` and check child-table multiplicity as described here.