-
Notifications
You must be signed in to change notification settings - Fork 0
/
dd_event.R
367 lines (325 loc) · 11.7 KB
/
dd_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
event<-
list(
data.frame(
Variable="EventID",
Label="Event Identifier",
Definition="System-provided Event identifier",
Type="Integer",
Mandatory="System-assigned"),
data.frame(
Variable="EventCode",
Label="Event Code",
Definition="User-provided Event code",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="EventCrossID",
Label="Event Cross Identifier",
Definition="The identifier of an Event in another system (e.g., database/document/other)",
Type="String",
Mandatory="No"),
data.frame(
Variable="EventCrossIDOrigin",
Label="Event Cross Identifier Origin",
Definition="The database/document/other where other identification
for the same Event is used",
Type="String",
Mandatory="No"),
data.frame(
Variable="EventDate",
Label="Event Date",
Definition="The date and time of the Event. Observation, capture, patrol, or collection efforts
can be established in the Collection associated fields",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="EventLongitude",
Label="Longitude",
Definition="Longitude coordinate. Non decimal degree coordinates are automatically converted.
If coordinates are provided in UTM, then the UTM zone must be provided (see below)",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="EventLatitude",
Label="Latitude",
Definition="Latitude coordinate. Non decimal degree coordinates are automatically converted.
If coordinates are provided in UTM, then the UTM zone must be provided (see below)",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="EventUTMZone",
Label="Event UTM Zone",
Definition="UTM Zone where the Event occurs. It applies if the longitude an latitude odf
the Event are provided in UTM coordinate reference system.
See https://www.dmap.co.uk/utmworld.htm",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="EventCoordinatesExactOrEstimated",
Label="Event Coordinates Exact Or Estimated",
Definition="Indicate weather the longitude and latitude coordinates are exact (GPS device)
or estimated based on another method (e.g., by pointinf the location in the map above)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="EventCoordinatesExactOrEstimated",
Label="Event Coordinates Exact Or Estimated",
Definition="Indicate weather the longitude and latitude coordinates are exact (GPS device)
or estimated based on another method (e.g., by pointinf the location in the map above)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="EventOriginalCRS",
Label="Original Coordinate Reference System tro report the longitude and latitude of the Event",
Definition="Indicate weather the longitude and latitude coordinates are exact (GPS device)
or estimated based on another method (e.g., by pointinf the location in the map above)",
Type="Single selection",
Mandatory="No"),
data.frame(
Variable="EventCountry",
Label="Country",
Definition="Country where the Event happens",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="EventState",
Label="State",
Definition="State where the Event happens",
Type="Single selection",
Mandatory="No"),
data.frame(
Variable="EventProvince",
Label="Province",
Definition="Province where the Event happens",
Type="Single selection",
Mandatory="No"),
# data.frame(
# Variable="EventUnit",
# Label="Event unit",
# Definition="Explanation of what the Event represents (e.g., a field finding,
# a market, a vendor, a cage, a grid cell, a point in a transect, a mist net,
# a point in a parcel, a point in a protected area, etc.)",
# Type="Single selection",
# Mandatory="Yes"),
data.frame(
Variable="EventFeatures",
Label="Event Features",
Definition="Specific set of findings at the Event that are dynamic over time
(e.g., fire, smoke, etc)",
Type="Multiple selection",
Mandatory="Yes"),
data.frame(
Variable="EventOtherFeatures",
Label="Other Event Features",
Definition="Other findings at the Event that are dynamic over time not listed in the previous attribute",
Type="Multiple selection",
Mandatory="No"),
data.frame(
Variable="EventBy",
Label="Event reported by",
Definition="The person that reported the Event",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="EventBySector",
Label="Sector of the reporter",
Definition="The sector of the person that reported the Event",
Type="Single selection",
Mandatory="No"),
# data.frame(
# Variable="EventTargetedRecords",
# Label="Event Targeted Records",
# Definition="Indicate what type of Records (Group, Animal, Environmental,
# or from Arthropod Sources) are targeted in the Event",
# Type="Multiple selection",
# Mandatory="Yes"),
# --- if Group Source is selected
# --- if Animal Source is selected
# --- if Environmental Source is selected
# data.frame(
# Variable="EventTargetedTaxa",
# Label="Event Targeted Taxa",
# Definition="Indicate the taxa targeted in the Event. ",
# Type="Multiple selection",
# Mandatory="Yes"),
# data.frame(
# Variable="EventContainsRecords",
# Label="Event Contain Records",
# Definition="Indicate if Records of Group, Animal, Environmental, or Arthropod Sources
# are included in the Event",
# Type="Boolean",
# Mandatory="Yes"),
# data.frame(
# Variable="EventContainsSpecimens",
# Label="Event Contain Records",
# Definition="Indicate if Specimens of Group, Animal, Environmental, or Arthropod Sources
# Records are included in the Event",
# Type="Boolean",
# Mandatory="Yes"),
# data.frame(
# Variable="EventTypeOfRecords",
# Label="Event Type Of Records",
# Definition="Indicate the type of Records documented from the Event",
# Type="Boolean",
# Mandatory="Yes"),
# data.frame(
# Variable="EventSmartSource",
# Label="Event from SMART",
# Definition="Answer to the question: 'Was the Event recorded using SMART?'",
# Type="Single selection",
# Mandatory="No"),
#
#
# data.frame(
# Variable="EventSiteCode",
# Label="Site code",
# Definition="The site the Events are grouped by site",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventZoneCode",
# Label="Zone code",
# Definition="The zone the Events are grouped by zone",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventMarketCode",
# Label="Market code",
# Definition="The market the Events are grouped by market",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventGridCode",
# Label="Grid code",
# Definition="The grid code the when Events are grouped by grid",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventGridCellCode",
# Label="Grid cell code",
# Definition="The grid cell code when Events are grouped by grid cell",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStationCode",
# Label="Station code",
# Definition="The station code when Events are grouped by station",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventTransectCode",
# Label="Transect code",
# Definition="The transect code when Events are grouped by transect",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventVendorCode",
# Label="Vendor code",
# Definition="The vendor code when Events are grouped by vendor",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventTrapCode",
# Label="Trap code",
# Definition="The vendor code when Events are grouped by trap",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventMistNetCode",
# Label="Mist net code",
# Definition="The mist net code when Events are grouped by mist net code",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventOtherSpatialUnitCode",
# Label="Other spatial unit code",
# Definition="The spatial unit code when Events are grouped by another spatial unit",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudyYear",
# Label="The study year",
# Definition="The temporal unit code when Events are grouped by year unit",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudySeason",
# Label="The study season",
# Definition="The temporal unit code when Events are grouped by study season",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudyMonth",
# Label="The study month",
# Definition="The temporal unit code when Events are grouped by month",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudyWeek",
# Label="The study week",
# Definition="The temporal unit code when Events are grouped by week",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudyDayPeriod",
# Label="The study day period",
# Definition="The temporal unit code when Events are grouped by study day",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventStudyHour",
# Label="The study hour",
# Definition="The temporal unit code when Events are grouped by study hour",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventOtherTemporalUnit",
# Label="Other spatial temporal unit code",
# Definition="The temporal unit code when Events are grouped by another temporal unit",
# Type="Single selection",
# Mandatory="No"),
#
# data.frame(
# Variable="EventTimeAssembled",
# Label="Time assembled",
# Definition="The time a trap or similar representing an Event is set up",
# Type="Datetime",
# Mandatory="No"),
#
# data.frame(
# Variable="EventTimeDisassembled",
# Label="Time disassembled",
# Definition="The time a trap or similar representing an Event is dissamsembled",
# Type="Datetime",
# Mandatory="No")
#
# )
event<-
event %>% 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())