sr_plot_choropleth_tracts | R Documentation |
Leaflet plot showing census tracts within a district and a fill color for the tracts based on data included in the parameters.
sr_plot_choropleth_tracts(
census_data_by_tract,
tract_shapefile,
school_location,
tool_tip_labels
)
census_data_by_tract |
Data frame with data by census tract that we want to plot. Must contain
a 'GEOID' column because this column is merged with the census tract shapefile ( |
tract_shapefile |
Shapefiles for the same census tracts as |
school_location |
A data frame containing the latitude and longitude of the school/s. The columns
for these two data points should be called 'latitude' and 'longitude'. This information
can be retreived from CCD school directories, which can be imported with |
tool_tip_labels |
Tool tips to use, as HTML. Example, which only shows the census tract name:
|
A leaflet choropleth map of census tracts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.