library(flexdashboard) library(tidyverse) library(httr) library(xml2) library(pins) library(reactable) library(gt)
pins::board_register( "rsconnect", server = "https://colorado.rstudio.com/rsc" ) # Retrieve Pin df_full <- pins::pin_get("katie/content-info", board = "rsconnect")
# Write the full content list response out to a CSV file for download #write.csv(select(df_full, -git), "rsc-basic-audit.csv", row.names=FALSE)
# Filter the full response to select specific fields for viewing df_view <- df_full %>% select(name, title, owner_guid, app_mode, access_type, r_version, py_version, created_time, last_deployed_time) # cross with the user pin to map owner_guid to username df_users <- pin_get("katie/user-info", board = "rsconnect") user_lookup <- df_users %>% select(username, guid) df_view <- df_view %>% left_join(user_lookup, by = c("owner_guid" = "guid")) %>% relocate(username, .after = title) %>% relocate(owner_guid, .after = last_deployed_time) # Use reactable to create a nicely formatted table reactable(df_view, searchable = TRUE, highlight = TRUE, resizable = TRUE, filterable = TRUE, columns = list( name = colDef(name = "Name"), title = colDef(name = "Title"), username = colDef(name = "Username"), # dashboard_url = colDef(name = "Content URL", cell = function(value) { # htmltools::tags$a(href = value, target = "_blank", "Link") # }), app_mode = colDef(name = "Type"), access_type = colDef(name = "Access Level"), r_version = colDef(name = "R Version"), py_version = colDef(name = "Python Version"), created_time = colDef(name = "Created", format = colFormat(datetime = TRUE)), last_deployed_time = colDef(name = "Last Deployed", format = colFormat(datetime = TRUE)) ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.