valuemap_h3 {valuemap} | R Documentation |
Making choropleth map with data.frame of h3 address
Description
This function make a leaflet object. You can easily visualize your data.frame with h3 address "name" column based on "value" column. You have options : background map (= map) color legend boundary values (= legend.cut) color palette for color legend (= palette) showing "value" number on center of polygons (= show.text) color for "value" number text on center of polygons (= text.color)
Usage
valuemap_h3(
data,
map = providers$OpenStreetMap,
legend.cut = NULL,
palette = "Blues",
show.text = TRUE,
text.color = "black",
text.format = function(x) x
)
Arguments
data |
A data.frame object who has "h3_addr" & "value" columns ("value" column must be numeric type) |
map |
A map name of leaflet::providers |
legend.cut |
A numeric vector which means color legend boundary values |
palette |
A color name of RColorBrewer palettes |
show.text |
A boolean who determines showing "value" number on center of polygons |
text.color |
A color name for "value" number text on center of polygons |
text.format |
A format function for "value" number text on center of polygons |
Value
A leaflet object.
Examples
if (interactive()){
valuemap_h3(seoul_h3, legend.cut=1:6, show.text=FALSE)
}