Get population data for Kansas City
get_kc_pop.Rd
Download population data for Kansas City from the decennial census or the American Community Survey (ACS). Summary levels are place, county, census tract, census block group, census block (decennial census only), and ZIP code tabulation area (ZCTA). Data sets are downloaded from the US Census Bureau using the tidycensus package.
Arguments
- dataset
The data set to download. Passed to the
dataset
argument intidycensus::load_variables()
and eithersurvey
intidycensus::get_acs()
orsumfile
intidycensus::get_decennial()
.- geo
The geography (summary level) of the data set to download.
- year
The year of the data set to download.
- vars
A vector of variable names or a regular expression to match variable names for download.
- var_match
The type of matching to perform on variable names.
"fixed"
matches the values invars
exactly, and"regex"
matches to a regular expression pattern invars
.- geoid
An optional vector of GEOIDs to supply if the relevant spatial data sets are unavailable in kcData.
- ...
Additional arguments passed to
tidycensus::get_acs()
ortidycensus::get_decennial()
.
Details
Data sets for geographies other than "place" are filtered for geographic units that intersect with Kansas City. These geographic units are determined by the shapefile downloaded for the specified year. If no shapefile has been downloaded for that year, an error is returned.
Additional resources
Census Reporter (ACS tables and variables reference)