Learn R Programming

covidcast (version 0.5.2)

state_fips_to_name: Get state, county or metropolitan area names from FIPS or CBSA codes

Description

Look up county or metropolitan area names by FIPS or CBSA codes. Looking up FIPS code is done with the first 2 numbers (state) or 5 numbers (county) and therefore can be called with longer FIPS codes.

Usage

state_fips_to_name(code)

county_fips_to_name(code)

cbsa_to_name(code)

Value

A vector of state, county or metro names.

Arguments

code

Vector of FIPS or CBSA codes to look up.

See Also

name_to_fips(), name_to_cbsa()

Examples

Run this code
state_fips_to_name("42")
state_fips_to_name("42003") # same as previous
county_fips_to_name("42003")
county_fips_to_name("42000") # the county "000" returns the state name
cbsa_to_name("38300")

Run the code above in your browser using DataLab