knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
USpopcenters contains data on the centers of population (also known as "centroids") of census areas in the United States.
Centers of population are according to the 2020, 2010, and 2000 decennial censuses. They are given via longitude and latitude coordinates and are available at the level of state, county, tract, and block group. The mean and median centers of population of the entire US according to the 2020 and 2010 censuses are also included in this package.
All these data are available in this package in the form of tibble
s. Each year/geography combination has its own data set, and each data set also includes a column with each area's total population. The tibble
s are indexed by GEOID/FIPS code, and some of the state-level and county-level tables also contain state and county names.
All applicable tables contain data from the fifty states and the District of Columbia. Non-state island territories' data has inconsistent availability from dataset to dataset. See each tibble
's documentation page to see what each one actually contains.
This package was created primarily because the US Census Bureau has not made these data available via API. They were downloaded manually from the Census Bureau website at https://www.census.gov/geographies/reference-files/time-series/geo/centers-population.html.
You can install the released version of USpopcenters from CRAN with:
install.packages("USpopcenters")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("NikKrieger/USpopcenters")
County-level centers of population from the 2010 US census:
library(tibble)
library(USpopcenters)
county2010
https://www.census.gov/data/developers/about/terms-of-service.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.