Skip to contents

FIPS - Get county names from county FIPS codes

Usage

fips2countyname(fips, includestate = c("ST", "Statename", "")[1])

Arguments

fips

vector of US Census FIPS codes for Counties (5 digits each). can be string or numeric, with or without leading zeroes.

includestate

can be ST, Statename, "", or TRUE to specify what if anything comes after county name and comma

Value

vector of county names, optionally with comma and 2-character abbreviation or full state name.

Details

NOTE THAT ISLAND AREAS WORK DIFFERENTLY SINCE THEIR FIPS ARE NOT QUITE LIKE COUNTY FIPS

  • FIRST 5 LETTERS OF FIPS ARE NOT THE UNIQUE "COUNTY" CODE IN Northern Mariana Islands

Examples

  # names of all counties in ME and NY
  fips2countyname(fips_counties_from_state_abbrev(c("ME", "NY")), includestate = "ST")
   fips_counties_from_state_abbrev(c("AK", "LA"))