Download shapefiles based on FIPS codes of States, Counties, Cities/CDPs, Tracts, or Blockgroups
Source:R/shapes_from_fips.R
shapes_from_fips.Rd
Download shapefiles based on FIPS codes of States, Counties, Cities/CDPs, Tracts, or Blockgroups
Arguments
- fips
vector of one or more Census FIPS codes such as from
name2fips()
Examples
fipslist = list(
statefips = name2fips(c('DE', 'RI')),
countyfips = fips_counties_from_state_abbrev(c('DE')),
cityfips = name2fips(c('chelsea,MA', 'st. john the baptist parish, LA')),
tractfips = substr(blockgroupstats$bgfips[300:301], 1, 12),
bgfips = blockgroupstats$bgfips[300:301]
)
shp <- list()
if (FALSE) { # \dontrun{
for (i in seq_along(fipslist)) {
shp[[i]] <- shapes_from_fips(fipslist[[i]])
print(shp[[i]])
# mapfast(shp[[i]])
}
} # }