-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
2353 lines (1826 loc) · 105 KB
/
app.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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# TOP ----
library(shiny)
library(ggplot2)
library(shinyFiles)
library(shinyWidgets)
library(DT)
library(uuid)
library(shinyalert)
source("shinyData/lookup.R")
publicationParameters <-
read.csv("shinyData/publicationProfileFields.csv", sep=";")
indicatorParameters <-
read.csv("shinyData/indicatorProfileFields.csv", sep=";")
# Column1 (parameters) = list of terms for the publication profiles
# Column2 (values) = NA
# Duplicate data set for export
#pExport <- publicationParameters
ISO3166 <- read.csv("shinyData/ISO3166.csv", sep=";")
ISO3166_v2 <- setNames(ISO3166$Alpha.2.code, ISO3166$English.short.name)
# UI ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤----------------------------------------------------------------------
ui <-
navbarPage(
# add title and logos inside a div
title = div(
div(img(src='indimaplogo4.png',
style="margin-top: -14px;
padding-right:15px;
padding-bottom:15px",
height = 60)),
tags$script(HTML("var header = $('.navbar > .container-fluid');
header.append('<div style=\"float:right\"><a href=\"https://www.nina.no/\", target=\"_blank\"><img src=\"NINA_logo_sort_txt_engelsk_under.png\" alt=\"alt\" style=\"float:right;width:50px;padding-top:5px;padding-bottom:0px;\"> </a></div>');
header.append('<div style=\"float:right\"><a href=\"https://github.com/anders-kolstad/theIndiMap\", target=\"_blank\"><img src=\"githublogo.png\" alt=\"alt\" style=\"float:right;width:50px;padding-top:5px;padding-bottom:0px;padding-right:15px;\"> </a></div>');
console.log(header)"))
),
# fix the navbar so that it doesn't scroll
position = "fixed-top",
# add padding to the navbar doesn't overlay content
tags$style(type="text/css", "body {padding-top: 70px;}"), #.navbar { background: #9cbff7; }
# '-------------
# **TAB Register Publication ----
tabPanel("Register publication",
sidebarLayout(
sidebarPanel(width = 6,
style = "position: fixed; width: 45%; height: 90vh; overflow-y: auto;",
h5(tags$i("Hover the input fields or press the info buttons for more information and examples of use.")),
# 3 INPUT pNew ----
tags$div(title = "Click Edit to import and modify a existing publication profile, or click Create new to start processing a new publication.",
radioGroupButtons(
inputId = "pNew",
label = NULL,
choices = c("Edit", "Create new"),
selected = "Create new"
)),
# 3 INPUT localPub ----
# Here's an option for manually locating the local folder
# containing unpublished (unpushed) publication profiles.
# The files, or paths, in the folder are listed, read, and compiled.
conditionalPanel("input.pNew == 'Edit'",
h4("Locate and upload existing publication profile:", style="background-color:lightblue;"),
h5("Here you can choose to upload a cvs file so that you can modify them.\n
In order to find the correct file, first use the 'Choose CVS files'
function to select all the crypically names files (typically using Ctrl+A inside
the main folder containing the publication og indikator profiles).
Then choose the correct file from the dropdown list. A preview of the import
allows you to adjust import settings like headers and seperators."),
tags$div(title = "Use this functionality to find an already existing publication profile in order to edit it.
Navigate to the folder containg the file you want. If there are more than one file in the folder then slect all (Ctrl+A).
All the files need to me csv-files created using this app.",
fileInput("localPub", "Choose CSV files",
multiple = T,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"))),
# 3 INPUT pubDrop ----
# Drop down list of publication profiles
# Profiles (for indicators and publications alike)
# are stored using time stamps as file names.
# To find and upload the correct file (to modify it)
# requires that we first must read the indicator names
# stored inside all the files
tags$div(title = "This dropdown menu is poplated with publication titles from the files you selected above. Pick the one you want.",
pickerInput('pubDrop', 'Select publication by title',
choices = NA,
options = list(
`live-search` = TRUE))),
# 3 INPUT header ----
#Checkbox if file has header
checkboxInput("header", "Header", TRUE),
# 3 INPUT sep ----
#Select separator
tags$div(title = "This option should normally not be changed - all files from this app are saved using ',' as seperator.",
radioGroupButtons("sep", "Separator",
choices = c(Comma = ",",
Semicolon = ";",
Tab = "\t"),
selected = ",")),
# 3 INPUT quote ----
# Select quotes
radioGroupButtons("quote", "Quote",
choices = c(None = "",
"Double Quote" = '"',
"Single Quote" = "'"),
selected = '"'),
# 3 INPUT disp ----
# Select number of rows to display
radioGroupButtons("disp", "Display",
choices = c(Head = "head",
All = "all"),
selected = "head"),
# 3 INPUT populate ----
tags$div(title = "Populate form from uploaded file. \n\nOBS! Toggling the switch below will reset the form and delete unsaved work.",
style="color:red; text-decoration-line: underline;",
materialSwitch(
inputId = "populate",
label = "Populate form (careful...)",
value = FALSE,
status = "info"))
),
tags$hr(),
# create some space
br(), br(),
h4("General fields:", style="background-color:lightblue;"),
# 3 INPUT githubUser ----
tags$div(title = "Example: 'anders-kolstad'. \n\nNote: please update the contact info in you GitHub profile.",
textInput("githubuser",
"Enter your GitHub user name",
value = "")),
# 3 INPUT pTitle ----
tags$div(title = "Example: 'Norwegian Arctic Tundra: a Panel-based Assessment of Ecosystem Condition'",
textInput("ptitle",
"Enter publication title",
value = "")),
# 3 INPUT pRayyanID ----
tags$div(title = "The Rayyan ID is called System ID inside Rayyan itself. See it by first clicking a row with a publication and read it from the blue screen below. Example: 534633005",
textInput("pRayyanID",
"Enter the Rayyan ID",
value = "")),
# 3 INPUT pOrigin ----
tags$div(title = "The original systematic search refers to papers stored in Rayyan under 'Search methods: Uploaded References [The IndiMap Review.bib]'.
\nThe SEEA EA maintained list refers to this web page: https://seea.un.org/content/knowledge-base
\nIf you are entering a publication that is not identified either through the initial systematic search, or one that you found on the SEEA EA lst, then choose the third option.",
pickerInput(
inputId = "pOrigin",
label = "Where did you get this reference from?",
choices = origin,
options = list(
title = "Nothing selected"))),
br(),
# 3 INPUT UUID ----
conditionalPanel("input.pNew == 'Create new'",
actionButton("puuid_new", "Regenerate UUID"
)),
br(),
# 3 INPUT pBibliography ----
tags$div(title = "Example: Jepsen, Jane Uhd; Speed, James David Mervyn; Austrheim, Gunnar; Rusch, Graciela; Petersen, Tanja Kofod; Asplund, Johan;, Bjerke, Jarle W.; et al. “Panel-Based Assessment of Ecosystem Condition – a Methodological Pilot for Four Terrestrial Ecosystems in Trøndelag.” NINA Rapport. Vol. 2094, 2022.",
textInput("pbibliography",
"Enter the full reference to the publication",
value = "")),
# 3 INPUT pRedundant ----
tags$div(title = "Is the publication related to another reference? For example, pre-prints and published versions are related, and we only want to consider one of them. Chosing anything but 'Unique' here will work to flag the publication, but it will not remove it. If the publication is very clearly a duplicate of another, then you should exclude the least relevant publication. Consult the review team if in doubt.",
radioGroupButtons(
inputId = "pRedundant",
label = "Redundant?",
choices = c("Unique", "Possibly redundant", "Redundant"),
selected = "Unique"
# ))
)),
# 3 INPUT pType ----
tags$div(title = "Chose the relevant publication type from the list.\n\n
'Unpublished' in this case means it is not publically available.",
pickerInput(
inputId = "pType",
label = "Type of publication",
choices = publicationTypes,
options = list(
title = "Nothing selected")
)),
# 3 INPUT pJournal ----
# This could perhaps be standardised with a drop down menu later
conditionalPanel("input.pType == 'Peer-reviewed article'",
tags$div(title = "The list is taken from Rayyan and should be complete, but if you have a jounral not listed here you can chose 'Other' and notify Anders Kolstad who will add it to the list.",
pickerInput("pJournal",
"Enter the journal name",
choices = sort(journals),
options = list(
title = "Nothing selected")
))),
# 3 INPUT pComment ----
tags$div(title = "Optional. Add a short description for the publication.
Example: 'Paper suggestion new indicator for biodiversity',
or 'National ECA with many indicators.'",
textInput("pComment",
"Comments on the publication",
value = "")),
# 3 INPUT pDirective ----
tags$div(title = "Tick of the boxes that the publication explicitly states that it is reporting to",
checkboxGroupButtons(
inputId = "pDirective",
label = "Reported to the following programs",
choices = c("Not relevant",
"EU Birds Directive",
"EU Habitats Directive")
)),
h4("Field related to ecosystem assessment publications:", style="background-color:lightblue;"),
# 3 INPUT pAssessment ----
tags$div(title = "Does the publication contain an assessment of ecosystem condition based on multiple indicators?",
radioGroupButtons(
inputId = "pAssessment",
label = "Ecosystem condition assessment?",
choices = c("Assessment",
"Not an assessment"),
selected = "Assessment"
)
),
# 3 INPUT pEAAextent ----
conditionalPanel("input.pAssessment == 'Assessment'",
tags$div(title = "The spatial extent of the ecosystem assessment/accounting area(s)",
pickerInput(
inputId = "pEAAextent",
label = "The extent of the Ecosystem Accounting Area",
choices = scale1,
options = list(
title = "Nothing selected")
)
),
actionButton("pEAAextantINFO", "",
icon = icon("info")),
# 3 INPUT pEAAarea ----
tags$div(title = "Example: 385207\n\nThe area (km2) of the ecosystem assessment/accounting area(s). No spaces. If the EAA extant is not reported in the reference it is encouraged that you find out by googleing. It is OK to use an approximate or rounded of number",
numericInput(
inputId = "pEAAarea",
label = "The total area of the Ecosystem Accounting Area in km2",
value = NA,
min = 0
)
),
# 3 INPUT pAssessmentYear ----
tags$div(title = "Example: 2022
The final year covered by the overall assessment",
numericInput(
inputId = "pAssessmentYear",
label = "Assessment year",
value = NA,
min = 1950,
max = 2050
)
),
# 3 INPUT pAggregation ----
tags$div(title = "The highest level of spatial aggregation of the condition estimate(s) reported in the publication. Only relevant for normalised indicator sets.",
numericInput(
inputId = "pAggregation",
label = "Level of aggregation",
value = NA,
min = 0,
max=5
)),
h5("0 - None"),
h5("1 - Thematic level"),
h5("2 - BSU level"),
h5("3 - EA level"),
h5("4 - ET level"),
h5("5 - EAA level"),
actionButton("pAggregationINFO", "",
icon = icon("info")),
# 3 INPUT pAggregationRemark ----
tags$div(title = "Example: 'They have only one indicator for condition, but they have aggregeted that across all assests.' (level 1)
Example 2: Most indicators are not rescaled or aggregeted. Some indicators are aggregated to ECT class level (level 1).",
textInput("pAggregationRemark",
"Remarks to the chosen level of aggregation",
value = "")),
# 3 INPUT pTotalNumberOfIndicators ----
conditionalPanel("input.pAggregation > 1",
tags$div(title = "If level of aggregation >=2 : The total number of indicators used in the aggregated condition estimation",
numericInput(
inputId = "pTotalNumberOfIndicators",
label = "Number of (aggregated) indicators",
value = NA,
min = 2
)))
),
h4("Create file name", style="background-color:lightblue;"),
# 3 INPUT Replace ----
tags$div(title = "Chose whether to create a new file name (and hence a new file) for the csv file that you are about to export, or to overwrite the uploaded file that you have edited.",
radioGroupButtons(
inputId = "replace",
label = "Replace the uploaded file?",
choices = c("Replace the uploaded file",
"Create a new file")
)
),
h6("This is the new filename:"),
textOutput('newFileName'),
h6("Don't create a new file name if you have edited an existing file. The UUIDs will not have changed.",
style="color:red;"),
# add some space at the bottom
br(), br()
),
# '-------------
mainPanel(width = 6,
conditionalPanel("input.pNew == 'Edit'",
# 3 OUTPUT: uploaded ----
h5("Preview of the uploaded publication profile (before any new edits):",
style="background-color:lightgreen;"),
tableOutput("uploaded")
),
br(),
# 3 OUTPUT previewP ----
h4("Publication profile", style="background-color:lightgreen;"),
h6("This is what you download when you press the button below this table"),
DTOutput('previewP'),
# 3 DOWNLOAD ----
tags$hr(), # Horizontal line
h4("Download the publication profile", style="background-color:lightgreen;"),
h6("If you have a copy of the project github repo on you computer,
you probably want to save this under 'data/publicationProfiles'
so that you can upload them later to the main branch via a pull request."),
h6("If this is greek to you, you can save it to any local and dedicated folder
on you computer and contact the project leader about how to get you csv file
submitted to the main github branch"),
actionButton("validate_p", "Simplified validation"),
tags$div(title = "Click to open a 'Save as' dialogue window.\n\nDO NOT change the file name.",
downloadButton("downloadData", "Download"))
)
)
), # end tab
# '-------------
# **TAB Register indicator ----
tabPanel("Register indicator",
sidebarLayout(
sidebarPanel(width = 6,
style = "position: fixed; width: 45%; height: 90vh; overflow-y: auto;",
h5(tags$i("Hover the input fields for more information and examples of use")),
# 4 INPUT iNew --------
tags$div(title = "Click Edit to import and modify a existing publication profile, or click Create new to start processing a new publication.",
radioGroupButtons(
inputId = "iNew",
label = NULL,
choices = c("Edit", "Create new"),
selected = "Create new"
)),
# 4 INPUT localInd ----
# Here's an option for manually locating the local folder
# containing unpublished (unpushed) indicator profiles.
# The files, or paths, in the folder are listed, read, and compiled.
conditionalPanel("input.iNew == 'Edit'",
h4("Locate and upload existing publication profile:", style="background-color:lightblue;"),
h5("Here you can choose to upload a cvs file so that you can modify them.\n
In order to find the correct file, first use the 'Choose CVS files'
function to select all the crypically names files (typically using Ctrl+A inside
the main folder containing the publication og indicator profiles).
Then choose the correct file from the dropdown list. A preview of the import
allows you to adjust import settings like headers and seperators."),
tags$div(title = "Use this functionality to find an already existing indicator profile in order to edit it.
Navigate to the folder containg the file you want. If there are more than one file in the folder then slect all (Ctrl+A).
All the files need to be csv-files created using this app.",
fileInput("localInd", "Choose CSV files",
multiple = T,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"))),
# 4 INPUT indDrop ----
# Drop down list of publication profiles
# Profiles (for indicators and publications alike)
# are stored using time stamps as file names.
# To find and upload the correct file (to modify it)
# requires that we first must read the indicator names
# stored inside all the files
tags$div(title = "This dropdown menu is poplated with indicator names from the files you selected above. Pick the one you want.",
pickerInput('indDrop', 'Select indicator by its name',
choices = NA,
options = list(
`live-search` = TRUE))),
# 4 INPUT i_header ----
#Checkbox if file has header
checkboxInput("i_header", "Header", TRUE),
# 4 INPUT i_sep ----
#Select separator
tags$div(title = "This option should normally not be changed - all files from this app are saved using ',' as seperator.",
radioGroupButtons("i_sep", "Separator",
choices = c(Comma = ",",
Semicolon = ";",
Tab = "\t"),
selected = ",")),
# 4 INPUT i_quote ----
# Select quotes
radioGroupButtons("i_quote", "Quote",
choices = c(None = "",
"Double Quote" = '"',
"Single Quote" = "'"),
selected = '"'),
# 4 INPUT i_disp ----
# Select number of rows to display
radioGroupButtons("i_disp", "Display",
choices = c(Head = "head",
All = "all"),
selected = "head"),
# 4 INPUT i_populate ----
tags$div(title = "Populate form from uploaded file. \n\nOBS! Toggling the switch below will reset the form and delete unsaved work.",
style="color:red; text-decoration-line: underline;",
materialSwitch(
inputId = "i_populate",
label = "Populate form (careful...)",
value = FALSE,
status = "info"))
),
tags$hr(),
# create some space
br(), br(),
# 4 INPUT localPubTitles
h4("Tie the indicator to the correct publication", style="background-color:lightblue;"),
h5("Click", style = "display: inline;"),
tags$i("Choose CVS files",style = "display: inline;"),
h5("and navigate to the folder
containing all the publication profiles. Select all
the files in tha folder using Ctr+A and press Open",
style = "display: inline;"),
# I've only added the functionality to import local publicatio profiles, and not profiles from GitHub.
# This can be added later potentially.
tags$div(title = "Use this functionality to locate the already existing publication profile so that you may later find the publication associated with this indicator.
All the files need to me csv-files created using this app.",
# 4 INPUT localPub2 ----
fileInput("localPub2", "Choose CSV files",
multiple = T,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"))),
# 4 INPUT pubDrop2 ----
# Drop down list of publication titles
tags$div(title = "This dropdown menu is poplated with publication titles from the files you selected above. Pick the one you want.",
pickerInput('pubDrop2', 'Select the associated publication by its title',
choices = NA,
options = list(
`live-search` = TRUE,
title = "Noting selected"
))),
tags$hr(),
h4("General fields:", style="background-color:lightblue;"),
# 4 INPUT githubUser2 ----
tags$div(title = "Example: 'anders-kolstad'. \n\nNote: please update the contact info in you GitHub profile.",
textInput("githubuser2",
"Enter your GitHub user name",
value = "")),
br(),
# 4 INPUT UUID ----
conditionalPanel("input.iNew == 'Create new'",
actionButton("iuuid_new", "Regenerate UUID"
)),
br(),
# 4 INPUT iName ----
tags$div(title = "Type a human readable name for the indicator. Preferably unique. For example: Tree cover Netherlands.",
textInput("iName",
"Indicator name",
value = "ENTER INDICATOR NAME")),
# 4 INPUT iComment ----
tags$div(title = "Here you can for example ellaborate on possible uncertanties if the indicator should be included in the review or not.",
textInput("iComment",
"Comments on the indicator",
value = "")),
# 4 INPUT iRedundant ----
tags$div(title = "Is the indicator described in another reference? For example, you are processing an indicator presented in an assessment of ecosystem condition, but it is also described in a seperate peer-reviewed paper cited in the assessment. Select 'Redundant' or 'Partly redundant' here to flag it as potentially redundant, and add the source reference that can be used to manually link these references later. Note that if you are processing the peer-reviewed paper, you will not be aware of this redundancy/duplicate issue and should not flag it as redundant.",
radioGroupButtons(
inputId = "iRedundant",
label = "Redundant?"
,
choices = c("Redundant", "Possibly redundant", "Unique"),
selected = "Unique"
)),
# 4 INPUT iRedundantRemarks ----
conditionalPanel(condition = "input.iRedundant != 'Unique'",
tags$div(title = "Use this field to elaborate if you chose 'Partly or 'Yes' above",
textInput("iRedundantRemarks",
"Comments on why it may be redundant",
value = "")),
# 4 INPUT iRedundantReferences ----
tags$div(title = "Enter a reference, preferrabluy a doi, to the duplicate resource. For example, if the paper you are reading reports an indicator that it borrows from another reference that they cite. All duplicates, with the exeption of pre-prints when published versione exist, should be processed in the app in the normal way.",
textInput("iRedundantReferences",
"Source reference",
value = ""))
),
# 4 INPUT iContinent ----
tags$div(title = "Select the continent(s) where the indicator has been applied, eiether as a test or as part of an assessment.",
pickerInput(
inputId = "iContinent",
label = "Continent(s)",
multiple = T,
choices = c("Africa",
"Antarctica",
"Asia",
"Australia",
"Europe",
"North America",
"South America"
),
options = list(
`multiple-separator` = " | "
)
)),
# 4 INPUT iCountry ----
tags$div(title = "Search and select the country(ies) where the indicator has been applied, eiether as a test or as part of an assessment. Only use this is its two or three countries. Don't list all the countries in EU for example. ",
pickerInput('iCountry', 'Country',
choices = ISO3166_v2,
multiple = T,
options = list(
`live-search` = TRUE,
`actions-box` = TRUE,
`deselect-all-text` = "Deselect all",
`multiple-separator` = " | "
))),
# 4 INPUT iLowerGeography ----
tags$div(title = "If relevant, type the name of any lower geography, i.e. the name of an area/place/region within a country, where the indicator has been applied.
Example: Oslo",
textInput("iLowerGeography",
"Lower geography (if relevant)",
value = "")),
# 4 INPUT iLatitude ----
#conditionalPanel("input.iLowerGeography != ''",
# tags$div(title = "Optional. Enter the Latitude of the Lower Geography in decimal degrees WGS84",
# numericInput("iLatitude",
# "Latitude",
# value = NA,
# min = -90,
# max = 90,
# step = 0.1)),
# tags$div(title = "Optional. Enter the Longitude of the Lower Geography in decimal degrees WGS84",
# numericInput("iLongitude",
# "Longitude",
# value = NA,
# min = -90,
# max = 90,
# step = 0.1))
# ),
# 4 INPUT iET ----
tags$div(title = "Ecosystem type (multiple choice)",
pickerInput('iET', 'Ecosystem type',
choices = ETs,
multiple = T,
options = list(
`multiple-separator` = " | "
))),
actionButton("iETINFO", "",
icon = icon("info")),
# 4 INPUT iETlink ----
tags$div(title = "Conceptual connection between the variable and the ET",
pickerInput('iETlink',
'Connection to ecosystem type',
choices = ETlink,
options = list(
title = "Noting selected")
)),
actionButton("iETlinkINFO", "",
icon = icon("info")),
tags$hr(),
h4("Fields related to the underlying dataset(s):", style="background-color:lightblue;"),
# 4 INPUT dName ----
tags$div(title = "The name of the underlying dataset(s) (comma seperated). If there are several underlying datasets, consider mentioning only the most essential one, the one that determines the main characteristics of the resulting indicator.
Example: The Norwegian Forest Inventory, Living Planet Index",
textInput("dName",
"Dataset name(s)",
value = "")),
# 4 INPUT dReference ----
tags$div(title = "If possible, enter a reference (e.g. url, doi) to the dataset(s) (comma seperated) mentioned above",
textInput("dReference",
"Dataset reference(s)",
value = "")),
# 4 INPUT dOrigin ----
tags$div(title = "The origin of the underlying dataset. If the indicator requires modelling, this question asks about the data that goes into the model, not the model output. If the indicator is designed around several datasets, consider if one dataset is more important than the rest, and report only for that. Otherwise, yuo may also check multiple boxes here to account for multiple datasets with different origins.",
pickerInput('dOrigin', 'Dataset origin',
choices = c("RS - remotely sensed",
"MP - established monitoring program",
"FS - field sampling",
"CS - crowd sourced",
"EO - expert opinion",
"OT - others or unsure"),
multiple = T,
options = list(
`multiple-separator` = " | "
))),
# 4 INPUT dSpatialCoverage ----
tags$div(title = "Saying something about the level of area representativeness in the underlying dataset(s).",
pickerInput('dSpatialCoverage', 'Spatial Coverage of underlying dataset',
choices = coverage,
options = list(
title = "Noting selected"))),
actionButton("dSpatialCoverageINFO", "",
icon = icon("info")),
tags$hr(),
h4("Fields related to the indicator itself:", style="background-color:lightblue;"),
# 4 INPUT iDescriptionSnippet ----
tags$div(title = "A snippet of text (1-10 lines) COPIED DIRECTLY from the original publication, describing the indicator, its relevans and how it is produced or calculated.",
textInput("iDescriptionSnippet",
"Indicator description - snippet",
value = "")),
# 4 INPUT iDescription ----
tags$div(title = "A relatively short description (can be a single sentence) of the indicator and what it represents. Usually it can be a shortened version of the iDescriptionSnippet",
textInput("iDescription",
"Indicator description",
value = "")),
# 4 INPUT iSpatialExtent ----
tags$div(title = "What is the extent (size of the total area) for which the indicator has been calculated? Do not consider parts of the same dataset or indicator which is not reported in this exact publication.
Example: If you have an indicator on forest canopy structure which is reported with unique estimates at regional levels across Norway, and which is based on area representaive monitoring data, then the spatial extent is country",
pickerInput('iSpatialExtent', 'Spatial extent',
choices = scale1,
options = list(
title = "Nothing selected"))),
actionButton("iSpatialextentINFO", "",
icon = icon("info")),
# 4 INPUT iSpatialResolution ----
tags$div(title = "What is the finest spatial scale that this indicator has been calcuated at?",
pickerInput('iSpatialResolution',
'Spatial resolution or grain',
choices = scale1,
options = list(
title = "Nothing selected"))),
actionButton("iSpatialresolutionINFO", "",
icon = icon("info")),
# 4 INPUT iYear ----
tags$div(title = "The latest year for which the indicator value has been caluculated and reported",
numericInput("iYear",
"Year",
value = NA,
min = 1900,
max = 2100,
step = 1,
width = '30%')),
# 4 INPUT iTemporalCoverage ----
tags$div(title = "The length of the time series at the time of publication (years).
\nDuration less than 1 year is reported as 1 year.
\nIf unknown, enter 999.
",
numericInput("iTemporalCoverage",
"Temporal coverage (length of time series)",
value = NA,
min = 1,
step = 1,
width = '30%')),
# 4 INPUT iMap ----
tags$div(title = "Is the indicator presented as a map? This map may be included in the printable publication or simply linked to or made available on a digital platform.",
pickerInput(
inputId = "iMap",
label = "Presented as map?",
choices = maps,
options = list(
title = "Nothing selected")
)),
# 4 INPUT iBiome ----
tags$div(title = "IUCN Global Ecosystem Typology 2.0, level 2.",
pickerInput('iBiome', 'Biome',
choices = c(
"T1 - Tropical-subtropical forests",
"T2 - Temperate-boreal forests & woodlands",
"T3 - Shrublands & shrubby woodlands",
"T4 - Savannas and grasslands",
"T5 - Deserts and semi-deserts",
"T6 - Polar-alpine",
"T7 - Intensive land-use systems",
"UNK - Unknown or dont fit"),
multiple = T,
options = list(
`multiple-separator` = " | "
)
)),
HTML("<p>Link to <a href='https://global-ecosystems.org/explore/realms/T', target='_blank'> definitions</a>.</p>"),
# 4 INPUT iSubIndex ----
tags$div(title = "Is the indicator a composite indicator, like a sub-index, made op of several variables/criteria. For example, the red-list index is composed of data on multiple species. On the other hand, the Shannon index is not a composite indicator (but it is an index).",
pickerInput('iSubIndex',
'Composite indicator?',
choices = c("No", "Yes", "Unclear"),
options = list(
title = "Nothing selected"))),
actionButton("iSubIndexINFO", "",
icon = icon("info")),
# 4 INPUT iModelling ----
tags$div(title = "Does the indicator (or the reference value) require modeling outside of what is included in the underlying dataset (i.e. lots of mathemtical steps)? This typically means the indicator is derived from raw data, but it is not itself the raw data.",
pickerInput('iModelling',
'Is the indicator a result from a model?',
choices = c("No", "Yes", "Unclear"),
options = list(
title = "Nothing selected"))),
actionButton("iModellingINFO", "", icon = icon("info")),
# 4 INPUT iOriginalUnits ----
tags$div(title = "Original unit for the variable. e.g. meters, hectares, kilograms. For unitless indicators, write 'unitless'.",
textInput("iOriginalUnits",
"Original units",
value = "")),
tags$hr(),
h4("Fields related to SEEA EA:", style="background-color:lightblue;"),
# 4 INPUT iECTclass ----
tags$div(title = "The class may not be reported, and in any case, it's is the reviewer that must assign the indicator to the correct or the most correct class.",
pickerInput('iECTclass', 'SEEA Ecosystem Condition Typology Class',
choices = ECTs,
options = list(
title = "Nothing selected")
)),
HTML("<p>Link to <a href='https://oneecosystem.pensoft.net/article/58218/', target='_blank'> definitions</a>. (Scroll to Table 1).</p>"),
actionButton("iECTclassINFO", "", icon = icon("info")),
# 4 INPUT iECTsnippet ----
tags$div(title = "A short excerpt from the publication (1-10 sentences) that justifies the ECT assignment. It may be the same text as what you use in 'Indicator description - snippet', but without the same technical details. Here it is more about the ecological significans of the indicator",
textInput("iECTsnippet",
"ECT snippet",
value = "")),
tags$hr(),
h4("Fields related to the reference condition:", style="background-color:lightblue;"),
# 4 INPUT rType ----
tags$div(title = "The list of options is non-exhaustive, but chose the one you think fits best. Otherwise select 'other'. For definitions, see SEEA EA white paper table 5.8, page 115.",
pickerInput('rType',
"Type of reference condition",
choices = refStates,
options = list(
title = "Nothing selected")
)),
actionButton("rTypeINFO", "", icon = icon("info")),
# 4 INPUT rTypeSnippet ----
tags$div(title = "A short excerpt from the publication (1-10 sentences) that justifies the assignment of reference condition. The text must be directly copied, but may consist of sentences that are not next to each other in the original text. Note that we are NOT asking about REFERENCE VALUES here.",
textInput("rTypeSnippet",
"Reference condition - snippet",
value = "")),
# 4 INPUT rTypeRemarks ----
tags$div(title = "An optional field where you can comment on the choice of reference condition
Example: Year 1850 was used to define the reference condition.",
textInput("rTypeRemarks",
"Comments on choice of reference condition",
value = "")),
tags$hr(),
h4("Fields related to the reference values:", style="background-color:lightblue;"),
# 4 INPUT rDeliberate ----
tags$div(title = "Was the choice of reference values the result of a deliberate process, or are they 'accidental'.",
pickerInput("rDeliberate",
"Deliberate and stated choice",
choices = deliberate,
options = list(
title = "Nothing selected"))),
actionButton("rDeliberateINFO", "", icon = icon("info")),
# 4 INPUT rMethod ----
tags$div(title = "See definitions in the SEEA EA white paper A5.5 - A5.11 (page 116).",
pickerInput("rMethod",
"What method(s) was used for estimating the reference levels? (multiple choice)",
choices = refValMethod,
multiple = TRUE)),
actionButton("rMethodINFO", "", icon = icon("info")),
# 4 INPUT rRescalingMethod ----
tags$div(title = "Pick the category that fits the best. If a two-sided rescaling has been done (i.e. both values that are higher and those that are lower than the reference value is scaled to become indicator values lower than the maximum possible value), this should always be chosen. If the variable is normalised between two extremes (a best and worst possible condition for example), this implies a linear rescaling method.",
pickerInput('rRescalingMethod',
"Rescaling method",
choices = rescalingMethod,
options = list(
title = "Nothing selected")
)),
# 4 INPUT rResolution ----
tags$div(title = "The finest geographical resolution of the reference value(s). The scale for the reference value is often somewhere between that of iSpatialExtent and iSpatialResolution.
If the reference value is the same across the EAA, then rResolution equals iSpatialExtent.
If the reference values are unique to each indicator value (i.e. unique reference value for each grid cell), then rResolution equals iSpatialResolution.",
pickerInput('rResolution',
"Spatial resolution of the reference value(s)",
choices = scale1,
options = list(
title = "Nothing selected")
)),
# 4 INPUT rMax ----
tags$div(title = "A definition or description of the upper reference value, i.e. the maximum indicator value.
\nExamples: 'A species composition similar to a reference community, or
\nan air temperatur similar to the mean for the last climatic normal period.'",
textInput("rMax",
"Explanation of the upper reference value",
value = "")),
# 4 INPUT rMin ----
tags$div(title = "A definition or description of the lower limit for the indicator (the porest condition).
\nExample: 'Species extinct'",
textInput("rMin",
"Explanation of the lower limit value",
value = "")),
h4("Create file name", style="background-color:lightblue;"),
# 4 INPUT replace_i ----
tags$div(title = "Chose whether to create a new file name (and hence a new file) for the csv file that you are about to export, or to overwrite the uploaded file that you have edited.",
radioGroupButtons(
inputId = "replace_i",
label = "Replace the uploaded file?",
choices = c("Replace the uploaded file",
"Create a new file")
)
),
h6("This is the new filename:"),
textOutput('newFileName_i'),
h6("Don't create a new file name if you have edited an existing file. The UUIDs will not have changed.",
style="color:red;")
), # end side panel
mainPanel(width = 6,
conditionalPanel("input.iNew == 'Edit'",
# 4 OUTPUT: i_uploaded ----