Description Usage Arguments Details Examples
This function takes a dataframe and generates a local Shiny application for visualizing the results in a choropleth.
1 2 3 |
df |
The dataframe with column |
fill |
The name of the variable to show in the choropleth |
categories |
The name of the (optional) grouping variable on which to divide the data |
map |
The level at which to draw the map. Options are |
palette |
An RColorBrewer palette to use. Default is |
background |
One of |
cuts |
An optional vector specifying where to make the color breaks. Default cuts are the 20th, 40th, 60th, and 80th percentiles |
dir |
The directory in which to create the Shiny app. Defaults to
|
NOTE: The leaflet
R package must be installed.
1 2 3 | data(population_age, package = "noncensus")
shiny_choro(population_age, fill = "population", categories = "age_group",
map = "county", palette = "Purples", background = "Grey")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.