FIPS - Identify what type of Census geography each FIPS code seems to be (block, county, etc.)
Source:R/FIPS_FUNCTIONS.R
      fipstype.RdFIPS - Identify what type of Census geography each FIPS code seems to be (block, county, etc.)
Details
NOTE: Does NOT check if fips is a real fips. For that, use fips_valid()
Note a number of length 11 is an ambiguous case this is able to resolve as either a complete tract fips or a blockgroup fips with a missing leading zero.
Examples
 fips_counties_from_statename("Delaware")
#> [1] "10001" "10003" "10005"
 fipstype(9001)
#> [1] "county"
 fipstype("10001")
#> [1] "county"
 
test_tract_missing0 =   4013116500   # 10 digits tract missing 0
test_tract_good     = "04013116500"  # 11 digits full tract includes leading 0 !!!!!!!!!!
test_bg_missing0    =   40131165002  # 11 digits blockgroup missing leading 0 !!!!!!!!!!
test_bg_good        = "040131165002" # 12 digits full blockgroup
fipstype(test_tract_missing0)
#> [1] "tract"
fipstype(test_tract_good)
#> [1] "tract"
fipstype(test_bg_missing0)
#> [1] "blockgroup"
fipstype(test_bg_good)
#> [1] "blockgroup"
fips_valid(test_tract_missing0)
#> [1] TRUE
fips_valid(test_bg_missing0)
#> [1] TRUE