library(rnaturalearth)
library(sf)
library(tmap)
ita = ne_countries(country = "Italy") # United States borders
class(ita)
ita_sf = st_as_sf(ita)
cita_sf = st_as_sf(cita, coords = c('long', 'lat'), crs = st_crs(ita_sf)$proj4string)
tm_shape(ita_sf) +
tm_fill() +
tm_borders() +
tm_shape(cita_sf) +
tm_dots()
Карта
![italy map with points/dots added](https://i.stack.imgur.com/FRHxC.png)
Данные
cita <- data.frame(
lat = c(41.88333, 41.88333, 44.95971, 45.16110, 45.16110, 45.16110, 45.16110,
45.16110, 45.16110, 45.16110, 45.16110, 45.16110, 45.16110, 45.16110,
45.16110, 45.16110, 45.16110, 45.29775, 45.29775, 45.13333, 45.16110,
45.29775, 45.29775, 45.29775, 45.29775, 45.29775, 45.18885, 45.19092),
long = c(12.500000, 12.500000, 10.689220, 9.701432, 9.701432, 9.701432,
9.701432, 9.701432, 9.701432, 9.701432, 9.701432, 9.701432,
9.701432, 9.701432, 9.701432, 9.701432, 9.701432, 11.658382,
11.658382, 10.033333, 9.701432, 11.658382, 11.658382, 11.658382,
11.658382, 11.658382, 9.690454, 9.726434)
)