-
Notifications
You must be signed in to change notification settings - Fork 6
/
ui.R
132 lines (107 loc) · 6.68 KB
/
ui.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
# UI for helping.funders
# March 2018
shinyUI(fluidPage(
# Application title
tags$h2("Reducing the administrative burden on researchers"),
div(p(HTML(paste0("Researchers are often asked by funders to give their publication list, but funders often have different requirements (e.g., all papers versus only those in the last five years) and researchers waste a lot of time formating papers. ",
"This page takes a researcher`s ", tags$a(href="https://orcid.org/content/orcid-public-data-file", "ORCID ID"), ' and outputs their papers in alternative formats to suit what the funder wants.
It uses ', a(href="https://www.crossref.org/", "crossref"), ', ',
a(href="https://cran.r-project.org/web/packages/rentrez/vignettes/rentrez_tutorial.html", "rentrez"), ' and ',
a(href="https://cran.r-project.org/web/packages/roadoi/vignettes/intro.html", "roadoi"), ' to supplement the ORCID data. It may take a while for the output to appear because of the use of multiple databases.')))),
p("Funders should stop asking researchers to paste or type their papers into an application form. ",
"If any funders are interested I can set up a batch process just ", tags$a(href='mailto:a.barnett@qut.edu.au', 'e-mail'), ' me. Also please ', tags$a(href='mailto:a.barnett@qut.edu.au', 'e-mail'), ' if you find a bug or have any ideas for improvements. Thanks to Scott Chamberlain for help with R.', sep=''),
p("If you want results for a group of researchers then upload a plain text file with one orcid ID per row, with no headers or footers (", tags$a(href="https://github.com/agbarnett/helping.funders/blob/master/example.file.txt", "see here"), "for an example file). This will examine the groups` combined publications after removing duplicates.", sep=''),
strong("If papers are missing or no papers appear then please first check your ", tags$a(href="https://orcid.org/", "ORCID profile"),"as that may need updating."),
div(p(HTML(paste0("The list will only include public works data on the ORCID record that have a ", a(href="https://en.wikipedia.org/wiki/Digital_object_identifier", "DOI"), ". Please check your papers as I cannot guarantee that lists are correct or complete.")))),
p("You might also like my ", tags$a(href="https://aushsi.shinyapps.io/work-pals/", "other app"), "that creates a network diagram of groups of researchers` papers."),
sidebarLayout(
sidebarPanel(
textInput(inputId = "orcid.id",
label = "ORCID ID (16 digits with 3 dashes) ...",
value='0000-0003-3637-2423'), # Anisa
fileInput(inputId = 'orcid.file',
accept = c(
"text/comma-separated-values,text/plain",
".txt"),
label = '... or attach text file with one or more ORCID IDs'),
numericInput(inputId = "years.since",
label = "Earliest year of papers:",
min = 1970,
max = 2022,
step = 1,
value = 2016),
numericInput(inputId = "max.authors",
label = "Maximum number of authors:",
min = 1,
max = 50,
step = 1,
value = 3),
radioButtons(inputId = "order",
label = "Order papers by:",
choices = c("Most recent at top" = "dyear",
"Most recent at bottom" = "ayear",
"Journal name" = "journal"),
selected = 'ayear'),
checkboxGroupInput(inputId = "variable",
label = "What details to show in list:",
choices = c("Authors" = "Authors",
"Title" = "Title",
"Journal" = "Journal",
"Volume" = "Volume",
"Issue" = "Issue",
"Pages" = "Pages",
"Year" = "Year",
"DOI" = "DOI",
"Open Access" = "OA"),
selected = c('Title','Journal','Year')),
checkboxInput(inputId="additional", label="Show additional options",
value = FALSE, width='100%'),
conditionalPanel(
condition = "input.additional==1",
selectInput(inputId = "journal.only",
label = "What papers to include:",
choices = c("Journal articles only" = "Yes",
"Everything" = "No"),
selected = "No")),
conditionalPanel(
condition = "input.additional==1",
textInput(inputId = "spacer",
label = "Space between authors",
value=', ')),
conditionalPanel(
condition = "input.additional==1",
textInput(inputId = "keywords",
label = "Only show papers with these words in the title (separate words using a comma; case insensitive)",
value='')),
h3("Report using selections above"),
radioButtons(inputId = "style",
label = "Reference style:",
choices = c("APA" = "APA",
"Harvard" = "Harvard"),
selected = 'APA'),
radioButtons(inputId = "extra.order",
label = "Split papers by:",
choices = c("None" = "None",
"Books, papers, conferences (ARC style)" = "ARC",
"Author order" = 'split'),
selected = 'None'),
radioButtons(inputId = "bullets",
label = "Use bullets or numbers:",
choices = c("Bullets" = "bullets",
"Numbers" = 'numbers'),
selected = 'bullets'),
checkboxInput(inputId = "flag.OA",
label = "Highlight Open Access papers",
TRUE),
checkboxInput(inputId = "bold.author",
label = "Bold the author's name",
TRUE),
# report
downloadButton("report", "Generate Word document")
), # end of sidebar panel
mainPanel(
textOutput(outputId = 'h_text'),
h3('List of papers'),
tableOutput(outputId = 'table')
) # end of main panel
)))