R tmap打印意大利
R tmap print Italy
我想画一张地图。我需要发送的国家是意大利,我使用这个代码:
library(sf)
library(raster)
library(dplyr)
library(spData)
library(spDataLarge)
library(tmap) # for static and interactive maps
library(leaflet) # for interactive maps
library(ggplot2) # tidyverse data visualization package
map = tm_shape(it) + tm_fill() + tm_borders()
print(map)
如果我写 nz 或 world works 但其他国家不写,为什么?我怎样才能打印意大利语?
存在另一个代码?我找不到任何有用的东西。
您可以像这样在 tmap 中下载、阅读和绘制意大利的区域地图:
library(tmap)
library(sf)
url <- "https://geodata.ucdavis.edu/gadm/gadm4.0/shp/gadm40_ITA_shp.zip"
download.file(url, "../italia.zip")
unzip("../italia.zip", exdir = "italia")
It <- st_read("../italia/gadm40_ITA_2.shp")
map <- tm_shape(It) + tm_fill("NAME_1") + tm_borders()
print(map)
我想画一张地图。我需要发送的国家是意大利,我使用这个代码:
library(sf)
library(raster)
library(dplyr)
library(spData)
library(spDataLarge)
library(tmap) # for static and interactive maps
library(leaflet) # for interactive maps
library(ggplot2) # tidyverse data visualization package
map = tm_shape(it) + tm_fill() + tm_borders()
print(map)
如果我写 nz 或 world works 但其他国家不写,为什么?我怎样才能打印意大利语? 存在另一个代码?我找不到任何有用的东西。
您可以像这样在 tmap 中下载、阅读和绘制意大利的区域地图:
library(tmap)
library(sf)
url <- "https://geodata.ucdavis.edu/gadm/gadm4.0/shp/gadm40_ITA_shp.zip"
download.file(url, "../italia.zip")
unzip("../italia.zip", exdir = "italia")
It <- st_read("../italia/gadm40_ITA_2.shp")
map <- tm_shape(It) + tm_fill("NAME_1") + tm_borders()
print(map)