-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd_collection.R
175 lines (148 loc) · 6.15 KB
/
dd_collection.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
collection<-
list(
data.frame(
Variable="CollectionID",
Label="Collection Identifier",
Definition="System-provided Collection identifier",
Type="Integer",
Mandatory="System-assigned"),
data.frame(
Variable="Collection Passive Active",
Label="Collection Passive Active",
Definition="Answer to the question: 'Is the collection passive or active?'
(markets or other facilities where wildlife is already captured does not involve effort)",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="CollectionCode",
Label="Collection Code",
Definition="User-provided Collection code)",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="CollectionCrossReferenceID",
Label="Collection Cross Identifier",
Definition="The identifier of an Collection in another system (e.g., database/document/other)",
Type="String",
Mandatory="No"),
data.frame(
Variable="CollectionCrossReferenceIDOrigin",
Label="Collection Cross Identifier Origin",
Definition="The database/document/other where other identification
for the same Event is used",
Type="String",
Mandatory="No"),
data.frame(
Variable="CollectionSourceMethod",
Label="Collection Source Method",
Definition="The tools employed in the Collection",
Type="Multiple selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionSourceTarget",
Label="Collection Source Target",
Definition="The types of Sources to obtain through the Collection",
Type="Multiple selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionSpatialEffortUnit",
Label="Collection Spatial Effort Unit",
Definition="The unit to measure the spatial effort associated with the Collection
(e.g., CO2 traps, mist nets, km walked, squared kilometers covered, etc.)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionSpatialEffortUnitQuantity",
Label="Collection Spatial Effort Unit Quantity",
Definition="The number of units of spatial effort associated with the Collection in the unit reported in the previous attribute",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="CollectionSpatialEffortExactorEstimated",
Label="Collection Spatial Effort Exact or Estimated",
Definition="Answer to the question: 'Is the spatial effort exact or estimated?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="CollectionSpatialEffortPlacementEvent",
Label="Collection Spatial Effort Placement Event",
Definition="Select the position of the spatial effort with respect to the Event spatial position
(e.g., 'At the Event', 'up to the Event')",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionTemporalEffortUnit",
Label="Collection Temporal Effort Unit",
Definition="The unit to measure the temporal effort associated with the Collection
(e.g., night-hours, days, year, etc.)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionTemporalEffortUnitQuantity",
Label="Collection Temporal Effort Unit Quantity",
Definition="The number of units of temporal effort associated with the Collection in the unit reported in the previous attribute",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="CollectionTemporalEffortExactorEstimated",
Label="Collection Temporal Effort Exact or Estimated",
Definition="Answer to the question: 'Is the temporal effort exact or estimated?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="CollectionTemporalEffortPlacementEvent",
Label="Collection Temporal Effort Placement Event",
Definition="Select the position of the temporal effort with respect to the Event time stamp
(e.g., 'after the Event started')",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionArthropodActive",
Label="Collection Arthropod Active or Passive",
Definition="Answer to the question: 'Is the Collection of Arthropods active?'
(e.g., setting traps or sliding tarps versus pick up by hand)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionLureUsed",
Label="Collection Lure",
Definition="Select the lure using to collect Sources, if any",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionImmovilization",
Label="Collection Immovilization",
Definition="Select the type of immovilization used to obtain Group and Animal Source Records",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="CollectionProblems",
Label="Collection Problems",
Definition="Report any problems occurred during the collection such as torn mist net, broken trap, etc.",
Type="String",
Mandatory="No"),
data.frame(
Variable="SourceRecordsCollected",
Label="Source Records Collected",
Definition="Answer to the question: 'Where there any Source Records obtained as result of the Collection?'
(Setting a trap is a Collection. That does not mean that any Source was captured at the en of the Collection)",
Type="Boolean",
Mandatory="No"),
data.frame(
Variable="CollectionComments",
Label="Collection Comments",
Definition="Any other comments regarding the Collection",
Type="String",
Mandatory="No"))
collection<-
collection %>% 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())