generated from jtr13/bookdown-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
03-survey_design.Rmd
124 lines (98 loc) · 4.57 KB
/
03-survey_design.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
117
118
119
120
121
122
123
124
# Designing a Survey
##Target Population##
__Define the Target Population__
In designing an aquatic resource monitoring survey, the designer must define what aquatic resource is to be monitored, otherwise known as the __Target Population__. For example, if the designer only has an interest in assessing the condition of perennial waters in a state, the target population is defined as perennial waters and intermittent and ephemeral waters are defined as non-target populations and are omitted from the selection process. The target population should align with your organizations monitoring strategy and objectives.
##Sample Frame##
__Select a Sample Frame of the Target Population__
Next, the designer must select a __Sample Frame__ to use when selecting potential sampling sites. A sample frame is a GIS representation (e.g. shapefile) of the aquatic resource target population such as [*National Hydrography Datasets*](https://www.usgs.gov/core-science-systems/ngp/national-hydrography). In the example above, the designer will select a dataset which only includes perennial waters. This process often involves extracting a subset of a dataset which contains non-target resources.
<center>
![Illustration of a sample frame is constructed](images/SampleFrame.png){width=80%}
</center>
Sample frames for NARS and states may differ due to different target populations, source material, and state knowledge leading to improvements. For partners to leverage NARS fully, requesting the integration of a partners sample frame can possibly be accommodated.
<center>
![Illustration of a partner sample frame integration](images/Partner_SF.png){width=80%}
</center>
##Prepare a Survey##
Once the target population has been defined and a sample frame of the target population has been selected, the designer can now prepare a survey. The code below shows how a survey was designed using a population of lakes in the Northeast US. This sample frame is found in the package `spsurvey` and is not meant for use other than as an example.
__NOTE__ To upload your own sample frame, you may use the code below to read a file as an sf_object which is required by spsurvey to design a survey.
```{r, echo=TRUE, eval=FALSE}
library(sf)
#Example to read a shapefile
my_sample_frame <- st_read("path/to/my/sample/frame.shp")
```
```{r, echo=TRUE, warning=FALSE, message=FALSE}
#Load the spsurvey package
library(spsurvey)
#To view the NE_Lakes sf object which contains the target population
NE_Lakes <- spsurvey::NE_Lakes
#Plot NE_Lakes
plot(NE_Lakes,
pch = 19,
main= "NE Lakes",
key.width = lcm(3))
```
##Unstratified Equal Probablity Design##
For a state scale monitoring survey, it is generally accepted that sampling 50 sites gives sufficient confidence when calculating condition estimates. This sample size can vary depending on the size of the sample frame. Below we prepare an unstratified equal probability survey in which all lakes in the sample frame have the same chance of being selected regardless of size or other attributes.
```{r, echo=TRUE, warning=FALSE, message=FALSE, fig.show="hold", out.width="50%"}
EQ_PROB <- grts(
NE_Lakes,
n_base = 50
)
plot(
EQ_PROB,
NE_Lakes,
main= "Base Sample Sites",
pch = 19,
key.width = lcm(3)
)
```
Above, the plot displays the survey sites selected within the sample frame. Use the function __spsurvey::sprbind()__ to obtain the information about each survey site.
```{r, echo=TRUE, warning=FALSE, message=FALSE}
#Binds survey site
EQ_PROB_INFO <- sprbind(EQ_PROB)
#View the first 5 rows
head(EQ_PROB_INFO, 5)
```
##Proporitional Probablity Design##
Often, designers may want to proportionally stratify sites based on a `Category`.
```{r, echo=TRUE, warning=FALSE, message=FALSE, fig.show="hold", out.width="47%"}
#Creates an sframe object of northeast lakes found in the spsurvey package
NE_Lakes <- sframe(NE_Lakes)
#Plot NE_Lakes stratified by Area Category
plot(NE_Lakes,
formula = ~ AREA_CAT,
main= "NE Lakes by Area Category",
pch = 19,
key.width = lcm(3))
propprob <- grts(
NE_Lakes,
n_base = 50,
seltype = "proportional",
aux_var = "AREA"
)
plot(
propprob,
formula = siteuse ~ AREA_CAT,
NE_Lakes,
pch = 19,
key.width = lcm(3)
)
```
10 acres
```{r, echo=TRUE, warning=FALSE, message=FALSE, fig.show="hold", out.width="47%"}
#Create a vector defining stratified sample size
strata_n <- c(small = 35, large = 15)
#Select a stratified GRTS sample
STRAT_PROB <- grts(
NE_Lakes,
n_base = strata_n,
stratum_var = "AREA_CAT"
)
plot(
STRAT_PROB,
formula = siteuse ~ AREA_CAT,
NE_Lakes,
pch = 19,
key.width = lcm(3)
)
```