#tmap code

##Constant visual values

# Load required libraries
library(sf)
## Linking to GEOS 3.13.1, GDAL 3.11.0, PROJ 9.6.0; sf_use_s2() is TRUE
library(tmap)
# Read the shapefile
rivers <- st_read("C:/Users/Students/Downloads/bgd_watcrsa_1m_iscgm (1)")
## Reading layer `bgd_watcrsa_1m_iscgm' from data source 
##   `C:\Users\Students\Downloads\bgd_watcrsa_1m_iscgm (1)' using driver `ESRI Shapefile'
## Simple feature collection with 60 features and 13 fields
## Geometry type: POLYGON
## Dimension:     XYZ
## Bounding box:  xmin: 88.0122 ymin: 20.77948 xmax: 92.3792 ymax: 26.24221
## z_range:       zmin: 0 zmax: 0
## Geodetic CRS:  WGS 84
tmap_mode("plot")  # for static plots
## ℹ tmap mode set to "plot".
tm_shape(rivers) +
  tm_lines(col = "blue") 

# Load required libraries
library(sf)
library(tmap)
# Read the shapefile
rivers <- st_read("C:/Users/Students/Downloads/bgd_hyd_rivers_lged")
## Reading layer `bgd_hyd_rivers_lged' from data source 
##   `C:\Users\Students\Downloads\bgd_hyd_rivers_lged' using driver `ESRI Shapefile'
## Simple feature collection with 102774 features and 4 fields
## Geometry type: LINESTRING
## Dimension:     XY
## Bounding box:  xmin: 87.99497 ymin: 20.5632 xmax: 92.68175 ymax: 26.63924
## Geodetic CRS:  WGS 84
tmap_mode("plot")  # for static plots
## ℹ tmap mode set to "plot".
tm_shape(rivers) +
  tm_lines(col = "blue") 

library(tmap)
library(sf)
tm_shape(rivers) +
  tm_lines(col = "blue") 

tm_shape(World_rivers) +
  tm_lines(col = "blue")
## [tip] Consider a suitable map projection, e.g. by adding `+ tm_crs("auto")`.
## This message is displayed once per session.

tm_shape(World) +
  tm_polygons(fill = "HPI")

tm_shape(World) +
  tm_polygons(fill = "continent")

# Load required libraries
library(sf)
library(tmap)
# Read the shapefile
rivers <- st_read("C:/Users/Students/Downloads/bgd_watcrsa_1m_iscgm (1)")
## Reading layer `bgd_watcrsa_1m_iscgm' from data source 
##   `C:\Users\Students\Downloads\bgd_watcrsa_1m_iscgm (1)' using driver `ESRI Shapefile'
## Simple feature collection with 60 features and 13 fields
## Geometry type: POLYGON
## Dimension:     XYZ
## Bounding box:  xmin: 88.0122 ymin: 20.77948 xmax: 92.3792 ymax: 26.24221
## z_range:       zmin: 0 zmax: 0
## Geodetic CRS:  WGS 84
tmap_mode("plot")  # for static plots
## ℹ tmap mode set to "plot".
tm_shape(rivers) +
  tm_lines(col = "blue")