convert_fips_to_names: convert fips codes to names of a geographies

Description Usage Arguments Value Examples

View source: R/convert_fips_and_names.R

Description

convert fips codes to names of a geographies

Usage

1
2
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

1
2
3
4
5
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 May 5, 2019, 6:13 p.m.