Quarto and JS libraries

Author

My name

Published

October 28, 2022

Basic plot interactivity using {g2r}

Code
library(dplyr)
library(tidyr)
library(purrr)
library(g2r)
library(DT)
library(myPackage)

data("unemp")

unemp <- unemp %>%
  mutate(year = as.character(year)) %>% 
  janitor::clean_names() %>%
  filter(level == "Commune")

There are 105 communes in the dataset. Below we plot the unemployment rate for 3 communes:

Code
unemp %>%
  filter(place_name %in% c("Luxembourg", "Esch-sur-Alzette", "Wiltz")) %>%
  g2(data = .) %>% 
  fig_line(asp(year, unemployment_rate_in_percent, color = place_name)) 

Interactive tables with {DT}

Code
unemp %>%
  DT::datatable(filter = "top") 

Others

You can find more widgets over here.