Description Usage Arguments Examples
Draw an interactive choropleth map
1 2 3 4 |
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 |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.