-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
88 lines (58 loc) · 3.18 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
message = FALSE,
warning = FALSE,
error = FALSE,
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(malawi)
```
# malawi: Datasets for Designing Surveys in Malawi <img src="man/figures/logo.svg" width="200px" align="right"/>
<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/spatialworks/malawi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/spatialworks/malawi/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/spatialworks/malawi/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/spatialworks/malawi/actions/workflows/test-coverage.yaml)
[![CodeFactor](https://www.codefactor.io/repository/github/spatialworks/malawi/badge)](https://www.codefactor.io/repository/github/spatialworks/malawi)
[![DOI](https://zenodo.org/badge/445699345.svg)](https://zenodo.org/badge/latestdoi/445699345)
<!-- badges: end -->
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 Malawi.
## Installation
You can install the development version from [GitHub](https://github.com/spatialworks/malawi) with:
```r
if (!require("remotes")) install.packages("remotes")
remotes::install_github("spatialworks/malawi")
```
## Usage
### Retrieve and plot Malawi country borders
```{r mwi1, echo = FALSE, eval = TRUE, fig.align = "center", fig.width = 10, fig.height = 10}
country <- get_country(id = "cod-ab-mwi")
plot(sf::st_geometry(country))
```
### Retrieve and plot Malawi regions borders
```{r mwi2, echo = FALSE, eval = TRUE, fig.align = "center", fig.width = 10, fig.height = 10}
regions <- get_regions(id = "cod-ab-mwi")
plot(sf::st_geometry(regions))
```
### Retrieve and plot Malawi districts borders
```{r mwi3, echo = FALSE, eval = TRUE, fig.align = "center", fig.width = 10, fig.height = 10}
districts <- get_districts(id = "cod-ab-mwi")
plot(sf::st_geometry(districts))
```
### Retrieve and plot Malawi traditional authority areas borders
```{r mwi4, echo = FALSE, eval = TRUE, fig.align = "center", fig.width = 10, fig.height = 10}
ta_areas <- get_ta_areas(id = "cod-ab-mwi")
plot(sf::st_geometry(ta_areas))
```
### Retrieve and plot Malawi livelihood zones
```{r mwi5, echo = FALSE, eval = FALSE, fig.align = "center", fig.width = 10, fig.height = 10}
lhz <- get_lhz()
plot(sf::st_geometry(lhz))
```