-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd_location.R
118 lines (101 loc) · 3.68 KB
/
dd_location.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
location<-
list(
data.frame(
Variable="LocationID",
Label="Location Identifier",
Definition="System-provided Location identifier",
Type="Integer",
Mandatory="System-assigned"),
data.frame(
Variable="LocationName",
Label="Location Code",
Definition="User-provided Location code",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="Location Polygon ID",
Label="Location Polygon Identifier",
Definition="If a spatial file with the different Locations has been entered in the database.
then provide the ID of the polygon representing the Location in such file. This attribute is
available only when the spatial file has been entered in the database as reported in the
Surveillance Activity metadata",
Type="String",
Mandatory="No"),
data.frame(
Variable="LocationCrossReferenceID",
Label=" Location Cross Identifier",
Definition="The identifier of the Location under another nomenclature system.
For example, in a different database or document where other identification
for the same Location is used",
Type="String",
Mandatory="No"),
data.frame(
Variable="LocationCrossReferenceIDOrigin",
Label="Location Cross Identifier Origin",
Definition="The database/document/other where other identification
for the same Location is used",
Type="String",
Mandatory="No"),
data.frame(
Variable="LocationPurpose",
Label="Location Purpose",
Definition="Description of the objectives to accomplish in the Location",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="LocationTargetedSources",
Label="Location Targeted Sources",
Definition="Indicate the type of Sources (Group, Animal, Environmental,
or Arthropod) targeted in the Event",
Type="Multiple selection",
Mandatory="Yes"),
data.frame(
Variable="LocationType",
Label="Location Type",
Definition="The type of Location containing Events
(e.g., 'market', 'zone in Protected area', 'grid cell', 'parcel', etc')",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="LocationDescription",
Label="Location Description",
Definition="A general description of the Location",
Type="String",
Mandatory="No"),
data.frame(
Variable="LocationEnvironment",
Label="Location Environment",
Definition="Description of the environmental conditions of the Location",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="LocationStartDate",
Label="Location Start Date",
Definition="The date the activities in the Location started" ,
Type="Date",
Mandatory="Yes"),
data.frame(
Variable="LocationEndDate",
Label="Location End Date",
Definition="The date the activities in the Location ended or the anticipated ending date" ,
Type="Date",
Mandatory="Yes"),
data.frame(
Variable="LocationComments",
Label="Location Comments",
Definition="Provide any other relevant information regarding the Location" ,
Type="String",
Mandatory="No")
)
location<-
location %>% 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())