MyNixOS website logo
Description

Administrative Boundaries of Senegal.

The administrative boundaries of Senegal are provided at several levels, including regions, departments, arrondissements and communes. The Global Administrative Areas database, or `GADM` <https://gadm.org/>, is the primary source for these layers. The dataset is complemented by the incorporation of additional geographic layers, such as localities, universities, roads, or health facility locations.

mapSenegal

The goal of mapSenegal is to provides access to administrative boundaries of Senegal at several levels (regions, departements, arrondissements and communes). These boundaries are based on GDAM. The package also gives access to roads, localities, universities and health facilities locations.

Installation

You can install the development version of mapSenegal with:

# install.packages("remotes")
remotes::install_github("rCarto/mapSenegal")

Examples

This is a basic example which shows you how to use the package.

library(mapSenegal)
#> Loading required package: sf
#> Linking to GEOS 3.13.1, GDAL 3.10.3, PROJ 9.6.0; sf_use_s2() is TRUE
library(mapsf)
reg <- sn_regions()
ardt <- sn_arrondissements()
mf_map(ardt)
mf_map(reg, col = NA, lwd = 3, add = TRUE)
mf_scale(pos = "bottomleft")
mf_title("Regions & Arrondissements of Senegal")

The following maps shows the different layers provided by the package.

# import
pays <- sn_country()
zone <- sn_neighbors()
reg <- sn_regions()
dep <- sn_departments()
ardt <- sn_arrondissements()
com <- sn_communes()
loc <- sn_localities()
hf <- sn_health_facilities()
univ <- sn_universities()
roads <- sn_roads()

mf_map(pays, col = NA, border = NA, expandBB = c(0, 0, .05, 0))
mf_map(zone, col = "lightgrey", add = TRUE)
mf_shadow(pays, add = TRUE)
mf_graticule(pays, add = T)
mf_map(com, lwd = .5, add = TRUE, border = 0)
mf_map(dep, lwd = 1.5, add = TRUE, col = NA, border = 0)
mf_map(reg, col = NA, lwd = 2, add = TRUE)
mf_label(reg, "NAME", halo = TRUE, cex = .9, pos = 1)
mf_scale(pos = "bottomleft")
mf_title("Administrative Units")


mf_map(pays, col = NA, border = NA)
mf_map(zone, col = "lightgrey", add = TRUE)
mf_map(pays, lwd = 2, add = TRUE)
mf_map(subset(roads, TYPE %in% 4:5), col = "darkblue", lwd = .5, add = TRUE)
mf_map(subset(roads, TYPE %in% 1:3), col = "darkblue", lwd = 4, add = TRUE)
mf_map(subset(roads, TYPE %in% 1:3), col = "white", lwd = .5, add = TRUE)
mf_arrow()
mf_scale(pos = "bottomleft")
mf_title("Road Network")


mf_map(pays, col = NA, border = NA)
mf_map(zone, col = "lightgrey", add = TRUE)
mf_shadow(pays, add = TRUE)
mf_map(pays, lwd = 2, add = TRUE)
mf_map(dep, col = NA, lwd = 1, add = TRUE)
mf_map(loc, pch = ".", col = "#940000", add = TRUE)
mf_arrow()
mf_scale(pos = "bottomleft")
mf_title(paste0(nrow(loc), " Localities"))


mf_map(pays, col = NA, border = NA)
mf_map(zone, col = "lightgrey", add = TRUE)
mf_shadow(pays, add = TRUE)
mf_map(pays, add = TRUE)
mf_map(reg, col = NA, lwd = 1, add = TRUE)
mf_map(univ, "NB_STUDENTS", "prop", leg_val_big = " ")
mf_annotation(
  x = c(239471, 1655820),
  txt = "Université Numérique Cheikh Hamidou Lane", halo = T
)
mf_annotation(c(239471, 1595149),
  txt = "Université Cheick Anta Diop", halo = T, pos = "bottomright"
)
mf_arrow()
mf_scale(pos = "bottomleft")
mf_title("Universities")


mf_map(pays, col = NA, border = NA, expandBB = c(0, 0, 0, .1))
mf_map(zone, col = "lightgrey", add = TRUE)
mf_shadow(pays, add = TRUE)
mf_map(pays, add = TRUE)
mf_map(hf,
  var = "TYPE", type = "symb", cex = .75,
  pal = "Dark 3", add = TRUE, leg_title = "",
  leg_pos = "topright", leg_frame = TRUE
)
mf_arrow()
mf_scale(pos = "bottomleft")
mf_title("Health facilities")

Metadata

Version

0.1.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows