knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )

Designing surveys require relevant datasets to be used as basis for sample size calculations, sampling design, survey planning/logistics and survey implementation. These include datasets on population, lists of sampling clusters, map datasets for spatial sampling, and previous survey datasets that can be used for estimating indicator variance and design effects. This package contains relevant datasets for use in designing surveys in Somalia.
somalia is not yet released on CRAN.
You can install the development version of somalia from GitHub with:
if(!require(devtools)) install.packages("devtools") install_github("validmeasures/somalia")
The somalia package has the following datasets.
Four map datasets are included in the somalia pacakge. These are:
Administrative level 1 or region map of Somalia (district_map)
Administrative level 2 or district map of Somalia (region_map)
Livelihood zones map of Somalia (lhz2015)
Villages (with geographical coordinates) of Somalia (villages)
The administrative level 1 or region map, administrative level 2 or district map and livelihoods zones map of Somalia are provided as a dataset class SpatialPolygonsDataFrame. These datasets are taken from the Humanitarian Data Exchange in ESRI Shapefile format and then converted into SpatialPolygonsDataFrame.
The villages of Somalia with geographical coordinates dataset is provided by UNICEF Somalia.
Underlying area information for the regions, districts and livelihood zones of Somalia can be accessed from the SpatialPolygonsDataFrame as follows:
## Regions dataset somalia::region_map@data
## Regions dataset somalia::region_map@data[1:10, ]
## Districts dataset somalia::district_map@data
## Districts dataset somalia::district_map@data[1:10, ]
## Livelihoods zones dataset somalia::lhz2015@data
## Livelihoods zones dataset somalia::lhz2015@data[1:10, ]
Map datasets can be mapped using the plot() function in the sp package. This is implemented as follows:
sp::plot(somalia::region_map)
sp::plot(somalia::district_map)
sp::plot(somalia::lhz2015)
sp::plot(somalia::region_map) points(somalia::villages[ , c("longitude", "latitude")], pch = 20, cex = 0.1, col = "darkgreen")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.