library(bangladesh)
## Warning: package 'bangladesh' was built under R version 4.5.2
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.2
## 
## 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
library(sf)
## Warning: package 'sf' was built under R version 4.5.2
## Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE
# Load the district shapefile
district <- get_map("district")

# Filter and transform
malaria_zone <- district %>%
  filter(District %in% c("Bhola","Bandarban", "Rangamati")) %>%
  st_transform(32646)
 library(tmap)
tm_shape(malaria_zone) +
  tm_polygons(
    col = "brown",
    border.col = "green"
  ) +
  tm_text("District", size = 0.8) +
  tm_title("malaria_zone Districts (Bandarban ,Bhola & Rangamati)") +
  tm_compass(position = c("left", "bottom"), type = "8star", size = 5) +
tm_scalebar(position = c("right", "bottom"), text.size = 0.7) 
## 
## ── tmap v3 code detected ───────────────────────────────────────────────────────
## [v3->v4] `tm_polygons()`: use 'fill' for the fill color of polygons/symbols
## (instead of 'col'), and 'col' for the outlines (instead of 'border.col').
## [plot mode] fit legend/component: Some legend items or map compoments do not
## fit well, and are therefore rescaled.
## ℹ Set the tmap option `component.autoscale = FALSE` to disable rescaling.
## This message is displayed once every 8 hours.