-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd_surv_act_clusters_event.R
376 lines (321 loc) · 17 KB
/
dd_surv_act_clusters_event.R
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
cluster_events<-
list(
# SPATIAL
data.frame(
Variable="SurveillanceActivityEventClustering",
Label="Surveillance Activity Event Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
clustered?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialClustering",
Label="Surveillance Activity Event Spatial Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
spatially clustered (in nested or non-nested clusters)? For example, Events
represent traps and traps are clustered by grid cells",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNestedClustering",
Label="Surveillance Activity Event Spatial Nested Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
spatially clustered in nested levels?' For example, Events
are traps and traps are clustered within grid cells",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNumberLevelsNestedClusters",
Label="Surveillance Activity Event Spatial Number Levels Nested Clusters",
Definition="The number of spatial nested cluster levels grouping Events",
Type="Integer",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNestedClusterLevelsRepresent",
Label="Surveillance Activity Event Spatial Nested Clusters Represent",
Definition="Description of what each level of spatial nested cluster grouping Events is.
For example, Level 1 are areas Level 2 are grid cells within areas",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNumberCategoriesPerNestedClusterLevel",
Label="Surveillance Activity Event Spatial Number Categories Per Nested Cluster Level",
Definition="Description of the number of Categories per each level of nested clusters
grouping Events. For example, Level 1 contains 4 areas; in Level 2, area 1 contains 20 grid cells,
area 2 contains 15 grid cells, etc.",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerSpatialNestedClusterCategoryKnown",
Label="Surveillance Activity Events Per Spatial Nested Cluster Category",
Definition="Answer to the question: 'Is the number of Events per each category within each
spatial nested cluster grouping Events known?' The opposite is opportunistic
and added as the Surveillance Activity develops",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerSpatialNestedClusterCategory",
Label="Surveillance Activity Event Per Spatial Nested Cluster Category",
Definition="Description of the Events per each category of nested spatial clusters
grouping Events. For example, 3 field activities for area 1 that include 3 Events
per grid cell for a total of 9 Events per grid cell. The time frame between each
visit to a grid cell within a single visit to an area is 2 days",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNestedClustersOtherAttributes",
Label="Surveillance Activity Event Spatial Nested Clusters Other Attributes",
Definition="Answer to the question: 'Do spatial nested clusters grouping Events
contain other properties not included in the data model?'",
Type="Boolean",
Mandatory="No"),
data.frame(
Variable="SurveillanceActivityEventSpatialNestedClustersListDefinitionOtherAttributes",
Label="Surveillance Activity Event Spatial Nested Clusters Definition Other Attributes",
Definition="Description of the other attributes of spatial nested clusters
grouping Events not included in the data model. Provide a list with the
name of the attributes and their definition",
Type="String",
Mandatory="No"),
#spatial non nested
data.frame(
Variable="SurveillanceActivityEventSpatialNonNestedClustering",
Label="Surveillance Activity Event Spatial Non Nested Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
spatially clustered in non-nested groups?' For example, Events
represent traps clustered by grid cells and also by fenology'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNumberNonNestedClusters",
Label="Surveillance Activity Event Spatial Number Non Nested Clustering",
Definition="The number of non-nested spatial clusters grouping Events",
Type="Integer",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNonNestedClusterRepresent",
Label="Surveillance Activity Event Spatial Non Nested Clusters Represent",
Definition="Description of what each spatial non-nested cluster grouping Events is. For example, cluster 1
are grid cells cluster 2 are fenological areas",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNumberCategoriesPerNonNestedCluster",
Label="Surveillance Activity Event Spatial Number Categories Per Non Nested Cluster",
Definition="Description of the number of Categories per each non-nested cluster grouping Events. For
example, cluster 1 contains 20 cells; cluster 2 contains 2 fenological areas",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerSpatialNonNestedClusterCategoryKnown",
Label="Surveillance Activity Event Per Spatial Number Categories Per Non Nested Cluster",
Definition="Answer to the question: 'Is the number of Events per each category of each
spatial non-nested cluster grouping Events known?' The opposite is opportunistic
and added as the Surveillance Activity develops",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerSpatialNonNestedClusterCategory",
Label="Surveillance Activity Event Per Spatial Non Nested Cluster Category",
Definition="The number of Events per each category of each spatial non-nested
cluster that are grouping Events",
Type="String",
Mandatory="Yes"),
# data.frame(
# Variable="SurveillanceActivityEventSpatialNestedClustersOtherAttributes",
# Label="Surveillance Activity Event Spatial Nested Clusters Other Attributes",
# Definition="Answer to the question: 'Do spatial nested clusters grouping Events
# contain other properties not included in the data model?'",
# Type="Boolean",
# Mandatory="Yes"),
#
# data.frame(
# Variable="SurveillanceActivityEventSpatialNestedClustersListDefinitionOtherAttributes",
# Label="Surveillance Activity Event Spatial Nested Clusters Definition Other Attributes",
# Definition="Description of the other attributes of spatial nested clusters
# grouping Events not included in the data model. Provide a list with the
# name of the attributes and their definition",
# Type="String",
# Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialNonNestedClustersOtherAttributes",
Label="Surveillance Activity Event Spatial NonNested Clusters Other Attributes",
Definition="Answer to the question: 'Do spatial non-nested clusters grouping Events
contain other properties not included in the data model?'",
Type="Boolean",
Mandatory="No"),
data.frame(
Variable="SurveillanceActivityEventSpatialNonNestedClustersListDefinitionOtherAttributes",
Label="Surveillance Activity Event Spatial NonNested Clusters Definition Other Attributes",
Definition="Description of the other attributes of spatial non-nested clusters
grouping Events not included in the data model. Provide a list with the
name of the attributes and their definition",
Type="String",
Mandatory="No"),
data.frame(
Variable="SurveillanceActivityEventSpatialClustersFileProvided",
Label="Surveillance Activity Event Spatial Clusters File Provided",
Definition="Answer to the question: 'Is a file containing the list of nested,
non-nested, or both types of spatial clusters grouping Events and their
corresponding categories provided in a file?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventSpatialClustersSpatialProjection",
Label="Surveillance Activity Event Spatial Clusters Spatial Projection",
Definition="The spatial projection of the spatial nested and non-nested clusters
grouping Events provided in the file",
Type="String",
Mandatory="No"),
# TEMPORAL:
data.frame(
Variable="SurveillanceActivityEventTemporalClustering",
Label="Surveillance Activity Event Temporal Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
temporally clustered (in nested or non-nested clusters)? For example, Events
are clustered by decade and month over the years",
Type="Boolean",
Mandatory="Yes"),
# temporal nested
data.frame(
Variable="SurveillanceActivityEventTemporalNestedClustering",
Label="Surveillance Activity Event Temporal Nested Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
temporally clustered in nested levels?' For example, Events
are clustered by month and then months are clustered by year",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventNumberTemporalNestedClustersLevels",
Label="Surveillance Activity Event Number Temporal Nested Clusters Levels",
Definition="The number of levels of temporal nested clusters grouping Events",
Type="Integer",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNestedClusterLevelsRepresent",
Label="Surveillance Activity Event Temporal Nested Clusters Represent",
Definition="Description of what each level of temporal nested clusters grouping Events is.
For example, Level 1 are seasons Level 2 are months within seasons",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNumberCategoriesPerNestedClusterLevel",
Label="Surveillance Activity Event Temporal Number Categories Per Nested Cluster Level",
Definition="Description of the number of Categories per each level of temporal nested clusters
grouping Events. For example, Level 1 contains 4 seasons; in Level 2, season 1 contains 3 months,
season 2 contains 3 months, etc.",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerTemporalNestedClusterCategoryKnown",
Label="Surveillance Activity Event Per Temporal Nested Cluster Category",
Definition="Answer to the question: 'Is the number of Events per each category of each
temporal cluster level grouping Events known?' The opposite is opportunistic and added
as the Surveillance Activity develops",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerTemporalNestedClusterCategory",
Label="Surveillance Activity Event per Temporal Nested Cluster Category",
Definition="Description of the number of Events per each category of each temporal
cluster level grouping Events. For example, 3 Events for season 1 that include 3 Events during
each of the 3 months for a total of 9 Events per season. The time frame
between each visit to a neighboor within a single visit to a city is 2 days",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNestedClustersOtherAttributes",
Label="Surveillance Activity Event Temporal Nested Clusters Other Attributes",
Definition="Answer to the question: 'Do temporal nested clusters grouping Events
contain other properties not included in the data model?'",
Type="Boolean",
Mandatory="No"),
data.frame(
Variable="SurveillanceActivityEventTemporalNestedClustersListDefinitionOtherAttributes",
Label="Surveillance Activity Event Temporal Nested Clusters Definition Other Attributes",
Definition="Description of the other attributes of temporal nested clusters
grouping Events not included in the data model. Provide a list with the
name of the attributes and their definition",
Type="String",
Mandatory="No"),
# temporal non nested
data.frame(
Variable="SurveillanceActivityEventTemporalNonNestedClustering",
Label="Surveillance Activity Event Temporal NonNested Clustering",
Definition="Answer to the question:'Are Events of the Surveillance Activity
temporally clustered in non-nested groups?' For example, Events
are clustered by date of the year and also by decade",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventNumberTemporalNonNestedClusters",
Label="Surveillance Activity Event Number Temporal NonNested Clusters",
Definition="The number of temporal non-nested clusters grouping Events",
Type="Integer",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNonNestedClustersRepresent",
Label="Surveillance Activity Event Temporal NonNested Clusters Represent",
Definition="Description of what each temporal non-nested cluster grouping Events is.
For example, Cluster 1 are dates of the year and cluster 2 are decades",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNumberCategoriesPerNonNestedCluster",
Label="Surveillance Activity Event Temporal Number Categories Per NonNested Cluster",
Definition="Description of the number of Categories per each non-nested clusters
grouping Events. For example, date of the year contains 365 options; decade contains
10 years, etc.",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerTemporalNonNestedClusterCategoryKnown",
Label="Surveillance Activity Event per Temporal NonNested Cluster Category",
Definition="Answer to the question: 'Is the number of Events per each category within each
temporal non-nested cluster grouping Events known?' The opposite is opportunistic
and added as the Surveillance Activity develops",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventPerTemporalNonNestedClusterCategory",
Label="Surveillance Activity Event per Temporal NonNested Cluster Category",
Definition="Description of the Events per each category of the non-nested temporal clusters
grouping Events. For example, 1 Event for each date of the year and 365 Events per year
of the decade",
Type="String",
Mandatory="No"),
data.frame(
Variable="SurveillanceActivityEventTemporalNonNestedClustersOtherAttributes",
Label="Surveillance Activity Event Temporal NonNested Clusters Other Attributes",
Definition="Answer to the question: 'Do temporal non-nested clusters grouping Events
contain other properties not included in the data model?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalNonNestedClustersListDefinitionOtherAttributes",
Label="Surveillance Activity Event Temporal NonNested Clusters Definition Other Attributes",
Definition="Description of the other attributes of temporal non-nested clusters
grouping Events not included in the data model. Provide a list with the
name of the attributes and their definition",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="SurveillanceActivityEventTemporalClustersFileProvided",
Label="Surveillance Activity Event Temporal Clusters File Provided",
Definition="Answer to the question: 'Is a file containing the list of nested,
non-nested, or both types of temporal clusters grouping Events and their
corresponding categories provided in a file?'",
Type="Boolean",
Mandatory="Yes"))
cluster_events<-
cluster_events %>% bind_rows() |>
gt::gt() %>%
gt::tab_options(table.font.size = 8) %>%
gt::cols_width(Variable ~ gt::pct(22),
Label ~ gt::pct(20),
Definition ~ gt::pct(30),
Type~ gt::pct(13),
Mandatory~ gt::pct(15)) %>%
gt::tab_style(
style = cell_text(size = px(15), weight = "bold"),
locations = cells_column_labels())