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

somalia: Datasets for Use in Designing Surveys in Somalia

Project Status: Active – The project has reached a stable, usable state and is being actively developed. lifecycle CRAN status Travis-CI Build Status AppVeyor Build Status

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.

Installation

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")

Usage

The somalia package has the following datasets.

Somalia map datasets

Four map datasets are included in the somalia pacakge. These are:

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.

Accessing area information from map datasets

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, ]

Plotting map datasets

Map datasets can be mapped using the plot() function in the sp package. This is implemented as follows:

  1. Map of Regions of Somalia
sp::plot(somalia::region_map)
  1. Map of Districts of Somalia
sp::plot(somalia::district_map)
  1. Map of Livelihood Zones of Somalia
sp::plot(somalia::lhz2015)
  1. Map of villages of Somalia
sp::plot(somalia::region_map)
points(somalia::villages[ , c("longitude", "latitude")], pch = 20, cex = 0.1, col = "darkgreen")


validmeasures/somalia documentation built on May 21, 2019, 1:23 p.m.