pycensus.census.countries.usa.voting_districts¶
Official Census Bureau voting districts (VTD) for the three vintages: 2000, 2010 and 2020.
vintage_for_election(year) returns the vintage in force for an election: 2020 for elections from 2020 on, 2010 for 2012-2018, 2000 for
2000-2010 (the 2010 Census VTDs were released in 2011, after the 2010 election). load_vtd(state_fips, vintage) returns the state's
voting districts (EPSG:4326, GEOID = state + county + VTD code). Vintage 2020 comes from the TIGER 2020 state files (via pygris);
2000 and 2010 are the county files tl_2010_<county>_vtd00 / vtd10 of TIGER 2010 (Census Bureau, www2.census.gov/geo/tiger/TIGER2010/VTD).
States that did not submit voting districts (e.g. California, Hawaii and Oregon in 2020) return None.
vintage_for_election(year)
¶
Census voting-district vintage matching an election year (2020, 2010 or 2000).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
Election year. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The vintage. |
load_vtd(state_fips, vintage, cache_dir=None)
¶
Census voting districts (VTDs) of one state and vintage, cached; None when they cannot be downloaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_fips
|
str
|
2-digit state FIPS. |
required |
vintage
|
int
|
2000, 2010 or 2020. |
required |
cache_dir
|
Optional[str]
|
Cache folder; |
None
|
Returns:
| Type | Description |
|---|---|
Optional[GeoDataFrame]
|
GeoDataFrame, or None. |