This page shows worked examples of using virgo to produce graphics for data analysis.

library(htmltools)
span_display <- function(img_path) {
  span(class = "display",
       style = paste0("background-image:url(", img_path, ");",
                      "background-size: auto 105%;",
                      "background-position: center center !important;")
  )
}

add_example <- function(href, img_path, title) {
  a(class = "virgo-group", href = href,
    span_display(img_path),
    span(class = "display-title", title)
  )
}

span(class = "gallery",
     add_example("linked-highlighting.html", 
                 "linked-highlighting.png",
                 "Linked Highlighting"),
     add_example("gapminder-model-drilldown.html",
                 "gapminder-model-drilldown.png",
                 "Model checking with filtering selections"),
     add_example("gapminder-animate.html",
                 "gapminder-animate.png",
                 "Connected scatterplot with slider"),
     add_example("minimap.html",
                 "minimap.png",
                 "Minimap bar charts")
)


vegawidget/virgo documentation built on May 3, 2021, 7:32 a.m.