Learn R Programming

bivariateLeaflet (version 0.1.0)

dc_data: 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()

Arguments

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

Examples

Run this code
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
  )
}

Run the code above in your browser using DataLab