Skip to content

Commit

Permalink
(up) test webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
geocarvalho committed Oct 10, 2024
1 parent a307a27 commit 128b6ba
Show file tree
Hide file tree
Showing 202 changed files with 454,766 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"app.R","content":"library(shiny)\nlibrary(bslib)\n\nui <- page_sidebar(\n title = \"censusVis\",\n sidebar = sidebar(\n helpText(\n \"Create demographic maps with information from the 2010 US Census.\"\n ),\n selectInput(\n \"var\",\n label = \"Choose a variable to display\",\n choices = c(\"Percent White\",\n \"Percent Black\",\n \"Percent Hispanic\",\n \"Percent Asian\"),\n selected = \"Percent White\"\n ),\n sliderInput(\n \"range\",\n label = \"Range of interest:\",\n min = 0, max = 100, value = c(0, 100)\n )\n ),\n textOutput(\"selected_var\"),\n textOutput(\"min_max\") \n)\n\nserver <- function(input, output) {\n \n output$selected_var <- renderText({\n paste(\"You have selected\", input$var)\n })\n \n output$min_max <- renderText({\n paste(\"You have chosen a range that goes from\",\n input$range[1], \"to\", input$range[2])\n })\n \n}\n\nshinyApp(ui, server)\n\n\n","type":"text"}]
11 changes: 11 additions & 0 deletions docs/edit/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Redirect to editable app</title>
<meta
http-equiv="refresh"
content="0;URL='../index.html?_shinylive-mode=editor-terminal-viewer'"
/>
</head>
<body></body>
</html>
28 changes: 28 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shiny App</title>
<script
src="./shinylive/load-shinylive-sw.js"
type="module"
></script>
<script type="module">
import { runExportedApp } from "./shinylive/shinylive.js";
runExportedApp({
id: "root",
appEngine: "r",
relPath: "",
});
</script>
<link rel="stylesheet" href="./shinylive/style-resets.css" />
<link rel="stylesheet" href="./shinylive/shinylive.css" />

</head>
<body>

<div style="height: 100vh; width: 100vw" id="root"></div>

</body>
</html>
2,357 changes: 2,357 additions & 0 deletions docs/shinylive-sw.js

Large diffs are not rendered by default.

Loading

0 comments on commit 128b6ba

Please sign in to comment.