dc_data | R Documentation |
A dataset containing population and median household income for DC census tracts from ACS 2020. This dataset includes spatial information for creating choropleth maps.
dc_data()
An sf object with the following variables:
Census tract identifier
Census tract name
Total population estimate from ACS
Median household income estimate from ACS
sf geometry column containing tract boundaries
U.S. Census Bureau, 2016-2020 American Community Survey 5-Year Estimates, retrieved using tidycensus package
data(dc_data)
# View the first few rows of non-geometric columns
print(dc_data[1:5, c("GEOID", "B01003_001", "B19013_001")])
# Create a basic map
if (interactive()) {
map <- create_bivariate_map(
data = dc_data,
var_1 = "B01003_001", # Total population
var_2 = "B19013_001" # Median household income
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.