我正在尝试使用ggplot2绘制世界地图。以下是我到目前为止的情况:
library(ggplot2)
world <- map_data("world")
ggplot(aes(long, lat, group=group), data=world) + geom_polygon()
这很好用,很容易做到。不幸的是,世界地图数据似乎很旧。例如,新加坡和捷克共和国等国家失踪,而且还有像苏联这样的地区。 知道如何获得更新的世界地图数据吗?
sort( unique(world$region) ) [1] "Afghanistan" "Albania" "Algeria" [4] "American Samoa" "Andaman Islands" "Andorra" [7] "Angola" "Anguilla" "Antarctica" [10] "Antigua" "Aral Sea" "Argentina" [13] "Aruba" "Australia" "Austria" [16] "Azores" "Bahamas" "Bahrain" [19] "Bangladesh" "Barbados" "Barbuda" [22] "Belgium" "Belize" "Benin" [25] "Bhutan" "Black Sea" "Bolivia" [28] "Bonaire" "Botswana" "Brazil" [31] "Brunei" "Bulgaria" "Burkina Faso" [34] "Burundi" "California" "Cambodia" [37] "Cameroon" "Canada" "Canary Islands" [40] "Cape Verde" "Caspian Sea" "Cayman Islands" [43] "Central African Republic" "Chad" "Chagos Archipelago" [46] "Chile" "China" "Colombia" [49] "Comoros" "Congo" "Cook Islands" [52] "Costa Rica" "Cuba" "Curacao" [55] "Cyprus" "Czechoslovakia" "Denmark" [58] "Djibouti" "Dominica" "Dominican Republic" [61] "Ecuador" "Egypt" "El Salvador" [64] "Equatorial Guinea" "Ethiopia" "Falkland Islands" [67] "Fiji" "Finland" "France" [70] "French Guiana" "French Polynesia" "Gabon" [73] "Gambia" "Gaza Strip" "Germany" [76] "Ghana" "Great Bitter Lake" "Great Lakes" [79] "Greece" "Greenland" "Grenada" [82] "Guadeloupe" "Guatemala" "Guinea" [85] "Guinea-Bissau" "Guyana" "Haiti" [88] "Hawaii" "Honduras" "Hungary" [91] "Iceland" "India" "Indonesia" [94] "Iran" "Iraq" "Ireland" [97] "Irian Jaya" "Isle of Man" "Isle of Wight" [100] "Israel" "Italy" "Ivory Coast" [103] "Jamaica" "Japan" "Jordan" [106] "Kenya" "Kiribati" "Kuwait" [109] "Lacul Greaca" "Lake Albert" "Lake Fjerritslev" [112] "Lake Kariba" "Lake Malawi" "Lake Pasvikelv" [115] "Lake Tanganyika" "Lake Titicaca" "Lake Victoria" [118] "Laos" "Lebanon" "Lesotho" [121] "Liberia" "Libya" "Liechtenstein" [124] "Luxembourg" "Madagascar" "Madeira Islands" [127] "Malawi" "Malaysia" "Maldives" [130] "Mali" "Malta" "Marshall Islands" [133] "Martinique" "Maug Island" "Mauritania" [136] "Mauritius" "Mexico" "Micronesia" [139] "Monaco" "Mongolia" "Montserrat" [142] "Morocco" "Mozambique" "Myanmar" [145] "Namibia" "Nauru" "Nepal" [148] "Netherlands" "Neutral Zone" "Nevis" [151] "New Caledonia" "New Zealand" "Nicaragua" [154] "Niger" "Nigeria" "North Korea" [157] "Northern Mariana Islands" "Norway" "Oman" [160] "Pakistan" "Panama" "Papua New Guinea" [163] "Paracel Islands" "Paraguay" "Peru" [166] "Philippines" "Pitcairn Islands" "Poland" [169] "Portugal" "Puerto Rico" "Qatar" [172] "Romania" "Rwanda" "Saint Eustatius" [175] "Saint Kitts" "Saint Lucia" "Saint Vincent" [178] "Saint-Barthelemy" "Saint-Martin" "Samoa" [181] "San Marino" "Sao Tome and Principe" "Sardinia" [184] "Saudi Arabia" "Senegal" "Seychelles" [187] "Sicily" "Sierra Leone" "Sin Cowe Island" [190] "Solomon Islands" "Somalia" "Sonsorol Island" [193] "South Africa" "South Korea" "South Sandwich Islands" [196] "Spain" "Spratly Island" "Sri Lanka" [199] "Sudan" "Suriname" "Swaziland" [202] "Sweden" "Switzerland" "Syria" [205] "Tanzania" "Thailand" "Tobago" [208] "Togo" "Tokelau" "Tonga" [211] "Trinidad" "Tunisia" "Turkey" [214] "Turks and Caicos" "Tuvalu" "Uganda" [217] "UK" "United Arab Emirates" "Uruguay" [220] "USA" "USSR" "Vanuatu" [223] "Venezuela" "Vietnam" "Virgin Islands" [226] "Vislinskiy Zaliv" "Wales" "West Bank" [229] "Western Sahara" "Yemen" "Yugoslavia" [232] "Zaire" "Zambia" "Zimbabwe"
答案 0 :(得分:4)
您是否将其与mapdata中的数据库进行了比较?
如果不是更好,您可以使用Global Administration Database或NOAA的GSHHG database。
如果你需要处理shapefile的帮助,那么使用ggplot2的Spatial Analysis (here)就是一个很棒的例子。
答案 1 :(得分:2)
“地图”中的“世界”数据库最近(2015年)使用来自Natural Earth的数据进行了更新。截至version 3.0,地图是最新的。