/** * @copyright Sister Software. * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Pull a state's Census 2020 P.L. 94-171 redistricting counts (table P2 — Hispanic-or-Latino by * race, per block) into the `pl_block` table of a TIGER {@link DatabaseClient} DB, keyed on the * same 15-char block `GEOID` as {@link fetchTIGER}'s `tabblock20`. Join the two for block-level * race + geometry (e.g. a dot-density map). * * Keyless public data. The per-state ZIP holds a pipe-delimited geographic header * (`geo.pl`) and three data segments; segment 1 (`00001.pl`) carries P1 + P2. We * join the header (filtered to SUMLEV 750 = block) to segment 1 by LOGRECNO. Field offsets are * fixed by the 2020 P.L. layout (verified against the real files). * * https://www2.census.gov/programs-surveys/decennial/2020/data/01-Redistricting_File--PL_94-171/ */ export interface FetchRedistrictingOptions { /** * Two-digit state FIPS, e.g. `"06"`. */ stateFIPS: string; /** * Decennial vintage. Default 2020 (the only P.L. 94-171 release this parses). */ vintage?: number; /** * Output SQLite path. Default `/tiger/tiger.db` (same DB as `fetchTIGER`). */ outPath?: string; /** * Download cache + default output root. */ dataRoot?: string; /** * Optional three-digit county FIPS filter, e.g. `"059"`. */ county?: string; /** * Rows per insert. Default 2000. */ batchSize?: number; } export type FetchRedistrictingEvent = { phase: "download"; file: string; cached: boolean; } | { phase: "extract"; file: string; } | { phase: "header"; blocks: number; } | { phase: "load"; inserted: number; total: number; }; export interface FetchRedistrictingResult { outPath: string; table: string; inserted: number; } /** * Fetch one state's P.L. 94-171 block race counts into `pl_block`. Yields progress; returns the tally. */ export declare function fetchRedistricting(options: FetchRedistrictingOptions): AsyncGenerator; //# sourceMappingURL=redistricting.d.ts.map