ggChoropleth: Draw an interactive choropleth map

Description Usage Arguments Examples

Description

Draw an interactive choropleth map

Usage

1
2
3
4
ggChoropleth(data, map, fillvar = "총인구_명", colors = c("white",
  "orange", "red"), palette = NULL, map_id = "code", tooltip = NULL,
  facetvar = NULL, subarea = NULL, title = "", digits = 1,
  interactive = FALSE, ...)

Arguments

data

a data.frame

map

a map maybe a result of map_data()

fillvar

a column name assigned to a fill variable

colors

A vector of colours used as a parameter of scale_fill_gradientn()

palette

A palette name used for discrete fill var

map_id

a column name used as an id

tooltip

a column name included in a tooltip

facetvar

a column name assigned to a facet variable

subarea

a name of subarea

title

A title

digits

An integer indicating the number of decimal places

interactive

Logical. If positive an interactive map will be made

...

other arguments passed on to geom_map_interactive

Examples

1
2
3
4
5
6
7
8
crimes <- data.frame(state = tolower(rownames(USArrests)), USArrests)
require(ggplot2)
states_map <- map_data("state")
ggChoropleth(crimes,states_map,fill="Murder",map_id="state",tooltip="state",interactive=TRUE)
#ggChoropleth(data,kormap1,fillvar="총인구_명",tooltip="name",interactive=TRUE)
#ggChoropleth(data2,kormap2,fillvar="총인구_명",tooltip="name",interactive=TRUE)
#ggChoropleth(data3,kormap3,fillvar="총인구_명",tooltip="name",interactive=TRUE)
#ggChoropleth(data3,kormap3,fillvar="총인구_명",subarea=c("전라","광주"),interactive=TRUE)

cardiomoon/moonBook2 documentation built on May 13, 2019, 12:40 p.m.