###library

library(bangladesh)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

1. Division map

# 1. Division map
division <- get_map("division")
plot(division, main = "1. Bangladesh Division Map: All Divisions")

## 2. own division map: Mymensingh

# 2. own division map: Mymensingh
mymensingh_division <- get_divisions(divisions = "Mymensingh", level = "division")
plot(mymensingh_division, main = "2. Your Division Map: Mymensingh", col = "lightblue")

## 3. District map

# 3. District map
district <- get_map("district")
plot(district, main = "3. Bangladesh District Map: All Districts")

## 4. own district map: Mymensingh District

# 4. own district map: Mymensingh District
mymensingh_district <- get_divisions(divisions = "Mymensingh", level = "district")
mymensingh_district_only <- mymensingh_district %>%
  filter(District == "Mymensingh")
plot(mymensingh_district_only, main = "4. Your District Map: Mymensingh District", col = "lightgreen")

# 5. Upazila map

# 5. Upazila map
upazila <- get_map("upazila")
plot(upazila, main = "5. Bangladesh Upazila Map: All Upazilas")

# 6. three upazila maps (Gafargaon, Bhaluka, Trishal)

# 6. three upazila maps (Gafargaon, Bhaluka, Trishal)
selected_upazilas <- c("Gafargaon", "Bhaluka", "Trishal")

mymensingh_upazilas <- get_divisions(divisions = "Mymensingh", level = "upazila")
three_upazilas <- mymensingh_upazilas %>%
  filter(Upazila %in% selected_upazilas)

plot(three_upazilas, 
     main = "6. Three Upazila Maps: Gafargaon, Bhaluka, Trishal", 
     col = c("yellow", "orange", "red"), 
     border = "black")
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette
## Warning in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, :
## col is not of length 1 or nrow(x): colors will be recycled; use pal to specify
## a color palette

```