server.R 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. library(shiny)
  2. # Load precomputed data
  3. sct_data <- readRDS(file = "data/rds/sct_data.rds")
  4. choropleth_data <- readRDS(file = "data/rds/choropleth_data.rds")
  5. parallelcoordinates_data <- readRDS(file = "data/rds/parallelcoordinates_data.rds")
  6. bar_data <- readRDS(file = "data/rds/bar_data.rds")
  7. radar_data <- readRDS(file = "data/rds/radar_data.rds")
  8. treemap_data <- readRDS(file = "data/rds/treemap_data.rds")
  9. tree_data <- readRDS(file = "data/rds/tree_data.rds")
  10. server <- function(input, output, session) {
  11. observe({
  12. session$sendCustomMessage(type="scatterplot_values", message = sct_data)
  13. })
  14. observe({
  15. session$sendCustomMessage(type="dendrogram_values",
  16. message = list(tree_data,
  17. bar_data,
  18. radar_data))
  19. })
  20. observe({
  21. session$sendCustomMessage(type="treemap2_values", message = treemap_data)
  22. })
  23. observe({
  24. session$sendCustomMessage(type="choropleth_values", message = choropleth_data)
  25. })
  26. observe({
  27. session$sendCustomMessage(type="parallelcoordinates_values", message = parallelcoordinates_data)
  28. })
  29. }