base_map: Plot census tract boundaries and demographic data on a...

View source: R/leaflet.R

base_mapR Documentation

Plot census tract boundaries and demographic data on a leaflet map

Description

Plot census tract boundaries and demographic data on a leaflet map

Usage

base_map()

add_people(lmap, year_id, people_data)

add_tracts(lmap, year_id, tract_data)

Arguments

lmap

A leaflet map object

year_id

A four-digit year

people_data

A dataframe containing locations to place dots representing people, output of create_dots function

tract_data

A dataframe containing shapefiles to plot census tract boundaries for each year, output of get_data_wide function

Examples

## Not run: 
add_people(base_map(), 2000, create_dots(filter_data_wide(get_data_wide(), "New York", "Madison")))

## End(Not run)
## Not run: 
add_tracts(base_map(), 1960, filter_data_wide(get_data_wide(), "New York", "Madison"))

## End(Not run)

rporta23/censusviz documentation built on March 4, 2024, 10:01 p.m.