不写R包的分析师不是好全栈

REmap分享

    幻灯片保存

基本介绍

如何获取帮助

其他功能介绍

knitr

在knitr中使用REmap

1
2
3
4
5
remap.init()
## 绘制地图
p = remap(demoC)
## knitr展示
knitrREmap(p,local=F)

shiny

  • D:/Program Files/R/R-3.2.0/library/REmap/shiny/shinyBmap
1
2
3
library(REmap)
library(shiny)
runApp(system.file("shiny","shinyBmap", package = "REmap"))

个性化定制

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
options(browser =getOption("viewer"))
data(demoC)
## Test for Bmap
geoData = get_geo_position(unique(demoC[demoC==demoC]))
# this may take some time,be patient~
remapB(markLineData = demoC,geoData = geoData)
remapB(markLineData = demoC,geoData = geoData,
markLineTheme = markLineControl(color = 'red'))
data(demoC)
demoC$tooltip = sample(letters,nrow(demoC))
remapB(markLineData = demoC,geoData = geoData,
markLineTheme = markLineControl(color = 'red'))
newdata = data.frame(a = demoC[,2],
color = c(rep("blue",5),rep("red",5)))
remapB(markPointData = newdata,
color = "Blue",geoData = geoData)
newdata$symbolSize = 1:10
remapB(markPointData = newdata,
color = "Blue",geoData = geoData)
newdata$tooltip = paste(newdata$a,newdata$symbolSize,sep = ":")
remapB(markPointData = newdata,
color = "Blue",geoData = geoData)
data(chinaIphone)
## markLineControl
mapdata = chinaIphone
geoData = get_geo_position(unique(demoC[demoC==demoC]))
out = remapC(data = mapdata,
color = c("white","white"),
theme=get_theme("none","white","white","white",'white'),
markPointData = demoC[,2],
markPointTheme = markPointControl(
symbol = "image://http://lchiffon.github.io/reveal_slidify/pic/ghost.png",
symbolSize = 50,
effectType = 'bounce' ),
geoData = geoData)
out
page PV:  ・  site PV:  ・  site UV: