Skip to content

Commit

Permalink
add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
stephpenn1 committed Dec 18, 2023
1 parent c776483 commit 66b9800
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 61 deletions.
6 changes: 4 additions & 2 deletions h2/app.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source("./global.r")

ui <- fluidPage(
ui <- fluidPage(theme = shinythemes::shinytheme("readable"),
includeCSS("./components/layout/style copy.css"),
tags$div(class = "container",
tags$img(src = "images/earth-header.png", height = "300px", width = "100%", class = "earth", alt = "Earth's atmosphere"),
Expand All @@ -24,9 +24,11 @@ ui <- fluidPage(
#download_ui("download_1"),
)
),
tabPanel(title = "Carbon Tracking"),
tabPanel(title = p(icon("chart-pie","fa-2x"), "Carbon Tracking", value="outputTab")),
tabPanel(title = "About")
),
hr(),
includeHTML("./components/layout/footer.html")
)

server <- function(input, output, session) {
Expand Down
1 change: 1 addition & 0 deletions h2/components/layout/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class = "sticky-footer" > This research was supported in part by the <a href = "https://www.energy.gov/science/office-science"> U.S. Department of Energy, Office of Science</a> , as part of research in <a href = "https://climatemodeling.science.energy.gov/program/multisector-dynamics"> MultiSector Dynamics </a> Earth and Environmental System Modeling Program. <a href = "https://www.pnnl.gov/"> The Pacific Northwest National Laboratory </a> is operated for DOE by Battelle Memorial Institute. The authors also received support for this research through the U.S. Environmental Protection Agency. </p>
2 changes: 1 addition & 1 deletion h2/components/layout/homepage.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p class = "test">Welcome to the user interface for <b>Hector</b>: an open source, object-oriented, and interactive simple global climate carbon-cycle model. It runs essentially instantaneously while still representing the most critical global scale earth system processes, and is one of a class of models heavily used for for emulating complex climate models and uncertainty analyses.
<p class = "home-text"> Welcome to the user interface for <b>Hector</b>: an open source, object-oriented, and interactive simple global climate carbon-cycle model. It runs essentially instantaneously while still representing the most critical global scale earth system processes, and is one of a class of models heavily used for for emulating complex climate models and uncertainty analyses.
</br>
</br>
This interactive version is built upon previous work by developers at the <a href = "https://www.pnnl.gov/projects/jgcri">Joint Global Change Research Institute (JGCRI)</a>, including the development of the initial C++ version of Hector, and the follow up R Package "Hector R".</p>
22 changes: 21 additions & 1 deletion h2/components/layout/style copy.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ h5 {
body
{
font-family:"Barlow Regular", Sans-Serif !important;
font-size: 20px;
}

.about-info
Expand Down Expand Up @@ -88,3 +87,24 @@ body
{
font-size: 14px;
}

.navbar-nav
{
float:none;
margin:0 auto;
display: block;
text-align: center;
color: #000000;
}

.navbar-nav > li {
display: inline-block;
float:none;
color: #000000;
}

.sticky-footer
{
font-size: 12px;
}
}
110 changes: 53 additions & 57 deletions h2/components/modules/mod_run.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ run_ui <- function(id) {
tabsetPanel(
tabPanel(class = "params", "Standard Scenarios",
chooseSliderSkin(skin = "Flat", color = "#375a7f"),
prettyRadioButtons(ns("ssp_path"), label="Select SSP:",
choices = list("SSP 1-1.9"="input/hector_ssp119.ini",
"SSP 1-2.6"="input/hector_ssp126.ini",
"SSP 2-4.5"="input/hector_ssp245.ini",
"SSP 3-7.0"="input/hector_ssp370.ini",
"SSP 4-3.4"="input/hector_ssp434.ini",
"SSP 4-6.0"="input/hector_ssp460.ini",
"SSP 5-3.4OS"="input/hector_ssp534-over.ini",
"SSP 5-8.5"="input/hector_ssp585.ini"),
selected = "input/hector_ssp245.ini", inline=TRUE,
shape = "square", width = "80%"),
selectInput(ns("ssp_path"), label="Select SSP:",
choices = list("SSP 1-1.9"="input/hector_ssp119.ini",
"SSP 1-2.6"="input/hector_ssp126.ini",
"SSP 2-4.5"="input/hector_ssp245.ini",
"SSP 3-7.0"="input/hector_ssp370.ini",
"SSP 4-3.4"="input/hector_ssp434.ini",
"SSP 4-6.0"="input/hector_ssp460.ini",
"SSP 5-3.4OS"="input/hector_ssp534-over.ini",
"SSP 5-8.5"="input/hector_ssp585.ini"),
selected = "input/hector_ssp245.ini"),
sliderInput(ns("time"), label="Select dates:",
min = 1750, max = 2300, value = c(1900,2100), sep="", width = "90%", step=5),
h5("Model Parameters"),
Expand All @@ -32,58 +31,55 @@ run_ui <- function(id) {
sliderInput(ns("q10_rh"), label="Heterotrophic temperature sensitivity", # Q10_RH()
min = 1, max = 5, value = 2, step=0.1, width = "90%"),
sliderInput(ns("volscl"), label="Volcanic forcing scaling factor", # VOLCANIC_SCALE()
min = 0, max = 1, value = 1, width = "90%"),
materialSwitch(ns("savetoggle"),"Save Run", value = FALSE),
textInput(ns("run_name"), label = "Run Name", placeholder = "Run 1"),
dropdownButton(inputId = ns("dropdown"),
icon = icon("gear"),
circle = TRUE,
status = "primary",
dataTableOutput(ns("savetable")),
actionButton(ns("deleteRuns"), "Delete Selected")
)
min = 0, max = 1, value = 1, width = "90%")
)
)

),
mainPanel(width = 8,
tabsetPanel(
tabPanel(p(icon("chart-line","fa-2x"), "Scenario Output", value="outputTab"),
br(),
fluidRow(
column(4,
selectInput(ns("variable"), "Select variable:",
list("Carbon Cycle" = list("Atmospheric CO2" = CONCENTRATIONS_CO2(),
"FFI Emissions" = FFI_EMISSIONS(),
"LUC Emissions" = LUC_EMISSIONS()),
"Concentrations" = list("N2O Concentration" = CONCENTRATIONS_N2O()),
"Emissions" = list("Black Carbon Emissions" = EMISSIONS_BC(),
"Organic Carbon Emissions" = EMISSIONS_OC()),
"Forcings" = list("RF - Total" = RF_TOTAL(),
"RF - Albedo" = RF_ALBEDO(),
"RF - CO2" = RF_CO2(),
"RF - N2O" = RF_N2O(),
"RF - Black Carbon" = RF_BC(),
"RF - Organic Carbon" = RF_OC(),
"RF - Total SO2" = RF_SO2(),
"RF - Volcanic Activity" = RF_VOL(),
"RF - CH4" = RF_CH4())),
selected = "Atmospheric CO2", multiple = FALSE),
),
column(3,
actionBttn(ns("run"),"Run", color = "primary"),

)
),
fluidRow(
withSpinner(plotlyOutput(ns("graph")))
)
),
tabPanel(p(icon("globe-americas","fa-2x"), "World Maps", value="outputTab")
),
tabPanel(p(icon("chart-pie","fa-2x"), "Carbon Tracking", value="outputTab")
fluidRow(
column(4,
selectInput(ns("variable"), "Choose Output Variable:",
list("Carbon Cycle" = list("Atmospheric CO2" = CONCENTRATIONS_CO2(),
"FFI Emissions" = FFI_EMISSIONS(),
"LUC Emissions" = LUC_EMISSIONS()),
"Concentrations" = list("N2O Concentration" = CONCENTRATIONS_N2O()),
"Emissions" = list("Black Carbon Emissions" = EMISSIONS_BC(),
"Organic Carbon Emissions" = EMISSIONS_OC()),
"Forcings" = list("RF - Total" = RF_TOTAL(),
"RF - Albedo" = RF_ALBEDO(),
"RF - CO2" = RF_CO2(),
"RF - N2O" = RF_N2O(),
"RF - Black Carbon" = RF_BC(),
"RF - Organic Carbon" = RF_OC(),
"RF - Total SO2" = RF_SO2(),
"RF - Volcanic Activity" = RF_VOL(),
"RF - CH4" = RF_CH4())),
selected = "Atmospheric CO2", multiple = FALSE),
)

),
fluidRow(
column(2,
actionBttn(ns("run"),"Run", color = "primary")
),
column(3,
materialSwitch(ns("savetoggle"),"Save Run", value = FALSE)
),
column(5,
textInput(ns("run_name"), label = "Run Name", placeholder = "Run 1")
),
column(2,
dropdownButton(inputId = ns("dropdown"),
icon = icon("gear"),
circle = TRUE,
status = "primary",
dataTableOutput(ns("savetable")),
actionButton(ns("deleteRuns"), "Delete Selected")
)
)
),
fluidRow(
withSpinner(plotlyOutput(ns("graph")))
)
)
)
Expand Down

0 comments on commit 66b9800

Please sign in to comment.