Skip to content

Commit

Permalink
Just draft of the needed structure to code a shiny interface in order…
Browse files Browse the repository at this point in the history
… to call GeoClimate with OSM Data.
  • Loading branch information
MGousseff committed Oct 6, 2023
1 parent 39548b9 commit a7116d1
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions R/shinyGC/app.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
library(shiny)

# Define UI for app that draws a histogram ----
ui <- fluidPage(

# App title ----
titlePanel("Run Geoclimate with OSM Data on a location"),

# Sidebar layout with input and output definitions ----
sidebarLayout(

# Sidebar panel for inputs ----
sidebarPanel(

# Input: Slider for the number of bins ----


),

# Main panel for displaying outputs ----
mainPanel(

# Output: Histogram ----
plotOutput(outputId = "distPlot")

)
)
)

# Define server logic required to draw a histogram ----
server <- function(input, output) {

# Histogram of the Old Faithful Geyser Data ----
# with requested number of bins
# This expression that generates a histogram is wrapped in a call
# to renderPlot to indicate that:
#
# 1. It is "reactive" and therefore should be automatically
# re-executed when inputs (input$bins) change
# 2. Its output type is a plot
output$distPlot <- renderPlot({

x <- faithful$waiting
bins <- seq(min(x), max(x), length.out = input$bins + 1)

hist(x, breaks = bins, col = "#007bc2", border = "white",
xlab = "Waiting time to next eruption (in mins)",
main = "Histogram of waiting times")

})

}

shinyApp(ui = ui, server = server)
1 change: 1 addition & 0 deletions R/shinyGC/launchShinyGC.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shiny::runApp("/home/gousseff/Documents/2_CodesSources/R/lczexploreCleanOrbisgis/lczexplore/R/shinyGC/")

0 comments on commit a7116d1

Please sign in to comment.