-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
97 lines (67 loc) · 2.97 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(chad)
library(sf)
```
# chad: Datasets for Use in Designing Surveys in Chad <img src="man/figures/logo.svg" width="200px" align="right" />
<!-- 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)
[![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/chad/workflows/R-CMD-check/badge.svg)](https://github.com/spatialworks/chad/actions)
[![CodeFactor](https://www.codefactor.io/repository/github/spatialworks/chad/badge)](https://www.codefactor.io/repository/github/spatialworks/chad)
[![DOI](https://zenodo.org/badge/417356740.svg)](https://zenodo.org/badge/latestdoi/417356740)
<!-- 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 Chad.
## Installation
The development version of the `{chad}` package can be installed from [GitHub](https://github.com/) with:
``` r
if (!require(remotes)) install.packages("remotes")
remotes::install_github("spatialworks/chad")
```
## Usage
### Region borders
The Chad region borders is accessed via the `regions` dataset.
```{r}
chad::regions
```
The regions borders of Chad can be plotted by:
```{r, fig.align = "center", fig.width = 10, fig.height = 10}
plot(st_geometry(chad::regions))
```
### Department borders
The Chad department borders is accessed via the `departments` dataset.
```{r}
chad::departments
```
The department borders of Chad can be plotted by:
```{r, fig.align = "center", fig.width = 10, fig.height = 10}
plot(st_geometry(chad::departments))
```
### District borders
The Chad district borders is accessed via the `districts` dataset.
```{r}
chad::districts
```
The district borders of Chad can be plotted by:
```{r, fig.align = "center", fig.width = 10, fig.height = 10}
plot(st_geometry(chad::districts))
```
### Villages/settlements
The Chad villages/settlements data is accessed via the `settlements` dataset.
```{r}
chad::settlements
```
The villages/settlements of Chad can be plotted by:
```{r, fig.align = "center", fig.width = 10, fig.height = 10}
plot(st_geometry(chad::regions))
plot(st_geometry(chad::settlements), pch = 21, cex = 0.1, col = "red", add = TRUE)
```