urban_influence_codes
Get ERS Urban Influence Codes - a county-level classification of every U.S. county by metropolitan status, size, and adjacency to metro and micro areas, published in the 1993, 2003, 2013, and 2024 vintages as a FIPS lookup table.
Examples
from openbb import obb
obb.usda.urban_influence_codes(provider='usda')
# Get the 2024 Urban Influence Codes for Alabama counties.
obb.usda.urban_influence_codes(vintage='2024', state='AL', provider='usda')
# Get the 2003 codes with population density for Wyoming.
obb.usda.urban_influence_codes(vintage='2003', state='WY', provider='usda')
# Get the 1993 vintage codes for the whole United States.
obb.usda.urban_influence_codes(vintage='1993', provider='usda')
Parameters
- standard
- usda
vintage: str | None
Default: 2024
Description
Classification vintage to retrieve; each vintage is a separate published file. The 2024 revision uses a nine-code scheme, 2013 and 2003 use a twelve-code scheme, and 1993 uses a different nine-code scheme. Valid vintages are:
2024, 2013, 2003, 1993
state: str | None
State to retrieve, as a two-letter code, scoping the rows to one state's counties. If None, every county in the vintage is returned. The published state set varies by vintage: the 2024 revision adds the American Samoa, Guam, Northern Mariana Islands, Puerto Rico, and U.S. Virgin Islands territories, 2013 and 2003 add Puerto Rico, and 1993 covers the states and the District of Columbia only.
Returns
results: UrbanInfluenceCodes
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- usda
fips: str
Five-digit county FIPS code, zero-padded.
state: str
Two-letter state or territory postal code of the county.
county_name: str
County or municipio name, as published.
urban_influence_code: str | None
Urban Influence Code of the county, as an ordinal string: one to nine for the 2024 and 1993 vintages, one to twelve for the 2013 and 2003 vintages.
description: str | None
Published description of the county's Urban Influence Code.
population: float | int | None
Published population count of the county; the 2020 census for the 2024 vintage, the 2010 census for 2013, and the 2000 census for the 2003 and 1993 vintages.
population_density: float | None
Published population density in persons per square mile, from the 2000 census. Populated only for the 2003 and 1993 vintages; the 2024 and 2013 files carry no density.