Learn R Programming

vdmR (version 0.2.6)

vcmap: Generate choropleth map with interactive functions

Description

vcmap generates choropleth map with interactive functions.

Usage

vcmap(shapefile, data, mid, did, name, tag, path = tempdir(), fill = NULL,
  ggscale = NULL)

Arguments

shapefile

path to ESRI shapefile to draw choropleth map

data

data frame for default data set

mid

unique id in the attribute table of the shape file for linking the data frame data

did

unique id in the data frame data for linking the attribute table of the shape file

name

character for the name of the generated scatter plot

tag

character for the common name of a series of linked plots

path

character string of a directory for writing HTML and SVG files

fill

column name assigned to the color of polygons

ggscale

color scale generated by scale_fill_* function

Examples

Run this code
# NOT RUN {
data(vsfuk2012)
shp.path <- file.path(system.file(package="vdmR"), "etc/shapes/kitakyu2012.shp")
kk2012 <- dplyr::filter(vsfuk2012, CityCode<40110&CityCode>40100)
vcmap(shp.path, kk2012, "CityCode", "CityCode", "map1", "kk2012")
vlaunch(kk2012, "main", "kk2012", browse=FALSE)

# }

Run the code above in your browser using DataLab