-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
117 lines (79 loc) · 3.04 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
warning = FALSE,
message = FALSE,
error = FALSE,
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tanzania: Datasets for Use in Designing Surveys in Tanzania
<!-- badges: start -->
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/spatialworks/tanzania/workflows/R-CMD-check/badge.svg)](https://github.com/spatialworks/tanzania/actions?query=workflow%3AR-CMD-check)
<!-- 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 Tanzania.
## Installation
The development version of the `tanzania` package can be installed from [GitHub](https://github.com/spatialworks/tanzania) with:
```{r install, eval = FALSE}
if(!require(remotes)) install.packages("remotes")
remotes::install_github("spatialworks/tanzania")
```
## Usage
When installing `tanzania`, geospatial packages on which `tanzania` depends on are also installed. To use `tanzania` package, it will be important to load these package dependencies that have been installed. This can be done by:
```{r dependencies}
library(rgdal)
library(rgeos)
library(raster)
```
### Region borders
The Tanzania region borders is accessed via the `region` dataset.
```{r region}
tanzania::region
```
The region borders of Tanzania can be plotted by:
```{r regionPlot, fig.align = "center"}
sp::plot(tanzania::region)
```
### District borders
The Tanzania district borders is accessed via the `district` dataset.
```{r district}
tanzania::district
```
The district borders of Tanzania can be plotted by:
```{r districtPlot, fig.align = "center"}
sp::plot(tanzania::district)
```
### Ward borders
The Tanzania ward borders is accessed via the `ward` dataset.
```{r ward}
tanzania::ward
```
The ward borders of Tanzania can be plotted by:
```{r wardPlot, fig.align = "center"}
sp::plot(tanzania::ward)
```
### Village borders
The Tanzania village borders is accessed via the `village` dataset.
```{r village}
tanzania::village
```
The village borders of Tanzania can be plotted by:
```{r villagePlot, fig.align = "center"}
sp::plot(tanzania::village)
```
### Livelihood zones borders
The Tanzania livelihood zone borders is accessed via the `livelihood_zone` dataset.
```{r lhz}
tanzania::livelihood_zone
```
The livelihood zone borders of Tanzania can be plotted by:
```{r lhzPlot, fig.align = "center"}
sp::plot(tanzania::livelihood_zone)
```