knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

valuemap

CRAN Downloads

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

Installation

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')

How to Use?

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

Example 1

Quick & easy visualization of sf polygons with value
valuemap(seoul)

Example 2

Emphasize greater or equal to 20 polygons (>= 20, < 20 : two level only)
valuemap(seoul, legend.cut=c(20))

Example 3

Visualize without center number on polygons
valuemap(seoul, legend.cut=c(15,17,20), show.text=FALSE)

Example 4

Change color palette & center number on polygons text color, format & change background map
valuemap(
  seoul, map=leaflet::providers$Stamen.Toner, palette='YlOrRd',
  text.color='blue', text.format=function(x) paste(x,'EA')
)

Example 5

You can visualize based on plain data.frame with h3 address
data('seoul_h3')
seoul_h3
valuemap_h3(seoul_h3, legend.cut=1:6, show.text=FALSE)



Curycu/valuemap documentation built on Oct. 7, 2022, 2:36 a.m.