I am trying to draw some specific countries map such as, Bangladesh, Bhutan etc. with its district/cities in R. As an example, I can draw US map using the follo
You can download shapefile of any country from the following website https://www.diva-gis.org/gdata Then read and plot them in R using following code
library(sf)
library(ggplot2)
library(rgdal)
library(rgeos)
#Reading the shapefiles
sf <- st_read(dsn="C:\\Users\\nn\\Desktop\\BGD_adm", layer="BGD_adm2")
shape <- readOGR(dsn="C:\\Users\\nn\\Desktop\\BGD_adm", layer="BGD_adm2")
#To view the attributes
head(shape@data)
summary(sf)
#Plotting the shapefile
plot(shape)
plot(sf)
#Plotting the districts only
plot(sf["NAME_2"], axes = TRUE, main = "Districts")
#Plotting Using ggplot2
ggplot() +
geom_sf(data = sf, aes(fill = NAME_2)) + theme(legend.position = "none")