Skip to content

pycensus.census.countries.usa.elections_precinct.unofficial.nyt_direct

NYT 2024 precinct polygons WITH the NYT's own precinct votes -- UNOFFICIAL, validated at county level against MEDSL.

Used only for a state where the exact-count join of nyt_medsl fails (the two compilations split a precinct's votes differently, so precinct counts do not agree) but the NYT precinct totals still reproduce MEDSL's independent county results: across the state the summed county deviation of total votes is at most MAX_TOTAL_DEV and of Democratic votes at most MAX_DEM_DEV. The precinct votes are then scaled county by county to the MEDSL county totals (so every county keeps the MEDSL total). The geometry keeps the NYT resolution (precincts); the precinct split of votes inside a county is the NYT's, not cross-validated.

check(st, cache_dir=None)

NYT precinct votes against the MEDSL county totals of a state.

Parameters:

Name Type Description Default
st str

State abbreviation (lower case).

required
cache_dir

Cache folder; None = the pycensus cache.

None

Returns:

Type Description

(NYT polygons, comparison, total deviation, Democratic deviation).

check_fec(st, cache_dir=None)

NYT polygons+votes vs the FEC's official state totals: returns (frame, total deviation, Democratic deviation).

Parameters:

Name Type Description Default
st str

State abbreviation (lower case).

required
cache_dir

Cache folder; None = the pycensus cache.

None

load(state_fips, cache_dir=None)

NYT 2024 precinct polygons and votes when they agree with MEDSL (else with the FEC totals), scaled to the official totals.

Parameters:

Name Type Description Default
state_fips str

2-digit state FIPS.

required
cache_dir

Cache folder; None = the pycensus cache.

None

Returns:

Type Description

Precinct polygons with votes.