library(shiny)
library(shinydashboard)
######### UI #######
current_year <- as.integer(format(Sys.Date(), "%Y"))
tab_import_pubmed <- tabItem(
tabName = "import_pubmed",
h1("Import Pubmed/Medline Data"),
box(
title = "Préparer la requête PubMed",
status = "warning",
solidHeader = TRUE,
textInput(inputId = "author_lastname", label = "Nom", value = "Muller"),
textInput(inputId = "author_firstname", label = "Prénom", value = "Joris"),
textInput(inputId = "affiliation",
label = "Affiliations",
value = "Strasbourg ; Lille"),
sliderInput("year_range",
label = "Années",
min = 1950,
max = current_year,
value = c(current_year - 10, current_year),
step = 1,
round = T,
sep = "",
dragRange = T,
),
textInput(inputId = "other_pubmed_query",
label = "Autre requête PubMed",
placeholder = "'journal article'[Publication Type]"),
actionButton(inputId = "submit",
label = textOutput("search_button_text"),
icon = icon("search"))
),
box(
title = "Requête",
textOutput("pubmed_query")
)
,
# infoBoxOutput("infobox_df_sigaps"),
infoBoxOutput("info_nb_imported"),
infoBoxOutput("infobox_score"),
fileInput("xml_file",
label = "XML file (optional)", multiple = F,
accept = "application/xml")
)
ui <- dashboardPage(
dashboardHeader(disable = TRUE),
dashboardSidebar(
sidebarMenu(
menuItem(text = "RIGAPS",
tabName = "help",
icon = icon("question-circle")),
menuItem(text = "Papers ranks",
tabName = "import_sigaps",
icon = icon("database"),
badgeLabel = "Start here",
badgeColor = "orange"),
menuItem(text = "Import PubMed",
tabName = "import_pubmed",
icon = icon("search"),
badgeLabel = "Not ready",
badgeColor = "red"),
menuItem(text = "Select publications",
tabName = "select",
icon = icon("hand-o-right")),
menuItem(text = "Analyze",
tabName = "analyze",
icon = icon("line-chart"))
)
),
dashboardBody(
tabItems(
tab_import_pubmed,
tabItem(tabName = "import_sigaps",
includeMarkdown(path = "texts/import_sigaps.md"),
fileInput("sigaps_html_file",
label = "Import SIGAPS paper rank HTML",
multiple = F,
accept = "text/html"),
infoBoxOutput("infobox_df_sigaps"),
p("If you want to avoid this step each time you use RIGAPS, you can save this data inside the package by pushing the button above"),
actionButton(inputId = "save_sigaps_in_package",
label = "Save Paper Rank in RIGAPS package",
icon = icon("floppy-o"))
),
tabItem(tabName = "select",
downloadButton(outputId = "download_csv",
label = "Download this table in csv",
icon = icon("download")),
# h3("Testss"),
# p("Selected publications for"),
# h4(textOutput("sigaps_sum")),
DT::dataTableOutput('paper_dt')
# actionButton("recalculate",
# label = "recalculer",
# icon = icon("calculator")
# )
),
tabItem(tabName = "analyze",
h1("Analyze"),
p("Score SIGAPS : "),
textOutput("sigaps_score"),
DT::dataTableOutput('dt_author_ranks'),
DT::dataTableOutput('dt_paper_ranks')
)
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.