rural_urban_commuting_area_codes
Get ERS rural-urban commuting area (RUCA) codes - primary and secondary RUCA classification codes and descriptions for U.S. census tracts and ZIP codes across the 1990, 2000, 2010, and 2020 vintages, as a per-area lookup table scoped by state.
Examples
from openbb import obb
obb.usda.rural_urban_commuting_area_codes(provider='usda')
# Get the 2020 census-tract RUCA codes for Delaware.
obb.usda.rural_urban_commuting_area_codes(table='tract_2020', state='DE', provider='usda')
# Get the 2010 ZIP-code RUCA codes for Vermont.
obb.usda.rural_urban_commuting_area_codes(table='zip_2010', state='VT', provider='usda')
# Get the 1990 census-tract RUCA codes for Wyoming.
obb.usda.rural_urban_commuting_area_codes(table='tract_1990', state='WY', provider='usda')
Parameters
- standard
- usda
table: str | None
Default: tract_2020
Description
Vintage and geography of the code set to retrieve, as one lookup table per census-tract or ZIP-code vintage. Valid tables are:
tract_2020, tract_2010, tract_2000, tract_1990, zip_2020, zip_2010
state: str | None
Default: DE
Two-letter state or territory code to scope the lookup to, e.g. 'DE'. If None, every area in the table is returned, which is tens of thousands of rows. The set of states differs by table.
Returns
results: RuralUrbanCommutingAreaCodes
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
area_fips: str
Geographic identifier of the row: the 11-digit census tract FIPS code for a tract table, or the 5-digit ZIP code for a ZIP table.
state: str | None
Two-letter state or territory code of the area.
county: str | None
County of the census tract, for the tract tables that publish it. Not published for the ZIP or 1990 tables.
area_name: str | None
Name of the area: the census-tract name for the 2020 tract table or the post-office name for the 2020 ZIP table. Not published for the other tables.
area_type: str | None
Type of the ZIP record, 'ZIP Code Area' or a post office or large-volume customer, for the ZIP tables. Not published for the tract tables.
primary_ruca: str | None
Primary RUCA code, a whole number 1 to 10 or 99, classifying the area by its primary commuting flow.
primary_ruca_description: str | None
Description of the primary RUCA code.
secondary_ruca: str | None
Secondary RUCA code, the primary code optionally extended with a decimal sub-code for a secondary commuting flow.
secondary_ruca_description: str | None
Description of the secondary RUCA code.
population: int | None
Population of the area in the vintage year, for the tract tables that publish it. Not published for the ZIP tables.
land_area: float | None
Land area of the tract in square miles, for the tract tables that publish it. Not published for the 2000 or ZIP tables.
population_density: float | None
Population per square mile of the tract, for the 2020 and 2010 tract tables that publish it.