forked from agbarnett/helping.funders
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
117 lines (95 loc) · 5.46 KB
/
ui.R
File metadata and controls
117 lines (95 loc) · 5.46 KB
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
# UI for helping.funders
# June 2017
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=''),
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
numericInput(inputId = "years.since",
label = "Earliest year of papers:",
min = 1970,
max = 2017,
step = 1,
value = 2013),
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("Ascending year" = "ayear",
"Descending year" = "dyear",
"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 = "Report style:",
choices = c("APA" = "APA",
"Harvard" = "Harvard",
"ARC" = "ARC"),
selected = 'APA'),
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
# does not work
#fluidRow(
# column(width=4, offset=0,
# "Thanks to Scott Chamberlain for help with R.")),
)))