Closed Aariq closed 1 year ago
Simple example that works in Quarto:
---
title: "pointblank"
format: html
editor: visual
server: shiny
---
```{r}
library(shiny)
library(gt)
sliderInput("num", "Number for filtering table",
min = 1, max = 10, value = 10)
gt_output(outputId = "table")
#| context: server
#packages have to be in context: server also
library(gt)
library(pointblank)
output$table <-
gt::render_gt({
tbl <-
dplyr::tibble(
a = c(5, 7, 6, 5, 8, 7),
b = c(7, 1, 0, 0, 0, 3)
) |> dplyr::filter(a < input$num)
agent <-
create_agent(
tbl = tbl,
label = "`interrogate()` example"
) %>%
col_vals_gt(columns = vars(a), value = 5) %>%
interrogate()
get_agent_report(agent)
})
Implemented test in PR 29 (https://github.com/cct-datascience/azmet-qaqc/pull/29). Not sure that this is actually the way to go.
Might be implemented as a Shiny widget? Be able to choose date range and have pointblank validation re-run for only those dates.