convert_fips_to_names: convert fips codes to names of a geographies

View source: R/convert_fips_and_names.R

convert_fips_to_namesR Documentation

convert fips codes to names of a geographies

Description

convert fips codes to names of a geographies

Usage

convert_fips_to_names(
  FIPs,
  states = NULL,
  geo_header = "STATE",
  in_states = NULL
)

Arguments

FIPs

string vector of fips code such as c("021", "002")

states

string vector of state abbreviations having same length as FIPs

geo_header

string, taking values of "STATE", "COUNTY", "PLACE", "COUSUB" or "CBSA".

in_states

which states are these FIPs generated from. Use state abbrevations or "US" for national. Vector of unique states.

Value

vector of names corresponding to FIPs and states

Examples

aaa <- convert_fips_to_names(c("11", "44"))
# [1] "DC" "RI"

bbb <- convert_fips_to_names(c("001", "013"), states = c("RI", "MA"), geo_header = "COUNTY")
# [1] "Bristol County" "Hampden County"



GL-Li/totalcensus documentation built on Jan. 30, 2024, 9:07 p.m.