unzip("data/ukr-border-crossings-090622-2.zip",exdir = "data/conflict")
Overview
Map of Ukraine
, data from Geodata.
Ukraine war data
- https://data.humdata.org/
library(sf)
library(tidyverse)
library(rgdal)
library(raster)
library(ggspatial)
Geodata
<- raster::getData('GADM', country = "UKR", level = 1)
ykr load("gadm36_UKR_1_sp.rds")
<-gadm36_UKR_1_sp %>%st_as_sf() df
::osm.types() rosm
quartz()
ggplot() +
annotation_map_tile(type = "osm") +
layer_spatial(df)
ggsave("base_map.png")
Extras:
<- ykr %>% # class sp
sf_data ::st_as_sf() %>%
sfst_transform(crs=4326)
<- readOGR("data/conflict")
ukr quartz()
%>%
ukr as.data.frame() %>%
::clean_names() %>%
janitorggplot(aes(long,lat,group=country))+
annotation_map_tile(type = "osm") +
geom_sf(data=sf_data,inherit.aes = F,fill=NA) +
geom_text(aes(label=name_eng),check_overlap = T)+
geom_point(aes(color=country),shape=21)+
coord_sf(crs=4326)