fips_codes: Dataset with FIPS codes for US states and counties

fips_codesR Documentation

Dataset with FIPS codes for US states and counties

Description

Built-in dataset for smart state and county lookup. To access the data directly, issue the command data(fips_codes).

  • county: County name, title-case

  • county_code: County code. (3-digit, 0-padded, character)

  • state: Upper-case abbreviation of state

  • state_code: State FIPS code (2-digit, 0-padded, character)

  • state_name: Title-case name of state

Usage

data(fips_codes)

Format

An object of class data.frame with 3256 rows and 5 columns.

Details

Dataset with FIPS codes for US states and counties

Built-in dataset for use with the lookup_code function. To access the data directly, issue the command data(fips_codes).

Note: this dataset includes FIPS codes for all counties that have appeared in the decennial Census or American Community Survey from 2010 to the present. This means that counties that have been renamed or absorbed into other geographic entities since 2010 remain in this dataset along with newly added or renamed counties.

If you need the FIPS codes and names for counties for a particular Census year, you can use the counties function from the tigris package and set the year parameter as required.


tidycensus documentation built on Oct. 18, 2024, 1:07 a.m.