library(rscview) library(connectapi) library(pins) library(dplyr)
check_envvars() conn <- create_connection()
months_back <- 3 report_from <- lubridate::today() - lubridate::dmonths(months_back)
start_time <- Sys.time() shiny <- get_usage_shiny( conn, from = report_from, limit = Inf ) %>% mutate( started = lubridate::ymd_hms(started), ended = lubridate::ymd_hms(ended), session_duration = ended - started ) %>% filter(session_duration > lubridate::dseconds(5)) end_time <- Sys.time() duration <- end_time - start_time
Info: get_usage_shiny
took r paste(round(duration[[1]], 2), units(duration))
to run.
create_pin(shiny, name = "shiny_raw_usage", description = "Results pulled via `connectapi::get_usage_shiny()` for audit reports")
start_time <- Sys.time() nonshiny <- get_usage_static( conn, from = report_from, limit = Inf ) end_time <- Sys.time() duration <- end_time - start_time
Info: get_usage_static
took r paste(round(duration[[1]], 2), units(duration))
to run.
create_pin(nonshiny, name = "nonshiny_raw_usage", description = "Results pulled via `connectapi::get_usage_static()` for audit reports")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.