dc_data {bivariateLeaflet} | R Documentation |
Washington DC Census Tract Data
Description
A dataset containing population and median household income for DC census tracts from ACS 2020. This dataset includes spatial information for creating choropleth maps.
Usage
dc_data()
Format
An sf object with the following variables:
- GEOID
Census tract identifier
- NAME
Census tract name
- B01003_001
Total population estimate from ACS
- B19013_001
Median household income estimate from ACS
- geometry
sf geometry column containing tract boundaries
Source
U.S. Census Bureau, 2016-2020 American Community Survey 5-Year Estimates, retrieved using tidycensus package
Examples
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
)
}
[Package bivariateLeaflet version 0.1.0 Index]