Description Usage Arguments Value
View source: R/cism_map_interactive.R
Generate simple interactive maps of variables. Meant to show one of 3 different kinds of maps:
1. A simple point map with no coloring
2. A point map with coloring by a categorical variable
3. A point map with coloring by a numeric variable
This function is identical in input to cism_map
, in all ways but three:
1. Rather than returning a ggplot2 plot, it returns a leaflet html widget.
2. It takes a spdf (regular SpatialPolygonsDataFrame) rather than a fspdf (fortified one).
3. It takes an optional popup argument.
1 2 3 |
lng |
A numeric vector of longitude coordinates |
lat |
A numeric vector of latitude coordinates |
x |
A variable to be plotted. If |
popup |
A character vector, of identical lenggth to |
spdf |
A spatial polygons dataframe |
type |
Either "numeric" or "factor". If |
make_simple |
Whether to simplify a categorical variable to fewer than |
n_simple |
The number of categories to simplify |
A plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.