if(!requireNamespace('remotes',quietly = T)) install.packages('remotes',update=F)
remotes::install_github('biomarble/onekeyMap',dependencies=T,upgrade = F)
if(!requireNamespace('remotes',quietly = T)) install.packages('remotes',update=F)
if(!requireNamespace('onekeyMap',quietly = T)){
tryCatch({
remotes::install_github('biomarble/onekeyMap',dependencies=T,upgrade = F)
},error = function(e){
remotes::install_url('https://download.fastgit.org/biomarble/onekeyMap/archive/main.zip',dependencies = T,upgrade = F)
})
}
Thanks to fastgit - the mirror speeder for GitHub.com.
|Function| Description | Demo |
|-|-| -|
|mapChina_fill_province| color China map according to data in province scale | |
|mapChina_point| put dots into China map |
|
|mapChina_pie_province| put pie chart into China map |
|
|mapWorld_fill| color world map according to data in country scale |
|
|mapWorld_point| put dots into world map |
|
heatFile=system.file('demoChina','Province.heat.csv',package = 'onekeyMap')
data=read.csv(heatFile,header=T,check.names = F,na.strings = "-",encoding = 'UTF-8')
map=mapChina_fill_province(data,label="Production",title="2019 Productions of Cotton",colorTrans="log10")
png('chinaMap1.png',w=3000,h=2000,res=300)
plot(map)
dev.off()
Report bugs/suggestions to Issues
扫码关注微信公众号,不定期发布培训课程:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.