Skip to content

Commit

Permalink
re-compile app
Browse files Browse the repository at this point in the history
  • Loading branch information
rpodcast committed Feb 8, 2024
1 parent ad489e0 commit 2931500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/app.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"app.R","content":"library(shiny)\nsource(\"R/utils.R\")\n\n# Define UI for app that draws a histogram ----\nui <- fluidPage(\n\n # App title ----\n titlePanel(hello_world()),\n\n # Sidebar layout with input and output definitions ----\n sidebarLayout(\n\n # Sidebar panel for inputs ----\n sidebarPanel(\n\n # Input: Slider for the number of bins ----\n sliderInput(inputId = \"bins\",\n label = \"Number of bins:\",\n min = 1,\n max = 50,\n value = 30)\n\n ),\n\n # Main panel for displaying outputs ----\n mainPanel(\n\n # Output: Histogram ----\n plotOutput(outputId = \"distPlot\")\n\n )\n )\n)\n\n# Define server logic required to draw a histogram ----\nserver <- function(input, output) {\n\n # Histogram of the Old Faithful Geyser Data ----\n # with requested number of bins\n # This expression that generates a histogram is wrapped in a call\n # to renderPlot to indicate that:\n #\n # 1. It is \"reactive\" and therefore should be automatically\n # re-executed when inputs (input$bins) change\n # 2. Its output type is a plot\n output$distPlot <- renderPlot({\n\n x <- faithful$waiting\n bins <- seq(min(x), max(x), length.out = input$bins + 1)\n\n hist(x, breaks = bins, col = \"#75AADB\", border = \"white\",\n xlab = \"Waiting time to next eruption (in mins)\",\n main = \"Histogram of waiting times\")\n\n })\n\n}\n\n# Create Shiny app ----\nshinyApp(ui = ui, server = server)","type":"text"},{"name":"R/utils.R","content":"hello_world <- function() {\n print(\"Hello World!\")\n}","type":"text"}]
[{"name":"app.R","content":"library(shiny)\nlibrary(pointblank)\nlibrary(gt)\nsource(\"R/utils.R\")\n\n# Define UI for app that draws a histogram ----\nui <- fluidPage(\n\n # App title ----\n titlePanel(hello_world()),\n\n # Sidebar layout with input and output definitions ----\n sidebarLayout(\n\n # Sidebar panel for inputs ----\n sidebarPanel(\n\n # Input: Slider for the number of bins ----\n sliderInput(inputId = \"bins\",\n label = \"Number of bins:\",\n min = 1,\n max = 50,\n value = 30)\n\n ),\n\n # Main panel for displaying outputs ----\n mainPanel(\n\n # Output: Histogram ----\n gt_output(\"gt_table\"),\n #plotOutput(outputId = \"distPlot\"),\n verbatimTextOutput(\"df\")\n\n )\n )\n)\n\n# Define server logic required to draw a histogram ----\nserver <- function(input, output) {\n\n dupdf <- podcastdb_dupdf_object()\n pb_object <- podcastdb_pointblank_object()\n # Histogram of the Old Faithful Geyser Data ----\n # with requested number of bins\n # This expression that generates a histogram is wrapped in a call\n # to renderPlot to indicate that:\n #\n # 1. It is \"reactive\" and therefore should be automatically\n # re-executed when inputs (input$bins) change\n # 2. Its output type is a plot\n # output$distPlot <- renderPlot({\n\n # x <- faithful$waiting\n # bins <- seq(min(x), max(x), length.out = input$bins + 1)\n\n # hist(x, breaks = bins, col = \"#75AADB\", border = \"white\",\n # xlab = \"Waiting time to next eruption (in mins)\",\n # main = \"Histogram of waiting times\")\n\n # })\n\n output$df <- renderPrint({\n str(dupdf)\n })\n\n output$gt_table <- render_gt({\n get_agent_report(pb_object, display_table = FALSE)\n })\n\n\n\n}\n\n# Create Shiny app ----\nshinyApp(ui = ui, server = server)","type":"text"},{"name":"R/utils.R","content":"hello_world <- function() {\n print(\"Hello World!\")\n}\n\npodcastdb_pointblank_object <- function() {\n tmp_file <- tempfile(pattern = \"pointblank\")\n download.file(\n url = config::get(\"pointblank_object_path\"),\n destfile = tmp_file\n )\n\n res <- pointblank::x_read_disk(\n filename = fs::path_file(tmp_file),\n path = fs::path_dir(tmp_file)\n )\n\n unlink(tmp_file)\n return(res)\n}\n\npodcastdb_dupdf_object <- function() {\n tmp_file <- tempfile(pattern = \"pointblank\")\n\n download.file(\n url = config::get(\"podcast_dup_df_path\"),\n destfile = tmp_file\n )\n\n res <- readRDS(tmp_file)\n\n unlink(tmp_file)\n return(res)\n}\n","type":"text"},{"name":"config.yml","content":"default:\n pointblank_object_path: \"https://podcast20-projects.us-east-1.linodeobjects.com/exports/podcastdb_pointblank_object/podcastdb_pointblank_object\"\n podcast_dup_df_path: \"https://podcast20-projects.us-east-1.linodeobjects.com/exports/podcast_dup_df.rds\"\n ","type":"text"}]

0 comments on commit 2931500

Please sign in to comment.