library(sf)
## Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE
library(tmap)
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
library(bangladesh)

district <- get_map("district")

transport_map <- district %>%
  filter(District %in% c("Rajshahi", "Dhaka", "Chittagong"))

transport_map <- st_transform(transport_map, WGS84 = 4326)

tmap_mode("plot")
## ℹ tmap modes "plot" - "view"
## ℹ toggle with `tmap::ttm()`
## This message is displayed once per session.
tm_shape(transport_map) +
  tm_polygons(
    col = "blue",
    border.col = "black",
    lwd = 0.3
  ) +
  tm_text("District", size = 0.8) +
  tm_layout(title = "Major Transport Hub Districts of Bangladesh") +
  tm_compass(type = "arrow") +
  tm_scale_bar() +
  tm_grid(col = "gray90")
## 
## ── 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').[v3->v4] `tm_layout()`: use `tm_title()` instead of `tm_layout(title = )`! `tm_scale_bar()` is deprecated. Please use `tm_scalebar()` instead.

ttmp()
## ℹ tmap modes "plot" - "view"
## 
## 
## ── tmap v3 code detected ───────────────────────────────────────────────────────
## 
## [v3->v4] `tm_layout()`: use `tm_title()` instead of `tm_layout(title = )`
## ! `tm_scale_bar()` is deprecated. Please use `tm_scalebar()` instead.