knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of valuemap is to save data analysts' efforts & time with pre-set sf polygon visualization.
You can also visualize with plain data.frame based on H3 addresses
To install the stable version from CRAN, simply run the following from an R console:
install.packages('valuemap')
To install the latest development builds directly from GitHub, run this instead:
if (!require('remotes')) install.packages('remotes') remotes::install_github('Curycu/valuemap')
Your data must have two columns named as name
& value
- name
column is used for mouse over popup information
- value
column is used for mouse over popup information & color polygons & display center number of polygons
library(valuemap) data('seoul') seoul
valuemap(seoul)
valuemap(seoul, legend.cut=c(20))
valuemap(seoul, legend.cut=c(15,17,20), show.text=FALSE)
valuemap( seoul, map=leaflet::providers$Stamen.Toner, palette='YlOrRd', text.color='blue', text.format=function(x) paste(x,'EA') )
data('seoul_h3') seoul_h3
valuemap_h3(seoul_h3, legend.cut=1:6, show.text=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.