htmltools::tags$script(src = "//code.jquery.com/jquery-1.11.1.min.js") htmltools::tags$script(src = "//cdn.opencpu.org/opencpu-0.4.js")
# devtools::install_github("Rstudio/flexdashboard") library(flexdashboard)
Test for a dashboard with opencpu.
Loading a page is slow due to the size of the web page loaded: so far 1.4 Mb. Most of the size is due to the flexdashboard interface (multiple pages & tab adjustment).
There is a trade off between the complexity of the page (mobile compatible or not, multiple pages, etc.) and the size of the page.
htmltools::tags$input(type="integer", class="form-control", id="myid", value="1", style = "width: 90%") htmltools::tags$button("Update dashboard!", type="submit", id="idsubmit", class="btn btn-default")
valueBox(0, icon = "fa-pencil", color = '#01bb69')
valueBox(0, icon = "fa-envelope-o", color = '#ff8039')
valueBox(0, icon = "fa-trash", color = '#fb305a')
valueBox(0, icon = "fa-puzzle-piece")
valueBox(0, icon = "fa-money", color = '#02a8ee')
gauge(90, min = 0, max = 100, gaugeSectors( success = c(80, 100), warning = c(40, 79), danger = c(0, 39) ))
gauge(30, min = 0, max = 100, gaugeSectors( success = c(41, 50), warning = c(21, 40), danger = c(0, 20) ))
gauge(8, min = 0, max = 100, gaugeSectors( success = c(0, 2), warning = c(3, 6), danger = c(7, 10) ))
htmltools::tags$div(id="plotdiv", style="height: 270px")
data("howell") ggplot2::ggplot(data = howell, ggplot2::aes(x = age, y = height, color = as.factor(male))) + ggplot2::geom_point()
data("howell") ggplot2::ggplot(data = howell, ggplot2::aes(x = age, y = weight, color = as.factor(male))) + ggplot2::geom_point()
htmltools::tags$button("Map", type="button", id="myBtn") htmltools::tags$iframe(src="about:blank", style='height: 620px;width: 1300px;display: none;')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.