作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在国家级别绘制 map 有很多解决方案,但就我而言,我想在大陆级别打印统计数据。
我唯一想到的是使用国家级 map 并使用每个大陆的国家列表,但我想知道这种 map 是否有任何简单的解决方案。为了实现我的想法,它会是这样的:
## produce the world map
map()
## list of countries per continent
SA <- c("argentina", "bolivia", "brazil", "chile", "colombia", "ecuador", "guyana", "paraguay", "peru", "suriname", "uruguay", "venezuela")
map(regions = SA, fill=TRUE, add=TRUE)
最佳答案
rworldmap
具有将数据绘制或聚合到区域级别(包括大陆)的功能。
一个简单的开始,应该产生下面的情节:
library(rworldmap)
#get coarse resolution world from rworldmap
sPDF <- getMap()
#mapCountries using the 'continent' attribute
mapCountryData(sPDF, nameColumnToPlot='continent')
mapCountryData(sPDF, nameColumnToPlot='REGION')
?mapByRegion
关于r - 如何使用 R 绘制大陆 map ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20146809/
让我们假设板块构造是错误的,我们的地球随着时间的推移而膨胀,大陆是曾经覆盖一个较小行星整个表面的地 shell 的残余物,海底被挤压出地幔,这是膨胀的一种表现。 http://earthexpansi
有没有办法找到由多个多边形对象组成的国家/大陆的中心(例如美国、加拿大,除了主要陆地部分外还有一个岛屿)?我尝试使用 leaflet 的 Layer.getCenter() 甚至 Layer.getB
我是一名优秀的程序员,十分优秀!