remapC: Create a choropleth map object

Description Usage Arguments Details Value Author(s) Examples

View source: R/remapC.R

Description

remapC uses a data frame create a remap object which can be used by plot to see the map by browser

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
remapC(data,
       maptype = 'china',
      markLineData = NULL,
      markPointData = NULL,
      color = c('#1e90ff','#f0ffff'),
      theme = get_theme("Bright"),
      title = "",
      subtitle = "",
      markLineTheme = markLineControl(),
      markPointTheme = markPointControl(),
      geoData = NA,
      mindata = NA,
      maxdata = NA)

Arguments

data

a data frame including place names and values

maptype

the type of the map. For example,'china', 'world' or other names of province in China.

markLineData

data for mark line

markPointData

data for mark point

color

vector of the color, if the length of color is 1, white will be added to the color.

theme

a list object created by get_theme,control the color of the map.

title

a character string of the title

subtitle

a character string of the subtitle

markLineTheme

theme for mark line

geoData

geoData for markLine and markPoint format is similar as get_geo_position()

mindata

mindata for legend

maxdata

maxdata for legend

markLineTheme

theme for mark point

Details

mapdata should be a dataframe which including two columns, the first column is the names of places, second column is value.

Value

An remap object

Author(s)

Chiffon <http://lchiffon.github.io>

Examples

1
2
3
4
5
6
7
8
9
data = data.frame(country = mapNames("world"),
                   value = 5*sample(178)+200)
head(data)
out = remapC(data,maptype = "world",color = 'skyblue')
plot(out)

remapC(chinaIphone,
        markLineData = demoC,
        markPointData = demoC[,2])

Lchiffon/REmap documentation built on Dec. 14, 2019, 11:43 p.m.