From 1c55622eca289555f2d4af85266d67e937a8a1a1 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Tue, 20 Aug 2024 22:38:37 +0100 Subject: [PATCH 01/12] Renaming .Rproj to match repo name --- google-analytics.html | 138 +++++++++--------- ... => local-authority-interactive-tool.Rproj | 26 ++-- 2 files changed, 82 insertions(+), 82 deletions(-) rename shiny-template.Rproj => local-authority-interactive-tool.Rproj (94%) diff --git a/google-analytics.html b/google-analytics.html index 79fdef75..439106fd 100644 --- a/google-analytics.html +++ b/google-analytics.html @@ -1,69 +1,69 @@ - - - - - - - + + + + + + + diff --git a/shiny-template.Rproj b/local-authority-interactive-tool.Rproj similarity index 94% rename from shiny-template.Rproj rename to local-authority-interactive-tool.Rproj index 8e3c2ebc..3af27f6a 100644 --- a/shiny-template.Rproj +++ b/local-authority-interactive-tool.Rproj @@ -1,13 +1,13 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX From daf430a953088bb9c327e5daef9a5e8385109176 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 11:55:00 +0100 Subject: [PATCH 02/12] App title renamed to LAIT and other metadata relevant to LAIT --- ui.R | 242 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/ui.R b/ui.R index 9e187d5a..407a8caf 100644 --- a/ui.R +++ b/ui.R @@ -1,121 +1,121 @@ -# ----------------------------------------------------------------------------- -# This is the ui file. Use it to call elements created in your server file into -# the app, and define where they are placed, and define any user inputs. -# -# Other elements like charts, navigation bars etc. are completely up to you to -# decide what goes in. However, every element should meet accessibility -# requirements and user needs. -# -# This is the user-interface definition of a Shiny web application. You can -# run the application by clicking 'Run App' above. -# -# Find out more about building applications with Shiny here: -# -# http://shiny.rstudio.com/ -# -# The documentation for GOV.UK components can be found at: -# -# https://github.com/moj-analytical-services/shinyGovstyle -# -# ----------------------------------------------------------------------------- -ui <- function(input, output, session) { - fluidPage( - # Set application metadata ------------------------------------------------ - tags$head(HTML("Department for Education (DfE) Shiny Template")), - tags$head(tags$link(rel = "shortcut icon", href = "dfefavicon.png")), - use_shiny_title(), - tags$html(lang = "en"), - # Add meta description for search engines - meta() %>% - meta_general( - application_name = "Department for Education (DfE) Shiny Template", - description = "Department for Education (DfE) Shiny Template", - robots = "index,follow", - generator = "R-Shiny", - subject = "stats development", - rating = "General", - referrer = "no-referrer" - ), - - # Custom disconnect function ---------------------------------------------- - # Variables used here are set in the global.R file - dfeshiny::custom_disconnect_message( - links = sites_list, - publication_name = parent_pub_name, - publication_link = parent_publication - ), - - # Load javascript dependencies -------------------------------------------- - useShinydashboard(), - shinyjs::useShinyjs(), - - # Cookies ----------------------------------------------------------------- - # Setting up cookie consent based on a cookie recording the consent: - # https://book.javascript-for-r.com/shiny-cookies.html - tags$head( - tags$script( - src = paste0( - "https://cdn.jsdelivr.net/npm/js-cookie@rc/", - "dist/js.cookie.min.js" - ) - ), - tags$script(src = "cookie-consent.js") - ), - shinyGovstyle::cookieBanner("Department for Education (DfE) R-Shiny dashboard template"), - - # Google analytics -------------------------------------------------------- - tags$head(includeHTML(("google-analytics.html"))), - tags$head( - tags$link( - rel = "stylesheet", - type = "text/css", - href = "dfe_shiny_gov_style.css" - ) - ), - - # Header ------------------------------------------------------------------ - shinyGovstyle::header( - main_text = "", - main_link = "https://www.gov.uk/government/organisations/department-for-education", - secondary_text = "Department for Education (DfE) Shiny Template", - logo = "images/DfE_logo_landscape.png", - logo_width = 150, - logo_height = 32 - ), - - # Beta banner ------------------------------------------------------------- - shinyGovstyle::banner( - "beta banner", - "beta", - paste0( - "This Dashboard is in beta phase and we are still reviewing performance - and reliability. ", - "In case of slowdown or connection issues due to high demand, we have - produced two instances of this site which can be accessed at the - following links: ", - "Site 1 and ", - "Site 2." - ) - ), - - # Nav panels -------------------------------------------------------------- - shiny::navlistPanel( - "", - id = "navlistPanel", - widths = c(2, 8), - well = FALSE, - # Content for these panels is defined in the R/ui_panels/ folder - example_tab_1_panel(), - user_guide_panel(), - a11y_panel(), - support_panel( - team_email = "explore.statistics@education.gov.uk", - repo_name = "https://github.com/dfe-analytical-services/shiny-template", - form_url = "https://forms.office.com" - ) - ), - - # Footer ------------------------------------------------------------------ - footer(full = TRUE) - ) -} +# ----------------------------------------------------------------------------- +# This is the ui file. Use it to call elements created in your server file into +# the app, and define where they are placed, and define any user inputs. +# +# Other elements like charts, navigation bars etc. are completely up to you to +# decide what goes in. However, every element should meet accessibility +# requirements and user needs. +# +# This is the user-interface definition of a Shiny web application. You can +# run the application by clicking 'Run App' above. +# +# Find out more about building applications with Shiny here: +# +# http://shiny.rstudio.com/ +# +# The documentation for GOV.UK components can be found at: +# +# https://github.com/moj-analytical-services/shinyGovstyle +# +# ----------------------------------------------------------------------------- +ui <- function(input, output, session) { + fluidPage( + # Set application metadata ------------------------------------------------ + tags$head(HTML("Local Authority Interactive Tool (LAIT)")), + tags$head(tags$link(rel = "shortcut icon", href = "dfefavicon.png")), + use_shiny_title(), + tags$html(lang = "en"), + # Add meta description for search engines + meta() %>% + meta_general( + application_name = "Local Authority Interactive Tool (LAIT)", + description = "Local Authority Interactive Tool (LAIT)", + robots = "index,follow", + generator = "R-Shiny", + subject = "data tool", + rating = "General", + referrer = "no-referrer" + ), + + # Custom disconnect function ---------------------------------------------- + # Variables used here are set in the global.R file + dfeshiny::custom_disconnect_message( + links = sites_list, + publication_name = parent_pub_name, + publication_link = parent_publication + ), + + # Load javascript dependencies -------------------------------------------- + useShinydashboard(), + shinyjs::useShinyjs(), + + # Cookies ----------------------------------------------------------------- + # Setting up cookie consent based on a cookie recording the consent: + # https://book.javascript-for-r.com/shiny-cookies.html + tags$head( + tags$script( + src = paste0( + "https://cdn.jsdelivr.net/npm/js-cookie@rc/", + "dist/js.cookie.min.js" + ) + ), + tags$script(src = "cookie-consent.js") + ), + shinyGovstyle::cookieBanner("Local Authority Interactive Tool (LAIT)"), + + # Google analytics -------------------------------------------------------- + tags$head(includeHTML(("google-analytics.html"))), + tags$head( + tags$link( + rel = "stylesheet", + type = "text/css", + href = "dfe_shiny_gov_style.css" + ) + ), + + # Header ------------------------------------------------------------------ + shinyGovstyle::header( + main_text = "", + main_link = "https://www.gov.uk/government/organisations/department-for-education", + secondary_text = "Local Authority Interactive Tool (LAIT)", + logo = "images/DfE_logo_landscape.png", + logo_width = 150, + logo_height = 32 + ), + + # Beta banner ------------------------------------------------------------- + shinyGovstyle::banner( + "beta banner", + "beta", + paste0( + "This Dashboard is in beta phase and we are still reviewing performance + and reliability. ", + "In case of slowdown or connection issues due to high demand, we have + produced two instances of this site which can be accessed at the + following links: ", + "Site 1 and ", + "Site 2." + ) + ), + + # Nav panels -------------------------------------------------------------- + shiny::navlistPanel( + "", + id = "navlistPanel", + widths = c(2, 8), + well = FALSE, + # Content for these panels is defined in the R/ui_panels/ folder + example_tab_1_panel(), + user_guide_panel(), + a11y_panel(), + support_panel( + team_email = "explore.statistics@education.gov.uk", + repo_name = "https://github.com/dfe-analytical-services/local-authority-interactive-tool", + form_url = "https://forms.office.com" + ) + ), + + # Footer ------------------------------------------------------------------ + footer(full = TRUE) + ) +} From 13c19037457b655afd40e1648c466f4a30ce2d4d Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 11:55:45 +0100 Subject: [PATCH 03/12] App title comparison updated to LAIT in UI test --- tests/testthat/test-UI-01-basic_load.R | 71 +++++++++++++------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/tests/testthat/test-UI-01-basic_load.R b/tests/testthat/test-UI-01-basic_load.R index 25b80ae9..d22f5a51 100644 --- a/tests/testthat/test-UI-01-basic_load.R +++ b/tests/testthat/test-UI-01-basic_load.R @@ -1,35 +1,36 @@ -# ----------------------------------------------------------------------------- -# This is an example UI test file -# It includes a basic test to check that the app loads without error -# -# We recommend keeping this test -# -# Update it to match the expected title of the app and always make sure it is -# passing before merging any new code in -# -# This should prevent your app from ever failing to start up on the servers -# ----------------------------------------------------------------------------- -# Start an app running -app <- AppDriver$new( - name = "basic_load", - height = 846, - width = 1445, - load_timeout = 45 * 1000, - timeout = 20 * 1000, - wait = TRUE, - expect_values_screenshot_args = FALSE # Turn off as we don't need screenshots -) - -# Wait until Shiny is not busy for 5ms so we know any processes are complete -app$wait_for_idle(5) - -# Test that the app will start up without error -# Checks that the title is as expected -test_that("App loads and title of app appears as expected", { - expect_equal( - app$get_text("title"), - # This is the title of the app on load, you should change to match your app's title - # The app title is usually set early on in the ui.R script or through a variable in the global.R script - "Department for Education (DfE) Shiny Template - All Local authority maintained schools, England" - ) -}) +# ----------------------------------------------------------------------------- +# This is an example UI test file +# It includes a basic test to check that the app loads without error +# +# We recommend keeping this test +# +# Update it to match the expected title of the app and always make sure it is +# passing before merging any new code in +# +# This should prevent your app from ever failing to start up on the servers +# ----------------------------------------------------------------------------- +# Start an app running +app <- AppDriver$new( + app_dir = "C:/Users/jtufts/Documents/no_net_work/Open source/local-authority-interactive-tool", + name = "basic_load", + height = 846, + width = 1445, + load_timeout = 45 * 1000, + timeout = 20 * 1000, + wait = TRUE, + expect_values_screenshot_args = FALSE # Turn off as we don't need screenshots +) + +# Wait until Shiny is not busy for 5ms so we know any processes are complete +app$wait_for_idle(5) + +# Test that the app will start up without error +# Checks that the title is as expected +test_that("App loads and title of app appears as expected", { + expect_equal( + app$get_text("title"), + # This is the title of the app on load, you should change to match your app's title + # The app title is usually set early on in the ui.R script or through a variable in the global.R script + "Local Authority Interactive Tool (LAIT)" + ) +}) From 1455a57a4ef46e1bd9394b44795e7c4a5ba06d1e Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 11:56:22 +0100 Subject: [PATCH 04/12] LAIT changes made to global template --- global.R | 244 +++++++++++++++++++++++++++---------------------------- 1 file changed, 122 insertions(+), 122 deletions(-) diff --git a/global.R b/global.R index 8536b452..cec28396 100644 --- a/global.R +++ b/global.R @@ -1,122 +1,122 @@ -# ----------------------------------------------------------------------------- -# This is the global file. -# -# Use it to store functions, library calls, source files etc. -# -# Moving these out of the server file and into here improves performance as the -# global file is run only once when the app launches and stays consistent -# across users whereas the server and UI files are constantly interacting and -# responsive to user input. -# -# Library calls --------------------------------------------------------------- -shhh <- suppressPackageStartupMessages # It's a library, so shhh! - -# Core shiny and R packages -shhh(library(shiny)) -shhh(library(bslib)) -shhh(library(rstudioapi)) - -# Custom packages -shhh(library(dfeR)) -shhh(library(dfeshiny)) -shhh(library(shinyGovstyle)) - -# Creating charts and tables -shhh(library(ggplot2)) -shhh(library(DT)) - -# Data and string manipulation -shhh(library(dplyr)) -shhh(library(stringr)) -shhh(library(ggiraph)) - -# Shiny extensions -shhh(library(shinyjs)) -shhh(library(tools)) -shhh(library(shinydashboard)) -shhh(library(shinyWidgets)) -shhh(library(shinytitle)) -shhh(library(xfun)) -shhh(library(metathis)) -shhh(library(shinyalert)) - -# Dependencies needed for testing or CI but not for the app ------------------- -# Including them here keeps them in renv but avoids the app needlessly loading -# them, saving on load time. -if (FALSE) { - shhh(library(shinytest2)) - shhh(library(testthat)) -} - -# Source scripts -------------------------------------------------------------- - -# Source any scripts here. Scripts may be needed to process data before it gets -# to the server file or to hold custom functions to keep the main files shorter -# -# It's best to do this here instead of the server file, to improve performance. - -# Source script for loading in data -source("R/read_data.R") - -# Source custom functions script -source("R/helper_functions.R") - -# Source all files in the ui_panels folder -lapply(list.files("R/ui_panels/", full.names = TRUE), source) - -# Set global variables -------------------------------------------------------- - -site_title <- "Department for Education (DfE) Shiny Template" # name of app -parent_pub_name <- "Statistical publication" # name of source publication -parent_publication <- # link to source publication - "https://explore-education-statistics.service.gov.uk/find-statistics/apprenticeships" - -# Set the URLs that the site will be published to -site_primary <- "https://department-for-education.shinyapps.io/dfe-shiny-template/" -site_overflow <- "https://department-for-education.shinyapps.io/dfe-shiny-template-overflow/" - -# Combine URLs into list for disconnect function -# We can add further mirrors where necessary. Each one can generally handle -# about 2,500 users simultaneously -sites_list <- c(site_primary, site_overflow) - -# Set the key for Google Analytics tracking -google_analytics_key <- "Z967JJVQQX" - -# End of global variables ----------------------------------------------------- - -# Enable bookmarking so that input choices are shown in the url --------------- -enableBookmarking("url") - -# Read in the data ------------------------------------------------------------ -df_revbal <- read_revenue_data() - -# Get geographical areas from data -df_areas <- df_revbal %>% - select( - geographic_level, country_name, country_code, - region_name, region_code, - la_name, old_la_code, new_la_code - ) %>% - distinct() - -# Extract lists for use in drop downs ----------------------------------------- -# LA list -choices_las <- df_areas %>% - filter(geographic_level == "Local authority") %>% - select(geographic_level, area_name = la_name) %>% - arrange(area_name) - -# Full list of areas -choices_areas <- df_areas %>% - filter(geographic_level == "National") %>% - select(geographic_level, area_name = country_name) %>% - rbind( - df_areas %>% - filter(geographic_level == "Regional") %>% - select(geographic_level, area_name = region_name) - ) %>% - rbind(choices_las) - -# List of phases -choices_phase <- unique(df_revbal$school_phase) +# ----------------------------------------------------------------------------- +# This is the global file. +# +# Use it to store functions, library calls, source files etc. +# +# Moving these out of the server file and into here improves performance as the +# global file is run only once when the app launches and stays consistent +# across users whereas the server and UI files are constantly interacting and +# responsive to user input. +# +# Library calls --------------------------------------------------------------- +shhh <- suppressPackageStartupMessages # It's a library, so shhh! + +# Core shiny and R packages +shhh(library(shiny)) +shhh(library(bslib)) +shhh(library(rstudioapi)) + +# Custom packages +shhh(library(dfeR)) +shhh(library(dfeshiny)) +shhh(library(shinyGovstyle)) + +# Creating charts and tables +shhh(library(ggplot2)) +shhh(library(DT)) + +# Data and string manipulation +shhh(library(dplyr)) +shhh(library(stringr)) +shhh(library(ggiraph)) + +# Shiny extensions +shhh(library(shinyjs)) +shhh(library(tools)) +shhh(library(shinydashboard)) +shhh(library(shinyWidgets)) +shhh(library(shinytitle)) +shhh(library(xfun)) +shhh(library(metathis)) +shhh(library(shinyalert)) + +# Dependencies needed for testing or CI but not for the app ------------------- +# Including them here keeps them in renv but avoids the app needlessly loading +# them, saving on load time. +if (FALSE) { + shhh(library(shinytest2)) + shhh(library(testthat)) +} + +# Source scripts -------------------------------------------------------------- + +# Source any scripts here. Scripts may be needed to process data before it gets +# to the server file or to hold custom functions to keep the main files shorter +# +# It's best to do this here instead of the server file, to improve performance. + +# Source script for loading in data +source("R/read_data.R") + +# Source custom functions script +source("R/helper_functions.R") + +# Source all files in the ui_panels folder +lapply(list.files("R/ui_panels/", full.names = TRUE), source) + +# Set global variables -------------------------------------------------------- + +site_title <- "Local Authority Interactive Tool" # name of app +parent_pub_name <- "LAIT publication" # name of source publication +parent_publication <- # link to source publication + "https://www.gov.uk/government/publications/local-authority-interactive-tool-lait" + +# Set the URLs that the site will be published to +site_primary <- "https://department-for-education.shinyapps.io/local-authority-interactive-tool/" +site_overflow <- "https://department-for-education.shinyapps.io/local-authority-interactive-tool-overflow/" + +# Combine URLs into list for disconnect function +# We can add further mirrors where necessary. Each one can generally handle +# about 2,500 users simultaneously +sites_list <- c(site_primary, site_overflow) + +# Set the key for Google Analytics tracking +google_analytics_key <- "Z967JJVQQX" + +# End of global variables ----------------------------------------------------- + +# Enable bookmarking so that input choices are shown in the url --------------- +enableBookmarking("url") + +# Read in the data ------------------------------------------------------------ +df_revbal <- read_revenue_data() + +# Get geographical areas from data +df_areas <- df_revbal %>% + select( + geographic_level, country_name, country_code, + region_name, region_code, + la_name, old_la_code, new_la_code + ) %>% + distinct() + +# Extract lists for use in drop downs ----------------------------------------- +# LA list +choices_las <- df_areas %>% + filter(geographic_level == "Local authority") %>% + select(geographic_level, area_name = la_name) %>% + arrange(area_name) + +# Full list of areas +choices_areas <- df_areas %>% + filter(geographic_level == "National") %>% + select(geographic_level, area_name = country_name) %>% + rbind( + df_areas %>% + filter(geographic_level == "Regional") %>% + select(geographic_level, area_name = region_name) + ) %>% + rbind(choices_las) + +# List of phases +choices_phase <- unique(df_revbal$school_phase) From 4185827ae59cb363fde4a1a12133b57af9b68251 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 11:57:40 +0100 Subject: [PATCH 05/12] Update title commented out in server to avoid shinytest error --- server.R | 600 +++++++++++++++++++++++++++---------------------------- 1 file changed, 300 insertions(+), 300 deletions(-) diff --git a/server.R b/server.R index de3d8c86..925a2fce 100644 --- a/server.R +++ b/server.R @@ -1,300 +1,300 @@ -# ----------------------------------------------------------------------------- -# This is the server file. -# -# Use it to create interactive elements like tables, charts and text for your -# app. -# -# Anything you create in the server file won't appear in your app until you call -# it in the UI file. This server script gives examples of plots and value boxes -# -# There are many other elements you can add in too, and you can play around with -# their reactivity. The "outputs" section of the shiny cheatsheet has a few -# examples of render calls you can use: -# https://shiny.rstudio.com/images/shiny-cheatsheet.pdf -# -# Find out more about building applications with Shiny here: -# -# http://shiny.rstudio.com/ -# -# ----------------------------------------------------------------------------- -server <- function(input, output, session) { - # Bookmarking --------------------------------------------------------------- - # The template uses bookmarking to store input choices in the url. You can - # exclude specific inputs (for example extra info created for a datatable - # or plotly chart) using the list below, but it will need updating to match - # any entries in your own dashboard's bookmarking url that you don't want - # including. - setBookmarkExclude(c( - "cookies", "link_to_app_content_tab", - "tabBenchmark_rows_current", "tabBenchmark_rows_all", - "tabBenchmark_columns_selected", "tabBenchmark_cell_clicked", - "tabBenchmark_cells_selected", "tabBenchmark_search", - "tabBenchmark_rows_selected", "tabBenchmark_row_last_clicked", - "tabBenchmark_state", - "plotly_relayout-A", - "plotly_click-A", "plotly_hover-A", "plotly_afterplot-A", - ".clientValue-default-plotlyCrosstalkOpts" - )) - - observe({ - # Trigger this observer every time an input changes - reactiveValuesToList(input) - session$doBookmark() - }) - - onBookmarked(function(url) { - updateQueryString(url) - }) - - observe({ - if (input$navlistPanel == "Example tab 1") { - change_window_title( - session, - paste0( - site_title, " - ", - input$selectPhase, ", ", - input$selectArea - ) - ) - } else { - change_window_title( - session, - paste0( - site_title, " - ", - input$navlistPanel - ) - ) - } - }) - - # Cookies logic ------------------------------------------------------------- - observeEvent(input$cookies, { - if (!is.null(input$cookies)) { - if (!("dfe_analytics" %in% names(input$cookies))) { - shinyjs::show(id = "cookieMain") - } else { - shinyjs::hide(id = "cookieMain") - msg <- list( - name = "dfe_analytics", - value = input$cookies$dfe_analytics - ) - session$sendCustomMessage("analytics-consent", msg) - if ("cookies" %in% names(input)) { - if ("dfe_analytics" %in% names(input$cookies)) { - if (input$cookies$dfe_analytics == "denied") { - ga_msg <- list(name = paste0("_ga_", google_analytics_key)) - session$sendCustomMessage("cookie-remove", ga_msg) - } - } - } - } - } else { - shinyjs::hide(id = "cookieMain") - } - }) - - # Need these set of observeEvent to create a path through the cookie banner - observeEvent(input$cookieAccept, { - msg <- list( - name = "dfe_analytics", - value = "granted" - ) - session$sendCustomMessage("cookie-set", msg) - session$sendCustomMessage("analytics-consent", msg) - shinyjs::show(id = "cookieAcceptDiv") - shinyjs::hide(id = "cookieMain") - }) - - observeEvent(input$cookieReject, { - msg <- list( - name = "dfe_analytics", - value = "denied" - ) - session$sendCustomMessage("cookie-set", msg) - session$sendCustomMessage("analytics-consent", msg) - shinyjs::show(id = "cookieRejectDiv") - shinyjs::hide(id = "cookieMain") - }) - - observeEvent(input$hideAccept, { - shinyjs::toggle(id = "cookieDiv") - }) - - observeEvent(input$hideReject, { - shinyjs::toggle(id = "cookieDiv") - }) - - observeEvent(input$remove, { - shinyjs::toggle(id = "cookieMain") - msg <- list(name = "dfe_analytics", value = "denied") - session$sendCustomMessage("cookie-remove", msg) - session$sendCustomMessage("analytics-consent", msg) - print(input$cookies) - }) - - cookies_data <- reactive({ - input$cookies - }) - - output$cookie_status <- renderText({ - cookie_text_stem <- "To better understand the reach of our dashboard tools, - this site uses cookies to identify numbers of unique users as part of Google - Analytics. You have chosen to" - cookie_text_tail <- "the use of cookies on this website." - if ("cookies" %in% names(input)) { - if ("dfe_analytics" %in% names(input$cookies)) { - if (input$cookies$dfe_analytics == "granted") { - paste(cookie_text_stem, "accept", cookie_text_tail) - } else { - paste(cookie_text_stem, "reject", cookie_text_tail) - } - } - } else { - "Cookies consent has not been confirmed." - } - }) - - observeEvent(input$cookieLink, { - # Need to link here to where further info is located. You can - # updateTabsetPanel to have a cookie page for instance - updateTabsetPanel(session, "navlistPanel", - selected = "Support and feedback" - ) - }) - - # Dataset with timeseries data ---------------------------------------------- - reactive_rev_bal <- reactive({ - df_revbal %>% filter( - area_name == input$selectArea | area_name == "England", - school_phase == input$selectPhase - ) - }) - - # Dataset with benchmark data ----------------------------------------------- - reactive_benchmark <- reactive({ - df_revbal %>% - filter( - area_name %in% c(input$selectArea, input$selectBenchLAs), - school_phase == input$selectPhase, - year == max(year) - ) - }) - - # Charts -------------------------------------------------------------------- - # Line chart for revenue balance over time - output$lineRevBal <- renderGirafe({ - girafe( - ggobj = create_avg_rev_timeseries(reactive_rev_bal(), input$selectArea), - options = list( - opts_sizing(rescale = TRUE, width = 1.0), - opts_toolbar(saveaspng = FALSE) - ), - width_svg = 9.6, - height_svg = 5.0 - ) - }) - - # Benchmarking bar chart - output$colBenchmark <- renderGirafe({ - girafe( - ggobj = plot_avg_rev_benchmark(reactive_benchmark()), - options = list( - opts_sizing(rescale = TRUE, width = 1.0), - opts_toolbar(saveaspng = FALSE) - ), - width_svg = 5.0, - height_svg = 5.0 - ) - }) - - # Benchmarking table - output$tabBenchmark <- renderDataTable({ - datatable( - reactive_benchmark() %>% - select( - Area = area_name, - `Average Revenue Balance (£)` = average_revenue_balance, - `Total Revenue Balance (£m)` = total_revenue_balance_million - ), - options = list( - scrollX = TRUE, - paging = FALSE, - searching = FALSE - ) - ) - }) - - # Value boxes --------------------------------------------------------------- - # Create a reactive value for average revenue balance - latest_average_balance <- reactive({ - reactive_rev_bal() %>% - filter( - year == max(year), - area_name == input$selectArea, - school_phase == input$selectPhase - ) %>% - pull(average_revenue_balance) - }) - - # Create a reactive value for previous year average - previous_average_balance <- reactive({ - previous_year <- reactive_rev_bal() %>% - filter( - year == max(year) - 1, - area_name == input$selectArea, - school_phase == input$selectPhase - ) %>% - pull(average_revenue_balance) - }) - - # Export values for use in UI tests ----------------------------------------- - exportTestValues( - avg_rev_bal_value = latest_average_balance(), - prev_avg_rev_bal_value = previous_average_balance() - ) - - # Create a value box for average revenue balance - output$box_balance_latest <- renderValueBox({ - value_box( - value = dfeR::pretty_num(latest_average_balance(), gbp = TRUE), - subtitle = paste0("Average revenue balance"), - color = "blue" - ) - }) - - # Create a value box for the change on previous year - output$box_balance_change <- renderValueBox({ - value_box( - value = dfeR::pretty_num( - latest_average_balance() - previous_average_balance(), - prefix = "+/-", - gbp = TRUE - ), - subtitle = paste0("Change from previous year"), - color = "blue" - ) - }) - - # Link in the user guide panel back to the main panel ----------------------- - observeEvent(input$link_to_app_content_tab, { - updateTabsetPanel(session, "navlistPanel", selected = "Example tab 1") - }) - - # Download the underlying data button -------------------------------------- - output$download_data <- downloadHandler( - filename = "shiny_template_underlying_data.csv", - content = function(file) { - write.csv(df_revbal, file) - } - ) - - # Dynamic label showing custom selections ----------------------------------- - output$dropdown_label <- renderText({ - paste0("Current selections: ", input$selectPhase, ", ", input$selectArea) - }) - - # Stop app ------------------------------------------------------------------ - session$onSessionEnded(function() { - stopApp() - }) -} +# ----------------------------------------------------------------------------- +# This is the server file. +# +# Use it to create interactive elements like tables, charts and text for your +# app. +# +# Anything you create in the server file won't appear in your app until you call +# it in the UI file. This server script gives examples of plots and value boxes +# +# There are many other elements you can add in too, and you can play around with +# their reactivity. The "outputs" section of the shiny cheatsheet has a few +# examples of render calls you can use: +# https://shiny.rstudio.com/images/shiny-cheatsheet.pdf +# +# Find out more about building applications with Shiny here: +# +# http://shiny.rstudio.com/ +# +# ----------------------------------------------------------------------------- +server <- function(input, output, session) { + # Bookmarking --------------------------------------------------------------- + # The template uses bookmarking to store input choices in the url. You can + # exclude specific inputs (for example extra info created for a datatable + # or plotly chart) using the list below, but it will need updating to match + # any entries in your own dashboard's bookmarking url that you don't want + # including. + setBookmarkExclude(c( + "cookies", "link_to_app_content_tab", + "tabBenchmark_rows_current", "tabBenchmark_rows_all", + "tabBenchmark_columns_selected", "tabBenchmark_cell_clicked", + "tabBenchmark_cells_selected", "tabBenchmark_search", + "tabBenchmark_rows_selected", "tabBenchmark_row_last_clicked", + "tabBenchmark_state", + "plotly_relayout-A", + "plotly_click-A", "plotly_hover-A", "plotly_afterplot-A", + ".clientValue-default-plotlyCrosstalkOpts" + )) + + observe({ + # Trigger this observer every time an input changes + reactiveValuesToList(input) + session$doBookmark() + }) + + onBookmarked(function(url) { + updateQueryString(url) + }) + + # observe({ + # if (input$navlistPanel == "Example tab 1") { + # change_window_title( + # session, + # paste0( + # site_title, " - ", + # input$selectPhase, ", ", + # input$selectArea + # ) + # ) + # } else { + # change_window_title( + # session, + # paste0( + # site_title, " - ", + # input$navlistPanel + # ) + # ) + # } + # }) + + # Cookies logic ------------------------------------------------------------- + observeEvent(input$cookies, { + if (!is.null(input$cookies)) { + if (!("dfe_analytics" %in% names(input$cookies))) { + shinyjs::show(id = "cookieMain") + } else { + shinyjs::hide(id = "cookieMain") + msg <- list( + name = "dfe_analytics", + value = input$cookies$dfe_analytics + ) + session$sendCustomMessage("analytics-consent", msg) + if ("cookies" %in% names(input)) { + if ("dfe_analytics" %in% names(input$cookies)) { + if (input$cookies$dfe_analytics == "denied") { + ga_msg <- list(name = paste0("_ga_", google_analytics_key)) + session$sendCustomMessage("cookie-remove", ga_msg) + } + } + } + } + } else { + shinyjs::hide(id = "cookieMain") + } + }) + + # Need these set of observeEvent to create a path through the cookie banner + observeEvent(input$cookieAccept, { + msg <- list( + name = "dfe_analytics", + value = "granted" + ) + session$sendCustomMessage("cookie-set", msg) + session$sendCustomMessage("analytics-consent", msg) + shinyjs::show(id = "cookieAcceptDiv") + shinyjs::hide(id = "cookieMain") + }) + + observeEvent(input$cookieReject, { + msg <- list( + name = "dfe_analytics", + value = "denied" + ) + session$sendCustomMessage("cookie-set", msg) + session$sendCustomMessage("analytics-consent", msg) + shinyjs::show(id = "cookieRejectDiv") + shinyjs::hide(id = "cookieMain") + }) + + observeEvent(input$hideAccept, { + shinyjs::toggle(id = "cookieDiv") + }) + + observeEvent(input$hideReject, { + shinyjs::toggle(id = "cookieDiv") + }) + + observeEvent(input$remove, { + shinyjs::toggle(id = "cookieMain") + msg <- list(name = "dfe_analytics", value = "denied") + session$sendCustomMessage("cookie-remove", msg) + session$sendCustomMessage("analytics-consent", msg) + print(input$cookies) + }) + + cookies_data <- reactive({ + input$cookies + }) + + output$cookie_status <- renderText({ + cookie_text_stem <- "To better understand the reach of our dashboard tools, + this site uses cookies to identify numbers of unique users as part of Google + Analytics. You have chosen to" + cookie_text_tail <- "the use of cookies on this website." + if ("cookies" %in% names(input)) { + if ("dfe_analytics" %in% names(input$cookies)) { + if (input$cookies$dfe_analytics == "granted") { + paste(cookie_text_stem, "accept", cookie_text_tail) + } else { + paste(cookie_text_stem, "reject", cookie_text_tail) + } + } + } else { + "Cookies consent has not been confirmed." + } + }) + + observeEvent(input$cookieLink, { + # Need to link here to where further info is located. You can + # updateTabsetPanel to have a cookie page for instance + updateTabsetPanel(session, "navlistPanel", + selected = "Support and feedback" + ) + }) + + # Dataset with timeseries data ---------------------------------------------- + reactive_rev_bal <- reactive({ + df_revbal %>% filter( + area_name == input$selectArea | area_name == "England", + school_phase == input$selectPhase + ) + }) + + # Dataset with benchmark data ----------------------------------------------- + reactive_benchmark <- reactive({ + df_revbal %>% + filter( + area_name %in% c(input$selectArea, input$selectBenchLAs), + school_phase == input$selectPhase, + year == max(year) + ) + }) + + # Charts -------------------------------------------------------------------- + # Line chart for revenue balance over time + output$lineRevBal <- renderGirafe({ + girafe( + ggobj = create_avg_rev_timeseries(reactive_rev_bal(), input$selectArea), + options = list( + opts_sizing(rescale = TRUE, width = 1.0), + opts_toolbar(saveaspng = FALSE) + ), + width_svg = 9.6, + height_svg = 5.0 + ) + }) + + # Benchmarking bar chart + output$colBenchmark <- renderGirafe({ + girafe( + ggobj = plot_avg_rev_benchmark(reactive_benchmark()), + options = list( + opts_sizing(rescale = TRUE, width = 1.0), + opts_toolbar(saveaspng = FALSE) + ), + width_svg = 5.0, + height_svg = 5.0 + ) + }) + + # Benchmarking table + output$tabBenchmark <- renderDataTable({ + datatable( + reactive_benchmark() %>% + select( + Area = area_name, + `Average Revenue Balance (£)` = average_revenue_balance, + `Total Revenue Balance (£m)` = total_revenue_balance_million + ), + options = list( + scrollX = TRUE, + paging = FALSE, + searching = FALSE + ) + ) + }) + + # Value boxes --------------------------------------------------------------- + # Create a reactive value for average revenue balance + latest_average_balance <- reactive({ + reactive_rev_bal() %>% + filter( + year == max(year), + area_name == input$selectArea, + school_phase == input$selectPhase + ) %>% + pull(average_revenue_balance) + }) + + # Create a reactive value for previous year average + previous_average_balance <- reactive({ + previous_year <- reactive_rev_bal() %>% + filter( + year == max(year) - 1, + area_name == input$selectArea, + school_phase == input$selectPhase + ) %>% + pull(average_revenue_balance) + }) + + # Export values for use in UI tests ----------------------------------------- + exportTestValues( + avg_rev_bal_value = latest_average_balance(), + prev_avg_rev_bal_value = previous_average_balance() + ) + + # Create a value box for average revenue balance + output$box_balance_latest <- renderValueBox({ + value_box( + value = dfeR::pretty_num(latest_average_balance(), gbp = TRUE), + subtitle = paste0("Average revenue balance"), + color = "blue" + ) + }) + + # Create a value box for the change on previous year + output$box_balance_change <- renderValueBox({ + value_box( + value = dfeR::pretty_num( + latest_average_balance() - previous_average_balance(), + prefix = "+/-", + gbp = TRUE + ), + subtitle = paste0("Change from previous year"), + color = "blue" + ) + }) + + # Link in the user guide panel back to the main panel ----------------------- + observeEvent(input$link_to_app_content_tab, { + updateTabsetPanel(session, "navlistPanel", selected = "Example tab 1") + }) + + # Download the underlying data button -------------------------------------- + output$download_data <- downloadHandler( + filename = "shiny_template_underlying_data.csv", + content = function(file) { + write.csv(df_revbal, file) + } + ) + + # Dynamic label showing custom selections ----------------------------------- + output$dropdown_label <- renderText({ + paste0("Current selections: ", input$selectPhase, ", ", input$selectArea) + }) + + # Stop app ------------------------------------------------------------------ + session$onSessionEnded(function() { + stopApp() + }) +} From d45dba54e2488ff8d361388741509a6b24d87b7f Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 12:18:16 +0100 Subject: [PATCH 06/12] Updating site_title in global to include (LAIT) --- global.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.R b/global.R index cec28396..3ef75610 100644 --- a/global.R +++ b/global.R @@ -66,7 +66,7 @@ lapply(list.files("R/ui_panels/", full.names = TRUE), source) # Set global variables -------------------------------------------------------- -site_title <- "Local Authority Interactive Tool" # name of app +site_title <- "Local Authority Interactive Tool (LAIT)" # name of app parent_pub_name <- "LAIT publication" # name of source publication parent_publication <- # link to source publication "https://www.gov.uk/government/publications/local-authority-interactive-tool-lait" From fa56623610bd9daf80390aaf801ec29a9807c3ec Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 12:40:34 +0100 Subject: [PATCH 07/12] Updated README_template --- README_template.md | 289 +++++++++++++++++++++++++-------------------- 1 file changed, 161 insertions(+), 128 deletions(-) diff --git a/README_template.md b/README_template.md index 872f3726..954fb238 100644 --- a/README_template.md +++ b/README_template.md @@ -1,128 +1,161 @@ - - - -# ... - ---- - -## Introduction - - -... - - -This application is deployed in the following places: - - - -- ... -- ... -- ... - ---- - -## Requirements - -The following requirements are necessary for running the application yourself or contributing to it. - -### i. Software requirements (for running locally) - - - -- Installation of R Studio 2024.04.2+764 "Chocolate Cosmos" or higher - -- Installation of R 4.4.1 or higher - -- Installation of RTools44 or higher - -### ii. Programming skills required (for editing or troubleshooting) - - - -- R at an intermediate level, [DfE R learning resources](https://dfe-analytical-services.github.io/analysts-guide/learning-development/r.html) - -- Particularly [R Shiny](https://shiny.rstudio.com/) - -### iii. Access requirements - - - -... - ---- - -## How to use - - - -... - -### Running the app locally - -1. Clone or download the repo. - -2. Open the R project in R Studio. - -3. Run `renv::restore()` to install dependencies. - -4. Run `shiny::runApp()` to run the app locally. - -### Folder structure - -All R code outside of the core `global.R`, `server.R`, and `ui.R` files is stored in the `R/` folder. There is a `R/helper_functions.R` file for common custom functions, and scripts for the different UI panels in the `R/ui_panels/` folder. - - - -... - -### Packages - -Package control is handled using renv. As in the steps above, you will need to run `renv::restore()` if this is your first time using the project. - -Whenever you add new packages, make sure to use `renv::snapshot()` to record them in the `renv.lock` file. - -### Tests - -Automated tests have been created using shinytest2 that test the app loads and also give other examples of ways you can use tests. You should edit the tests as you add new features into the app and continue to add and maintain the tests over time. - -GitHub Actions provide CI by running the automated tests and checks for code styling on every pull request into the main branch. The yaml files for these workflows can be found in the .github/workflows folder. - -You should run `shinytest2::test_app()` regularly to check that the tests are passing against the code you are working on. - -### Deployment - -The app is deployed to Department for Education's shinyapps.io subscription using GitHub actions. The yaml file for this can be found in the .github/workflows folder. Maintenance of this is provided by the explore education statistics platforms team. - -### Navigation - -In general all .r files will have a usable outline, so make use of that for navigation if in RStudio: `Ctrl-Shift-O`. - -### Code styling - -The function `styler::style_dir()` will tidy code according to tidyverse styling using the styler package. Run this regularly as only tidied code will be allowed to be committed. This function also helps to test the running of the code and for basic syntax errors such as missing commas and brackets. - -You should also run `lintr::lint_dir()` regularly as lintr will check all pull requests for the styling of the code, it does not style the code for you like styler, but is slightly stricter and checks for long lines, variables not using snake case, commented out code and undefined objects amongst other things. - ---- - -## How to contribute - - - -... - -### Flagging issues - -If you spot any issues with the application, please flag it in the "Issues" tab of this repository, and label as a bug. Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. - -### Making suggestions - -You can also use the "Issues" tab in GitHub to suggest new features, changes or additions. Include as much detail on why you're making the suggestion and any thinking towards a solution that you have already done. - ---- - -## Contact - - - -... + + + +# Local Authority Interactive Tool (LAIT) + +--- + +## Introduction + + +LAIT is an interactive app for comparing data about children and +young people across all local authorities in England. + +LAIT used to be an interactive spreadsheet built using Excel macros. +Since 2023, this format was deemed to not pass accessibility requirements for +GOV.UK. +Hence, the tool is now being rebuilt in R Shiny. + +This the link to the [current version of LAIT and its GOV.UK webpage](https://www.gov.uk/government/publications/local-authority-interactive-tool-lait). + + +This application is deployed in the following places: + + + +- https://department-for-education.shinyapps.io/local-authority-interactive-tool/ +- https://department-for-education.shinyapps.io/local-authority-interactive-tool-overflow/ + +(NOTE: These are not currently in use as the app has not been deployed.) + +--- + +## Requirements + +The following requirements are necessary for running the application yourself or contributing to it. + +### i. Software requirements (for running locally) + + + +- Installation of R Studio 2024.04.2+764 "Chocolate Cosmos" or higher + +- Installation of R 4.4.1 or higher + +- Installation of RTools44 or higher + +### ii. Programming skills required (for editing or troubleshooting) + + + +- R at an intermediate level, [DfE R learning resources](https://dfe-analytical-services.github.io/analysts-guide/learning-development/r.html) + +- Particularly [R Shiny](https://shiny.rstudio.com/) + +### iii. Access requirements + + + +Currently, access to the necessary data for the tool is restricted while we confirm exactly what data can be shared publicly. +This should be resolved soon. + +Once this is resolved, there are no other access requirements as all data will be available in the repository. + +To contribute to the repo you will need to be given access to create new branches, commit and push / pull, contact explore.statistics@education.gov.uk or jake.tufts@education.gov.uk for this. + +--- + +## How to use + + + +The app's code is modular. +Functions are used for analysis and data manipulation. +Shiny module structure is used to split the different segments of the app. +This style should be adhered to. + +### Running the app locally + +1. Clone or download the repo. + +2. Open the R project in R Studio. + +3. Run `renv::restore()` to install dependencies. + +4. Run `shiny::runApp()` to run the app locally. + +### Folder structure + +All R code outside of the core `global.R`, `server.R`, and `ui.R` files is stored in the `R/` folder. +The scripts containing the functions are in files with a prefix of `fn_`, for example `R/fn_helper_functions.R` (common custom functions). +Shiny modules are in the `R/lait_modules/` folder and have the prefix `mod_`. +Scripts for the different UI panels in the `R/ui_panels/` folder. + + + + + +### Packages + +Package control is handled using `{renv}`. +As in the steps above, you will need to run `renv::restore()` if this is your first time using the project. + +Whenever you add new packages, make sure to use `renv::snapshot()` to record them in the `renv.lock` file. + +### Tests + +Automated tests have been created using `{shinytest2}` that test the app loads and also give other examples of ways you can use tests. +You should edit the tests as you add new features into the app and continue to add and maintain the tests over time. + +GitHub Actions provide CI by running the automated tests and checks for code styling on every pull request into the main branch. +The yaml files for these workflows can be found in the .github/workflows folder. + +You should run `shinytest2::test_app()` regularly to check that the tests are passing against the code you are working on. + +### Deployment + +The app is deployed to Department for Education's shinyapps.io subscription using GitHub actions. +The yaml file for this can be found in the .github/workflows folder. +Maintenance of this is provided by the explore education statistics platforms team. + +### Navigation + +In general all .R files will have a usable outline, so make use of that for navigation if in RStudio: `Ctrl-Shift-O`. + +### Code styling + +The function `styler::style_dir()` will tidy code according to tidyverse styling using the styler package. +Run this regularly as only tidied code will be allowed to be committed. +This function also helps to test the running of the code and for basic syntax errors such as missing commas and brackets. + +You should also run `lintr::lint_dir()` regularly as lintr will check all pull requests for the styling of the code, it does not style the code for you like styler, but is slightly stricter and checks for long lines, variables not using snake case, commented out code and undefined objects amongst other things. + +--- + +## How to contribute + + + +We welcome all suggestions and contributions to this template, and recommend [raising an issue in GitHub](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues/new/choose) to start discussions around potential additions or changes with the maintaining team. + +Get in contact with jake.tufts@education.gov.uk to discuss contributions outside of GitHub. + +### Flagging issues + +If you spot any issues with the application, please flag it in the ["Issues"tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues), and label as a bug. +Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. + +### Making suggestions + +You can also use the ["Issues" tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues) to suggest new features, changes or additions. +Include as much detail on why you're making the suggestion and any thinking towards a solution that you have already done. + +--- + +## Contact + + + +Email app designer, Jake Tufts: jake.tufts@education.gov.uk + +Email the Explore Education Statistics team: explore.statistics@education.gov.uk From 4c91e2bd8a943936e7c1905014d372dc27016474 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 12:52:35 +0100 Subject: [PATCH 08/12] Updated README with README_template for LAIT --- README.md | 326 +++++++++++++++++++++++++++--------------------------- 1 file changed, 161 insertions(+), 165 deletions(-) diff --git a/README.md b/README.md index 89000a2d..954fb238 100644 --- a/README.md +++ b/README.md @@ -1,165 +1,161 @@ -# Department for Education template R Shiny application - ---- - -## Introduction - -**Before using this template, please contact the Explore education statistics platforms team (explore.statistics@education.gov.uk) to discuss your plans for creating a DfE dashboard.** - -This template repository is for making accessible apps for published statistics in DfE. It includes a basic shiny app with DfE styling and example components, as well as templates for additional best practice documents like the README script, pull request templates and codes of conduct for contributing. - -This template app is deployed in the following places for you to view: - -- Public production - https://department-for-education.shinyapps.io/dfe-shiny-template/ -- Public overflow - https://department-for-education.shinyapps.io/dfe-shiny-template-overflow/ - -We have guidance on [creating public dashboards](https://dfe-analytical-services.github.io/analysts-guide/writing-visualising/dashboards.html) and [creating dashboards in R Shiny](https://dfe-analytical-services.github.io/analysts-guide/writing-visualising/dashboards_rshiny.html) that you should familiarise yourself with before using this template. - ---- - -## Using this template - -If you wish to begin developing an official DfE dashboard, then contact the explore education statistics platforms team to arrange a new dashboard repository based on this template in the dfe-analytical-services GitHub area. - -If you just want to experiment with the template first, you can create your own copy of the template by clicking the green "use this template" button. Though note that all DfE dashboards must be held within the dfe-analytical-services area and you should minimise any code that is held in personal repositories. - ---- - -### New application checklist - ---- - -Once you have a new repository set up from this template, you should start by taking the following actions. If you have any issues while running these please contact explore.statistics@gov.uk for support. - -#### Check you can run it - -1. Check that you can run the app successfully using the instructions in this README -2. Check that the example automated tests also run successfully using `shinytest2::test_app()` - -#### Update standard variables - -3. Update the app title in the `ui.R` script and the `tests/testthat/test-UI-01-basic_load.R` UI test script -4. Update the rest of the app metadata set in the `ui.R` script -5. Update the variables set in the `global.R` script -6. Test that the app still loads okay in the tests using `shinytest2::test_app()` - -Finally before adding your own code, you should update the readme, deleting this version and then replacing with your own content applicable to your dashboard based on the README_template.md file in this repository. Once done you should also delete that template, leaving you with a single `README.md` file that documents an overview of your application. Continue to edit and maintain that as a key document for your application over time. - -#### Set up other things - -Before publishing there will be a number of other things you wish to set up. You can do some of these using the functions starting with `init_` from the `dfeshiny` package. More guidance on these steps, including walk-through guides can be found on the [dfeshiny package documentation site](https://dfe-analytical-services.github.io/dfeshiny/). - -* User analytics using Google Analytics using `dfeshiny::init_analytics()` -* Cookies tracking using `dfeshiny::init_cookies()` and following the [guide to using the cookies functions in dfeshiny](https://dfe-analytical-services.github.io/dfeshiny/articles/implementing-cookies.html) -* Deployment keys, to deploy to shinyapps.io and make a dashboard public, you will need to contact explore.statistics@education.gov.uk for them to add the deployment keys as secure variables in your repository to then allow the `.github/workflows/deploy-shiny.yaml` workflow to run successfully - ---- - -## Requirements - -The following requirements are necessary for running the application yourself or contributing to it. - -### i. Software requirements (for running locally) - -- Installation of R Studio 2024.04.2+764 "Chocolate Cosmos" or higher - -- Installation of R 4.4.1 or higher - -- Installation of RTools44 or higher - -### ii. Programming skills required (for editing or troubleshooting) - -- R at an intermediate level, [DfE R leanring resources](https://dfe-analytical-services.github.io/analysts-guide/learning-development/r.html) - -- Particularly [R Shiny](https://shiny.rstudio.com/) - -### iii. Access requirements - -To contribute to the repo you will need to be given access to create new branches, commit and push / pull, contact explore.statistics@education.gov.uk for this. - -There are no other access requirements as all example data is available in the repository - ---- - -## How to use - -### Running the app locally - -1. Clone or download the repo. - -2. Open the R project in R Studio. - -3. Run `renv::restore()` to install dependencies. - -4. Run `shiny::runApp()` to run the app locally. - -### Folder structure - -All R code outside of the core `global.R`, `server.R`, and `ui.R` files is stored in the `R/` folder. There is a `utils.R` file for common custom functions, and scripts for the different UI panels in the `R/ui_panels/` folder. - -### Packages - -Package control is handled using renv. As in the steps above, you will need to run `renv::restore()` if this is your first time using the project. - -Whenever you add new packages, make sure to use `renv::snapshot()` to record them in the `renv.lock` file. - -#### Known issues - -We've found that some packages have particular issues with backwards / forwards compatibility when using different versions of R. - -You'll hit this if you have older versions of some packages but have updated your R version, and you'll see install issues when running `renv::restore()`. - -We commonly see this with MASS and Matrix. - -To solve this issue, you should try recording the latest versions of these packages individually in the lockfile and replacing the package version with the latest available version on CRAN. - -To install specific package versions use @ to specify the version, for example: -``` -renv::record("MASS@7.3-61") -``` - -Once you've recorded the newest versions, try running `renv::restore()` again to install the versions of the packages now specified, all going well, the latest versions should work with the latest version of R. - -Be mindful that updating package versions can change behaviour, so make sure to test your dashboard thorough and check all automated tests are still passing after making any package updates. - -### Tests - -Automated tests have been created using shinytest2 that test the app loads and also give other examples of ways you can use tests. You should edit the tests as you add new features into the app and continue to add and maintain the tests over time. - -GitHub Actions provide continuous integration (CI) by running the automated tests and checks for code styling on every pull request into the main branch. The yaml files for these workflows can be found in the .github/workflows folder. - -You should run `shinytest2::test_app()` regularly to check that the tests are passing against the code you are working on. - -### Deployment - -The app is deployed to Department for Education's shinyapps.io subscription using GitHub actions. The yaml file for this can be found in the .github/workflows folder. Maintenance of this is provided by the Explore education statistics platforms team. - -### Navigation - -In general all .r files will have a usable outline, so make use of that for navigation if in RStudio: `Ctrl-Shift-O`. - -### Code styling - -The function `styler::style_dir()` will tidy code according to tidyverse styling using the styler package. Run this regularly as only tidied code will be allowed to be committed. This function also helps to test the running of the code and for basic syntax errors such as missing commas and brackets. - -You should also run `lintr::lint_dir()` regularly as lintr will check all pull requests for the styling of the code, it does not style the code for you like styler, but is slightly stricter and checks for long lines, variables not using snake case, commented out code and undefined objects amongst other things. - ---- - -## How to contribute - -We welcome all suggestions and contributions to this template, and recommend [raising an issue in GitHub](https://github.com/dfe-analytical-services/shiny-template/issues/new/choose) to start discussions around potential additions or changes with the maintaining team. - -### Flagging issues - -If you spot any issues with the application, please flag it in the [issues tab of this repository](https://github.com/dfe-analytical-services/shiny-template/issues), and label as a bug. Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. - -### Making suggestions - -You can also use the [issues tab of this repository](https://github.com/dfe-analytical-services/shiny-template/issues) to suggest new features, changes or additions. Include as much detail on why you're making the suggestion and any thinking towards a solution that you have already done. - ---- - -## Contact - -explore.statistics@education.gov.uk + + + +# Local Authority Interactive Tool (LAIT) + +--- + +## Introduction + + +LAIT is an interactive app for comparing data about children and +young people across all local authorities in England. + +LAIT used to be an interactive spreadsheet built using Excel macros. +Since 2023, this format was deemed to not pass accessibility requirements for +GOV.UK. +Hence, the tool is now being rebuilt in R Shiny. + +This the link to the [current version of LAIT and its GOV.UK webpage](https://www.gov.uk/government/publications/local-authority-interactive-tool-lait). + + +This application is deployed in the following places: + + + +- https://department-for-education.shinyapps.io/local-authority-interactive-tool/ +- https://department-for-education.shinyapps.io/local-authority-interactive-tool-overflow/ + +(NOTE: These are not currently in use as the app has not been deployed.) + +--- + +## Requirements + +The following requirements are necessary for running the application yourself or contributing to it. + +### i. Software requirements (for running locally) + + + +- Installation of R Studio 2024.04.2+764 "Chocolate Cosmos" or higher + +- Installation of R 4.4.1 or higher + +- Installation of RTools44 or higher + +### ii. Programming skills required (for editing or troubleshooting) + + + +- R at an intermediate level, [DfE R learning resources](https://dfe-analytical-services.github.io/analysts-guide/learning-development/r.html) + +- Particularly [R Shiny](https://shiny.rstudio.com/) + +### iii. Access requirements + + + +Currently, access to the necessary data for the tool is restricted while we confirm exactly what data can be shared publicly. +This should be resolved soon. + +Once this is resolved, there are no other access requirements as all data will be available in the repository. + +To contribute to the repo you will need to be given access to create new branches, commit and push / pull, contact explore.statistics@education.gov.uk or jake.tufts@education.gov.uk for this. + +--- + +## How to use + + + +The app's code is modular. +Functions are used for analysis and data manipulation. +Shiny module structure is used to split the different segments of the app. +This style should be adhered to. + +### Running the app locally + +1. Clone or download the repo. + +2. Open the R project in R Studio. + +3. Run `renv::restore()` to install dependencies. + +4. Run `shiny::runApp()` to run the app locally. + +### Folder structure + +All R code outside of the core `global.R`, `server.R`, and `ui.R` files is stored in the `R/` folder. +The scripts containing the functions are in files with a prefix of `fn_`, for example `R/fn_helper_functions.R` (common custom functions). +Shiny modules are in the `R/lait_modules/` folder and have the prefix `mod_`. +Scripts for the different UI panels in the `R/ui_panels/` folder. + + + + + +### Packages + +Package control is handled using `{renv}`. +As in the steps above, you will need to run `renv::restore()` if this is your first time using the project. + +Whenever you add new packages, make sure to use `renv::snapshot()` to record them in the `renv.lock` file. + +### Tests + +Automated tests have been created using `{shinytest2}` that test the app loads and also give other examples of ways you can use tests. +You should edit the tests as you add new features into the app and continue to add and maintain the tests over time. + +GitHub Actions provide CI by running the automated tests and checks for code styling on every pull request into the main branch. +The yaml files for these workflows can be found in the .github/workflows folder. + +You should run `shinytest2::test_app()` regularly to check that the tests are passing against the code you are working on. + +### Deployment + +The app is deployed to Department for Education's shinyapps.io subscription using GitHub actions. +The yaml file for this can be found in the .github/workflows folder. +Maintenance of this is provided by the explore education statistics platforms team. + +### Navigation + +In general all .R files will have a usable outline, so make use of that for navigation if in RStudio: `Ctrl-Shift-O`. + +### Code styling + +The function `styler::style_dir()` will tidy code according to tidyverse styling using the styler package. +Run this regularly as only tidied code will be allowed to be committed. +This function also helps to test the running of the code and for basic syntax errors such as missing commas and brackets. + +You should also run `lintr::lint_dir()` regularly as lintr will check all pull requests for the styling of the code, it does not style the code for you like styler, but is slightly stricter and checks for long lines, variables not using snake case, commented out code and undefined objects amongst other things. + +--- + +## How to contribute + + + +We welcome all suggestions and contributions to this template, and recommend [raising an issue in GitHub](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues/new/choose) to start discussions around potential additions or changes with the maintaining team. + +Get in contact with jake.tufts@education.gov.uk to discuss contributions outside of GitHub. + +### Flagging issues + +If you spot any issues with the application, please flag it in the ["Issues"tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues), and label as a bug. +Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. + +### Making suggestions + +You can also use the ["Issues" tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues) to suggest new features, changes or additions. +Include as much detail on why you're making the suggestion and any thinking towards a solution that you have already done. + +--- + +## Contact + + + +Email app designer, Jake Tufts: jake.tufts@education.gov.uk + +Email the Explore Education Statistics team: explore.statistics@education.gov.uk From 9de7e22ab9d77a20b362b60814723041d515b8f6 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 12:54:27 +0100 Subject: [PATCH 09/12] Removed README_template as no longer needed --- README_template.md | 161 --------------------------------------------- 1 file changed, 161 deletions(-) delete mode 100644 README_template.md diff --git a/README_template.md b/README_template.md deleted file mode 100644 index 954fb238..00000000 --- a/README_template.md +++ /dev/null @@ -1,161 +0,0 @@ - - - -# Local Authority Interactive Tool (LAIT) - ---- - -## Introduction - - -LAIT is an interactive app for comparing data about children and -young people across all local authorities in England. - -LAIT used to be an interactive spreadsheet built using Excel macros. -Since 2023, this format was deemed to not pass accessibility requirements for -GOV.UK. -Hence, the tool is now being rebuilt in R Shiny. - -This the link to the [current version of LAIT and its GOV.UK webpage](https://www.gov.uk/government/publications/local-authority-interactive-tool-lait). - - -This application is deployed in the following places: - - - -- https://department-for-education.shinyapps.io/local-authority-interactive-tool/ -- https://department-for-education.shinyapps.io/local-authority-interactive-tool-overflow/ - -(NOTE: These are not currently in use as the app has not been deployed.) - ---- - -## Requirements - -The following requirements are necessary for running the application yourself or contributing to it. - -### i. Software requirements (for running locally) - - - -- Installation of R Studio 2024.04.2+764 "Chocolate Cosmos" or higher - -- Installation of R 4.4.1 or higher - -- Installation of RTools44 or higher - -### ii. Programming skills required (for editing or troubleshooting) - - - -- R at an intermediate level, [DfE R learning resources](https://dfe-analytical-services.github.io/analysts-guide/learning-development/r.html) - -- Particularly [R Shiny](https://shiny.rstudio.com/) - -### iii. Access requirements - - - -Currently, access to the necessary data for the tool is restricted while we confirm exactly what data can be shared publicly. -This should be resolved soon. - -Once this is resolved, there are no other access requirements as all data will be available in the repository. - -To contribute to the repo you will need to be given access to create new branches, commit and push / pull, contact explore.statistics@education.gov.uk or jake.tufts@education.gov.uk for this. - ---- - -## How to use - - - -The app's code is modular. -Functions are used for analysis and data manipulation. -Shiny module structure is used to split the different segments of the app. -This style should be adhered to. - -### Running the app locally - -1. Clone or download the repo. - -2. Open the R project in R Studio. - -3. Run `renv::restore()` to install dependencies. - -4. Run `shiny::runApp()` to run the app locally. - -### Folder structure - -All R code outside of the core `global.R`, `server.R`, and `ui.R` files is stored in the `R/` folder. -The scripts containing the functions are in files with a prefix of `fn_`, for example `R/fn_helper_functions.R` (common custom functions). -Shiny modules are in the `R/lait_modules/` folder and have the prefix `mod_`. -Scripts for the different UI panels in the `R/ui_panels/` folder. - - - - - -### Packages - -Package control is handled using `{renv}`. -As in the steps above, you will need to run `renv::restore()` if this is your first time using the project. - -Whenever you add new packages, make sure to use `renv::snapshot()` to record them in the `renv.lock` file. - -### Tests - -Automated tests have been created using `{shinytest2}` that test the app loads and also give other examples of ways you can use tests. -You should edit the tests as you add new features into the app and continue to add and maintain the tests over time. - -GitHub Actions provide CI by running the automated tests and checks for code styling on every pull request into the main branch. -The yaml files for these workflows can be found in the .github/workflows folder. - -You should run `shinytest2::test_app()` regularly to check that the tests are passing against the code you are working on. - -### Deployment - -The app is deployed to Department for Education's shinyapps.io subscription using GitHub actions. -The yaml file for this can be found in the .github/workflows folder. -Maintenance of this is provided by the explore education statistics platforms team. - -### Navigation - -In general all .R files will have a usable outline, so make use of that for navigation if in RStudio: `Ctrl-Shift-O`. - -### Code styling - -The function `styler::style_dir()` will tidy code according to tidyverse styling using the styler package. -Run this regularly as only tidied code will be allowed to be committed. -This function also helps to test the running of the code and for basic syntax errors such as missing commas and brackets. - -You should also run `lintr::lint_dir()` regularly as lintr will check all pull requests for the styling of the code, it does not style the code for you like styler, but is slightly stricter and checks for long lines, variables not using snake case, commented out code and undefined objects amongst other things. - ---- - -## How to contribute - - - -We welcome all suggestions and contributions to this template, and recommend [raising an issue in GitHub](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues/new/choose) to start discussions around potential additions or changes with the maintaining team. - -Get in contact with jake.tufts@education.gov.uk to discuss contributions outside of GitHub. - -### Flagging issues - -If you spot any issues with the application, please flag it in the ["Issues"tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues), and label as a bug. -Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. - -### Making suggestions - -You can also use the ["Issues" tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues) to suggest new features, changes or additions. -Include as much detail on why you're making the suggestion and any thinking towards a solution that you have already done. - ---- - -## Contact - - - -Email app designer, Jake Tufts: jake.tufts@education.gov.uk - -Email the Explore Education Statistics team: explore.statistics@education.gov.uk From 438c7ab483d9fbf6580a25a680b17dd7bedeaf21 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 12:57:28 +0100 Subject: [PATCH 10/12] Small typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 954fb238..08906703 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Get in contact with jake.tufts@education.gov.uk to discuss contributions outside ### Flagging issues -If you spot any issues with the application, please flag it in the ["Issues"tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues), and label as a bug. +If you spot any issues with the application, please flag it in the ["Issues" tab of this repository](https://github.com/dfe-analytical-services/local-authority-interactive-tool/issues), and label as a bug. Include as much detail as possible to help the developers diagnose the issue and prepare a suitable remedy. ### Making suggestions From efc80b0b9a525892c413debf110f9abc762db72c Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 15:21:54 +0100 Subject: [PATCH 11/12] Explicitly specifying packages when calling functions in global, server and ui. Adding lintr and updating renv. --- global.R | 33 +- renv.lock | 3284 +++++++++++++++++++++++++++-------------------------- server.R | 105 +- ui.R | 12 +- 4 files changed, 1759 insertions(+), 1675 deletions(-) diff --git a/global.R b/global.R index 3ef75610..923bc545 100644 --- a/global.R +++ b/global.R @@ -46,6 +46,7 @@ shhh(library(shinyalert)) if (FALSE) { shhh(library(shinytest2)) shhh(library(testthat)) + shhh(library(lintr)) } # Source scripts -------------------------------------------------------------- @@ -86,36 +87,36 @@ google_analytics_key <- "Z967JJVQQX" # End of global variables ----------------------------------------------------- # Enable bookmarking so that input choices are shown in the url --------------- -enableBookmarking("url") +shiny::enableBookmarking("url") # Read in the data ------------------------------------------------------------ df_revbal <- read_revenue_data() # Get geographical areas from data -df_areas <- df_revbal %>% - select( +df_areas <- df_revbal |> + dplyr::select( geographic_level, country_name, country_code, region_name, region_code, la_name, old_la_code, new_la_code - ) %>% - distinct() + ) |> + dplyr::distinct() # Extract lists for use in drop downs ----------------------------------------- # LA list -choices_las <- df_areas %>% - filter(geographic_level == "Local authority") %>% - select(geographic_level, area_name = la_name) %>% - arrange(area_name) +choices_las <- df_areas |> + dplyr::filter(geographic_level == "Local authority") |> + dplyr::select(geographic_level, area_name = la_name) |> + dplyr::arrange(area_name) # Full list of areas -choices_areas <- df_areas %>% - filter(geographic_level == "National") %>% - select(geographic_level, area_name = country_name) %>% +choices_areas <- df_areas |> + dplyr::filter(geographic_level == "National") |> + dplyr::select(geographic_level, area_name = country_name) |> rbind( - df_areas %>% - filter(geographic_level == "Regional") %>% - select(geographic_level, area_name = region_name) - ) %>% + df_areas |> + dplyr::filter(geographic_level == "Regional") |> + dplyr::select(geographic_level, area_name = region_name) + ) |> rbind(choices_las) # List of phases diff --git a/renv.lock b/renv.lock index 5f3b728d..910eb578 100644 --- a/renv.lock +++ b/renv.lock @@ -1,1601 +1,1683 @@ -{ - "R": { - "Version": "4.4.1", - "Repositories": [ - { - "Name": "CRAN", - "URL": "https://packagemanager.posit.co/cran/latest" - } - ] - }, - "Packages": { - "AsioHeaders": { - "Package": "AsioHeaders", - "Version": "1.22.1-2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "85bf3bd8fa58da21a22d84fd4f4ef0a8" - }, - "BH": { - "Package": "BH", - "Version": "1.84.0-0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a8235afbcd6316e6e91433ea47661013" - }, - "DT": { - "Package": "DT", - "Version": "0.33", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "crosstalk", - "htmltools", - "htmlwidgets", - "httpuv", - "jquerylib", - "jsonlite", - "magrittr", - "promises" - ], - "Hash": "64ff3427f559ce3f2597a4fe13255cb6" - }, - "MASS": { - "Package": "MASS", - "Version": "7.3-61", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "methods", - "stats", - "utils" - ], - "Hash": "0cafd6f0500e5deba33be22c46bf6055" - }, - "Matrix": { - "Package": "Matrix", - "Version": "1.7-0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "grid", - "lattice", - "methods", - "stats", - "utils" - ], - "Hash": "1920b2f11133b12350024297d8a4ff4a" - }, - "R.cache": { - "Package": "R.cache", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R.methodsS3", - "R.oo", - "R.utils", - "digest", - "utils" - ], - "Hash": "fe539ca3f8efb7410c3ae2cf5fe6c0f8" - }, - "R.methodsS3": { - "Package": "R.methodsS3", - "Version": "1.8.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "278c286fd6e9e75d0c2e8f731ea445c8" - }, - "R.oo": { - "Package": "R.oo", - "Version": "1.26.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R.methodsS3", - "methods", - "utils" - ], - "Hash": "4fed809e53ddb5407b3da3d0f572e591" - }, - "R.utils": { - "Package": "R.utils", - "Version": "2.12.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R.methodsS3", - "R.oo", - "methods", - "tools", - "utils" - ], - "Hash": "3dc2829b790254bfba21e60965787651" - }, - "R6": { - "Package": "R6", - "Version": "2.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "470851b6d5d0ac559e9d01bb352b4021" - }, - "RColorBrewer": { - "Package": "RColorBrewer", - "Version": "1.1-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "45f0398006e83a5b10b72a90663d8d8c" - }, - "RCurl": { - "Package": "RCurl", - "Version": "1.98-1.16", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bitops", - "methods" - ], - "Hash": "ddbdf53d15b47be4407ede6914f56fbb" - }, - "Rcpp": { - "Package": "Rcpp", - "Version": "1.0.13", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "utils" - ], - "Hash": "f27411eb6d9c3dada5edd444b8416675" - }, - "afcolours": { - "Package": "afcolours", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "dplyr", - "grDevices" - ], - "Hash": "2f2912ff398384ab8b2d7e1256019894" - }, - "anytime": { - "Package": "anytime", - "Version": "0.3.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "BH", - "R", - "Rcpp" - ], - "Hash": "74a64813f17b492da9c6afda6b128e3d" - }, - "askpass": { - "Package": "askpass", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "sys" - ], - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" - }, - "backports": { - "Package": "backports", - "Version": "1.5.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "e1e1b9d75c37401117b636b7ae50827a" - }, - "base64enc": { - "Package": "base64enc", - "Version": "0.1-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "543776ae6848fde2f48ff3816d0628bc" - }, - "bitops": { - "Package": "bitops", - "Version": "1.0-7", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "b7d8d8ee39869c18d8846a184dd8a1af" - }, - "brio": { - "Package": "brio", - "Version": "1.1.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "c1ee497a6d999947c2c224ae46799b1a" - }, - "bslib": { - "Package": "bslib", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "cachem", - "fastmap", - "grDevices", - "htmltools", - "jquerylib", - "jsonlite", - "lifecycle", - "memoise", - "mime", - "rlang", - "sass" - ], - "Hash": "8644cc53f43828f19133548195d7e59e" - }, - "cachem": { - "Package": "cachem", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "fastmap", - "rlang" - ], - "Hash": "cd9a672193789068eb5a2aad65a0dedf" - }, - "callr": { - "Package": "callr", - "Version": "3.7.6", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "processx", - "utils" - ], - "Hash": "d7e13f49c19103ece9e58ad2d83a7354" - }, - "checkmate": { - "Package": "checkmate", - "Version": "2.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "backports", - "utils" - ], - "Hash": "c01cab1cb0f9125211a6fc99d540e315" - }, - "chromote": { - "Package": "chromote", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "curl", - "fastmap", - "jsonlite", - "later", - "magrittr", - "processx", - "promises", - "rlang", - "utils", - "websocket" - ], - "Hash": "3cfaf9cbd331e07055acada321664e12" - }, - "cli": { - "Package": "cli", - "Version": "3.6.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "b21916dd77a27642b447374a5d30ecf3" - }, - "codetools": { - "Package": "codetools", - "Version": "0.2-20", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "61e097f35917d342622f21cdc79c256e" - }, - "colorspace": { - "Package": "colorspace", - "Version": "2.1-0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "methods", - "stats" - ], - "Hash": "f20c47fd52fae58b4e377c37bb8c335b" - }, - "commonmark": { - "Package": "commonmark", - "Version": "1.9.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "5d8225445acb167abf7797de48b2ee3c" - }, - "cpp11": { - "Package": "cpp11", - "Version": "0.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5a295d7d963cc5035284dcdbaf334f4e" - }, - "crayon": { - "Package": "crayon", - "Version": "1.5.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "methods", - "utils" - ], - "Hash": "859d96e65ef198fd43e82b9628d593ef" - }, - "crosstalk": { - "Package": "crosstalk", - "Version": "1.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "htmltools", - "jsonlite", - "lazyeval" - ], - "Hash": "ab12c7b080a57475248a30f4db6298c0" - }, - "curl": { - "Package": "curl", - "Version": "5.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" - }, - "desc": { - "Package": "desc", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "utils" - ], - "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" - }, - "dfeR": { - "Package": "dfeR", - "Version": "0.3.0", - "Source": "GitHub", - "RemoteType": "github", - "RemoteUsername": "dfe-analytical-services", - "RemoteRepo": "dfeR", - "RemoteRef": "main", - "RemoteSha": "6f5aca112e8fa0f35541c4a987cea6222302f89d", - "RemoteHost": "api.github.com", - "Requirements": [ - "lifecycle" - ], - "Hash": "1ecf7c371ee428eebb9234de2d48c05a" - }, - "dfeshiny": { - "Package": "dfeshiny", - "Version": "0.2.0", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "dfe-analytical-services", - "RemoteRepo": "dfeshiny", - "RemoteRef": "main", - "RemoteSha": "b19f36f04df2b391a01622611c8de9ac35047784", - "Requirements": [ - "RCurl", - "checkmate", - "glue", - "htmltools", - "shiny", - "shinyGovstyle", - "shinyjs", - "stringr", - "styler" - ], - "Hash": "806a603331839222fd16db987461edab" - }, - "diffobj": { - "Package": "diffobj", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "crayon", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" - }, - "digest": { - "Package": "digest", - "Version": "0.6.36", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "fd6824ad91ede64151e93af67df6376b" - }, - "dplyr": { - "Package": "dplyr", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "generics", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "rlang", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" - }, - "evaluate": { - "Package": "evaluate", - "Version": "0.24.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" - }, - "fansi": { - "Package": "fansi", - "Version": "1.0.6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "utils" - ], - "Hash": "962174cf2aeb5b9eea581522286a911f" - }, - "farver": { - "Package": "farver", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "680887028577f3fa2a81e410ed0d6e42" - }, - "fastmap": { - "Package": "fastmap", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" - }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" - }, - "fs": { - "Package": "fs", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" - }, - "generics": { - "Package": "generics", - "Version": "0.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15e9634c0fcd294799e9b2e929ed1b86" - }, - "ggiraph": { - "Package": "ggiraph", - "Version": "0.8.10", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "Rcpp", - "cli", - "ggplot2", - "grid", - "htmltools", - "htmlwidgets", - "purrr", - "rlang", - "stats", - "systemfonts", - "uuid", - "vctrs" - ], - "Hash": "15748f4335af873289fbdd31610c3f96" - }, - "ggplot2": { - "Package": "ggplot2", - "Version": "3.5.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "MASS", - "R", - "cli", - "glue", - "grDevices", - "grid", - "gtable", - "isoband", - "lifecycle", - "mgcv", - "rlang", - "scales", - "stats", - "tibble", - "vctrs", - "withr" - ], - "Hash": "44c6a2f8202d5b7e878ea274b1092426" - }, - "globals": { - "Package": "globals", - "Version": "0.16.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "codetools" - ], - "Hash": "2580567908cafd4f187c1e5a91e98b7f" - }, - "glue": { - "Package": "glue", - "Version": "1.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "e0b3a53876554bd45879e596cdb10a52" - }, - "gtable": { - "Package": "gtable", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "grid", - "lifecycle", - "rlang" - ], - "Hash": "e18861963cbc65a27736e02b3cd3c4a0" - }, - "highr": { - "Package": "highr", - "Version": "0.11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "xfun" - ], - "Hash": "d65ba49117ca223614f71b60d85b8ab7" - }, - "htmltools": { - "Package": "htmltools", - "Version": "0.5.8.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "digest", - "fastmap", - "grDevices", - "rlang", - "utils" - ], - "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" - }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "04291cc45198225444a397606810ac37" - }, - "httpuv": { - "Package": "httpuv", - "Version": "1.6.15", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "Rcpp", - "later", - "promises", - "utils" - ], - "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" - }, - "httr": { - "Package": "httr", - "Version": "1.4.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "curl", - "jsonlite", - "mime", - "openssl" - ], - "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" - }, - "isoband": { - "Package": "isoband", - "Version": "0.2.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grid", - "utils" - ], - "Hash": "0080607b4a1a7b28979aecef976d8bc2" - }, - "jquerylib": { - "Package": "jquerylib", - "Version": "0.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools" - ], - "Hash": "5aab57a3bd297eee1c1d862735972182" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.8", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "methods" - ], - "Hash": "e1b9c55281c5adc4dd113652d9e26768" - }, - "knitr": { - "Package": "knitr", - "Version": "1.48", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "evaluate", - "highr", - "methods", - "tools", - "xfun", - "yaml" - ], - "Hash": "acf380f300c721da9fde7df115a5f86f" - }, - "labeling": { - "Package": "labeling", - "Version": "0.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "graphics", - "stats" - ], - "Hash": "b64ec208ac5bc1852b285f665d6368b3" - }, - "later": { - "Package": "later", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp", - "rlang" - ], - "Hash": "a3e051d405326b8b0012377434c62b37" - }, - "lattice": { - "Package": "lattice", - "Version": "0.22-6", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "grid", - "stats", - "utils" - ], - "Hash": "cc5ac1ba4c238c7ca9fa6a87ca11a7e2" - }, - "lazyeval": { - "Package": "lazyeval", - "Version": "0.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "d908914ae53b04d4c0c0fd72ecc35370" - }, - "lifecycle": { - "Package": "lifecycle", - "Version": "1.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "rlang" - ], - "Hash": "b8552d117e1b808b09a832f589b79035" - }, - "magrittr": { - "Package": "magrittr", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "7ce2733a9826b3aeb1775d56fd305472" - }, - "memoise": { - "Package": "memoise", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cachem", - "rlang" - ], - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" - }, - "metathis": { - "Package": "metathis", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools", - "knitr", - "magrittr", - "purrr" - ], - "Hash": "687eb3d0192d919d51119619c2b3c308" - }, - "mgcv": { - "Package": "mgcv", - "Version": "1.9-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Matrix", - "R", - "graphics", - "methods", - "nlme", - "splines", - "stats", - "utils" - ], - "Hash": "110ee9d83b496279960e162ac97764ce" - }, - "mime": { - "Package": "mime", - "Version": "0.12", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tools" - ], - "Hash": "18e9c28c1d3ca1560ce30658b22ce104" - }, - "munsell": { - "Package": "munsell", - "Version": "0.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "colorspace", - "methods" - ], - "Hash": "4fd8900853b746af55b81fda99da7695" - }, - "nlme": { - "Package": "nlme", - "Version": "3.1-165", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "graphics", - "lattice", - "stats", - "utils" - ], - "Hash": "2769a88be217841b1f33ed469675c3cc" - }, - "openssl": { - "Package": "openssl", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "askpass" - ], - "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" - }, - "pillar": { - "Package": "pillar", - "Version": "1.9.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cli", - "fansi", - "glue", - "lifecycle", - "rlang", - "utf8", - "utils", - "vctrs" - ], - "Hash": "15da5a8412f317beeee6175fbc76f4bb" - }, - "pingr": { - "Package": "pingr", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "processx", - "utils" - ], - "Hash": "8d2db1d13f4198a00ebf2f066bf2ab67" - }, - "pkgbuild": { - "Package": "pkgbuild", - "Version": "1.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "callr", - "cli", - "desc", - "processx" - ], - "Hash": "a29e8e134a460a01e0ca67a4763c595b" - }, - "pkgconfig": { - "Package": "pkgconfig", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "01f28d4278f15c76cddbea05899c5d6f" - }, - "pkgload": { - "Package": "pkgload", - "Version": "1.4.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "desc", - "fs", - "glue", - "lifecycle", - "methods", - "pkgbuild", - "processx", - "rlang", - "rprojroot", - "utils", - "withr" - ], - "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" - }, - "praise": { - "Package": "praise", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a555924add98c99d2f411e37e7d25e9f" - }, - "processx": { - "Package": "processx", - "Version": "3.8.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "ps", - "utils" - ], - "Hash": "0c90a7d71988856bad2a2a45dd871bb9" - }, - "promises": { - "Package": "promises", - "Version": "1.3.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R6", - "Rcpp", - "fastmap", - "later", - "magrittr", - "rlang", - "stats" - ], - "Hash": "434cd5388a3979e74be5c219bcd6e77d" - }, - "ps": { - "Package": "ps", - "Version": "1.7.7", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "878b467580097e9c383acbb16adab57a" - }, - "purrr": { - "Package": "purrr", - "Version": "1.0.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "lifecycle", - "magrittr", - "rlang", - "vctrs" - ], - "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" - }, - "rappdirs": { - "Package": "rappdirs", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5e3c5dc0b071b21fa128676560dbe94d" - }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tibble" - ], - "Hash": "76c9e04c712a05848ae7a23d2f170a40" - }, - "renv": { - "Package": "renv", - "Version": "1.0.7", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "utils" - ], - "Hash": "397b7b2a265bc5a7a06852524dabae20" - }, - "rlang": { - "Package": "rlang", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" - }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.27", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "27f9502e1cdbfa195f94e03b0f517484" - }, - "rprojroot": { - "Package": "rprojroot", - "Version": "2.0.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" - }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "96710351d642b70e8f02ddeb237c46a7" - }, - "sass": { - "Package": "sass", - "Version": "0.4.9", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "fs", - "htmltools", - "rappdirs", - "rlang" - ], - "Hash": "d53dbfddf695303ea4ad66f86e99b95d" - }, - "scales": { - "Package": "scales", - "Version": "1.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "RColorBrewer", - "cli", - "farver", - "glue", - "labeling", - "lifecycle", - "munsell", - "rlang", - "viridisLite" - ], - "Hash": "c19df082ba346b0ffa6f833e92de34d1" - }, - "shiny": { - "Package": "shiny", - "Version": "1.8.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "bslib", - "cachem", - "commonmark", - "crayon", - "fastmap", - "fontawesome", - "glue", - "grDevices", - "htmltools", - "httpuv", - "jsonlite", - "later", - "lifecycle", - "methods", - "mime", - "promises", - "rlang", - "sourcetools", - "tools", - "utils", - "withr", - "xtable" - ], - "Hash": "54b26646816af9960a4c64d8ceec75d6" - }, - "shinyGovstyle": { - "Package": "shinyGovstyle", - "Version": "0.0.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "jsonlite", - "shiny", - "shinyjs" - ], - "Hash": "a593ce187f4a7830392e0843041e3ea8" - }, - "shinyWidgets": { - "Package": "shinyWidgets", - "Version": "0.8.6", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "anytime", - "bslib", - "grDevices", - "htmltools", - "jsonlite", - "rlang", - "sass", - "shiny" - ], - "Hash": "bc918b6911c4e928e24a9928295de834" - }, - "shinyalert": { - "Package": "shinyalert", - "Version": "3.1.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "htmltools", - "shiny", - "uuid" - ], - "Hash": "45f99f3173e5513e2dec78dc4d63f9f0" - }, - "shinydashboard": { - "Package": "shinydashboard", - "Version": "0.7.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "promises", - "shiny", - "utils" - ], - "Hash": "e418b532e9bb4eb22a714b9a9f1acee7" - }, - "shinyjs": { - "Package": "shinyjs", - "Version": "2.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "digest", - "jsonlite", - "shiny" - ], - "Hash": "802e4786b353a4bb27116957558548d5" - }, - "shinytest2": { - "Package": "shinytest2", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R6", - "callr", - "checkmate", - "chromote", - "cpp11", - "crayon", - "fs", - "globals", - "httr", - "jsonlite", - "pingr", - "rlang", - "rmarkdown", - "shiny", - "testthat", - "withr" - ], - "Hash": "a414c1bb2eb6e2a920742d3ebce84962" - }, - "shinytitle": { - "Package": "shinytitle", - "Version": "0.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "shiny" - ], - "Hash": "12a2972d88910692c1a125d6e1e95d51" - }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "5f5a7629f956619d519205ec475fe647" - }, - "stringi": { - "Package": "stringi", - "Version": "1.8.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "stats", - "tools", - "utils" - ], - "Hash": "39e1144fd75428983dc3f63aa53dfa91" - }, - "stringr": { - "Package": "stringr", - "Version": "1.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "magrittr", - "rlang", - "stringi", - "vctrs" - ], - "Hash": "960e2ae9e09656611e0b8214ad543207" - }, - "styler": { - "Package": "styler", - "Version": "1.10.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R.cache", - "cli", - "magrittr", - "purrr", - "rlang", - "rprojroot", - "tools", - "vctrs", - "withr" - ], - "Hash": "93a2b1beac2437bdcc4724f8bf867e2c" - }, - "sys": { - "Package": "sys", - "Version": "3.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" - }, - "systemfonts": { - "Package": "systemfonts", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cpp11", - "lifecycle" - ], - "Hash": "213b6b8ed5afbf934843e6c3b090d418" - }, - "testthat": { - "Package": "testthat", - "Version": "3.2.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "brio", - "callr", - "cli", - "desc", - "digest", - "evaluate", - "jsonlite", - "lifecycle", - "magrittr", - "methods", - "pkgload", - "praise", - "processx", - "ps", - "rlang", - "utils", - "waldo", - "withr" - ], - "Hash": "3f6e7e5e2220856ff865e4834766bf2b" - }, - "tibble": { - "Package": "tibble", - "Version": "3.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "fansi", - "lifecycle", - "magrittr", - "methods", - "pillar", - "pkgconfig", - "rlang", - "utils", - "vctrs" - ], - "Hash": "a84e2cc86d07289b3b6f5069df7a004c" - }, - "tidyselect": { - "Package": "tidyselect", - "Version": "1.2.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang", - "vctrs", - "withr" - ], - "Hash": "829f27b9c4919c16b593794a6344d6c0" - }, - "tinytex": { - "Package": "tinytex", - "Version": "0.52", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "xfun" - ], - "Hash": "cfbad971a71f0e27cec22e544a08bc3b" - }, - "utf8": { - "Package": "utf8", - "Version": "1.2.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "62b65c52671e6665f803ff02954446e9" - }, - "uuid": { - "Package": "uuid", - "Version": "1.2-0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "303c19bfd970bece872f93a824e323d9" - }, - "vctrs": { - "Package": "vctrs", - "Version": "0.6.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang" - ], - "Hash": "c03fa420630029418f7e6da3667aac4a" - }, - "viridisLite": { - "Package": "viridisLite", - "Version": "0.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "c826c7c4241b6fc89ff55aaea3fa7491" - }, - "waldo": { - "Package": "waldo", - "Version": "0.5.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "diffobj", - "fansi", - "glue", - "methods", - "rematch2", - "rlang", - "tibble" - ], - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" - }, - "websocket": { - "Package": "websocket", - "Version": "1.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "AsioHeaders", - "R6", - "cpp11", - "later" - ], - "Hash": "76e0d400757e318cca33def29ccebbc2" - }, - "withr": { - "Package": "withr", - "Version": "3.0.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "grDevices", - "graphics" - ], - "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" - }, - "xfun": { - "Package": "xfun", - "Version": "0.46", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "stats", - "tools" - ], - "Hash": "00ce32f398db0415dde61abfef11300c" - }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, - "yaml": { - "Package": "yaml", - "Version": "2.3.9", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "9cb28d11799d93c953f852083d55ee9e" - } - } -} +{ + "R": { + "Version": "4.4.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.posit.co/cran/latest" + } + ] + }, + "Packages": { + "AsioHeaders": { + "Package": "AsioHeaders", + "Version": "1.22.1-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "85bf3bd8fa58da21a22d84fd4f4ef0a8" + }, + "BH": { + "Package": "BH", + "Version": "1.84.0-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a8235afbcd6316e6e91433ea47661013" + }, + "DT": { + "Package": "DT", + "Version": "0.33", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "crosstalk", + "htmltools", + "htmlwidgets", + "httpuv", + "jquerylib", + "jsonlite", + "magrittr", + "promises" + ], + "Hash": "64ff3427f559ce3f2597a4fe13255cb6" + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-61", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "stats", + "utils" + ], + "Hash": "0cafd6f0500e5deba33be22c46bf6055" + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.7-0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "grid", + "lattice", + "methods", + "stats", + "utils" + ], + "Hash": "1920b2f11133b12350024297d8a4ff4a" + }, + "R.cache": { + "Package": "R.cache", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R.methodsS3", + "R.oo", + "R.utils", + "digest", + "utils" + ], + "Hash": "fe539ca3f8efb7410c3ae2cf5fe6c0f8" + }, + "R.methodsS3": { + "Package": "R.methodsS3", + "Version": "1.8.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "278c286fd6e9e75d0c2e8f731ea445c8" + }, + "R.oo": { + "Package": "R.oo", + "Version": "1.26.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R.methodsS3", + "methods", + "utils" + ], + "Hash": "4fed809e53ddb5407b3da3d0f572e591" + }, + "R.utils": { + "Package": "R.utils", + "Version": "2.12.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R.methodsS3", + "R.oo", + "methods", + "tools", + "utils" + ], + "Hash": "3dc2829b790254bfba21e60965787651" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "45f0398006e83a5b10b72a90663d8d8c" + }, + "RCurl": { + "Package": "RCurl", + "Version": "1.98-1.16", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bitops", + "methods" + ], + "Hash": "ddbdf53d15b47be4407ede6914f56fbb" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.13", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "utils" + ], + "Hash": "f27411eb6d9c3dada5edd444b8416675" + }, + "afcolours": { + "Package": "afcolours", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "dplyr", + "grDevices" + ], + "Hash": "2f2912ff398384ab8b2d7e1256019894" + }, + "anytime": { + "Package": "anytime", + "Version": "0.3.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "BH", + "R", + "Rcpp" + ], + "Hash": "74a64813f17b492da9c6afda6b128e3d" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "backports": { + "Package": "backports", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "e1e1b9d75c37401117b636b7ae50827a" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bitops": { + "Package": "bitops", + "Version": "1.0-7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b7d8d8ee39869c18d8846a184dd8a1af" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "8644cc53f43828f19133548195d7e59e" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "callr": { + "Package": "callr", + "Version": "3.7.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" + }, + "checkmate": { + "Package": "checkmate", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "backports", + "utils" + ], + "Hash": "c01cab1cb0f9125211a6fc99d540e315" + }, + "chromote": { + "Package": "chromote", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "curl", + "fastmap", + "jsonlite", + "later", + "magrittr", + "processx", + "promises", + "rlang", + "utils", + "websocket" + ], + "Hash": "3cfaf9cbd331e07055acada321664e12" + }, + "cli": { + "Package": "cli", + "Version": "3.6.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "b21916dd77a27642b447374a5d30ecf3" + }, + "codetools": { + "Package": "codetools", + "Version": "0.2-20", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "61e097f35917d342622f21cdc79c256e" + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.1-0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "stats" + ], + "Hash": "f20c47fd52fae58b4e377c37bb8c335b" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5d8225445acb167abf7797de48b2ee3c" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "859d96e65ef198fd43e82b9628d593ef" + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "htmltools", + "jsonlite", + "lazyeval" + ], + "Hash": "ab12c7b080a57475248a30f4db6298c0" + }, + "curl": { + "Package": "curl", + "Version": "5.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + }, + "cyclocomp": { + "Package": "cyclocomp", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "callr", + "crayon", + "desc", + "remotes", + "withr" + ], + "Hash": "cdc4a473222b0112d4df0bcfbed12d44" + }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "dfeR": { + "Package": "dfeR", + "Version": "0.3.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "dfe-analytical-services", + "RemoteRepo": "dfeR", + "RemoteRef": "main", + "RemoteSha": "6f5aca112e8fa0f35541c4a987cea6222302f89d", + "Requirements": [ + "lifecycle" + ], + "Hash": "1ecf7c371ee428eebb9234de2d48c05a" + }, + "dfeshiny": { + "Package": "dfeshiny", + "Version": "0.2.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "dfe-analytical-services", + "RemoteRepo": "dfeshiny", + "RemoteRef": "main", + "RemoteSha": "b19f36f04df2b391a01622611c8de9ac35047784", + "Requirements": [ + "RCurl", + "checkmate", + "glue", + "htmltools", + "shiny", + "shinyGovstyle", + "shinyjs", + "stringr", + "styler" + ], + "Hash": "806a603331839222fd16db987461edab" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.36", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "fd6824ad91ede64151e93af67df6376b" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "rlang", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "962174cf2aeb5b9eea581522286a911f" + }, + "farver": { + "Package": "farver", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "680887028577f3fa2a81e410ed0d6e42" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" + }, + "ggiraph": { + "Package": "ggiraph", + "Version": "0.8.10", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "Rcpp", + "cli", + "ggplot2", + "grid", + "htmltools", + "htmlwidgets", + "purrr", + "rlang", + "stats", + "systemfonts", + "uuid", + "vctrs" + ], + "Hash": "15748f4335af873289fbdd31610c3f96" + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "cli", + "glue", + "grDevices", + "grid", + "gtable", + "isoband", + "lifecycle", + "mgcv", + "rlang", + "scales", + "stats", + "tibble", + "vctrs", + "withr" + ], + "Hash": "44c6a2f8202d5b7e878ea274b1092426" + }, + "globals": { + "Package": "globals", + "Version": "0.16.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "codetools" + ], + "Hash": "2580567908cafd4f187c1e5a91e98b7f" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "grid", + "lifecycle", + "rlang" + ], + "Hash": "e18861963cbc65a27736e02b3cd3c4a0" + }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "04291cc45198225444a397606810ac37" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.15", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" + }, + "httr": { + "Package": "httr", + "Version": "1.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grid", + "utils" + ], + "Hash": "0080607b4a1a7b28979aecef976d8bc2" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "methods" + ], + "Hash": "e1b9c55281c5adc4dd113652d9e26768" + }, + "knitr": { + "Package": "knitr", + "Version": "1.48", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "acf380f300c721da9fde7df115a5f86f" + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "graphics", + "stats" + ], + "Hash": "b64ec208ac5bc1852b285f665d6368b3" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" + }, + "lattice": { + "Package": "lattice", + "Version": "0.22-6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "grid", + "stats", + "utils" + ], + "Hash": "cc5ac1ba4c238c7ca9fa6a87ca11a7e2" + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" + }, + "lintr": { + "Package": "lintr", + "Version": "3.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "backports", + "codetools", + "cyclocomp", + "digest", + "glue", + "knitr", + "rex", + "stats", + "utils", + "xml2", + "xmlparsedata" + ], + "Hash": "08cff46381a242d44c0d8dd0aabd9f71" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "metathis": { + "Package": "metathis", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools", + "knitr", + "magrittr", + "purrr" + ], + "Hash": "687eb3d0192d919d51119619c2b3c308" + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.9-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Matrix", + "R", + "graphics", + "methods", + "nlme", + "splines", + "stats", + "utils" + ], + "Hash": "110ee9d83b496279960e162ac97764ce" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "colorspace", + "methods" + ], + "Hash": "4fd8900853b746af55b81fda99da7695" + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-165", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "graphics", + "lattice", + "stats", + "utils" + ], + "Hash": "2769a88be217841b1f33ed469675c3cc" + }, + "openssl": { + "Package": "openssl", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "askpass" + ], + "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pingr": { + "Package": "pingr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "processx", + "utils" + ], + "Hash": "8d2db1d13f4198a00ebf2f066bf2ab67" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "a29e8e134a460a01e0ca67a4763c595b" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "desc", + "fs", + "glue", + "lifecycle", + "methods", + "pkgbuild", + "processx", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "processx": { + "Package": "processx", + "Version": "3.8.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" + }, + "promises": { + "Package": "promises", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" + ], + "Hash": "434cd5388a3979e74be5c219bcd6e77d" + }, + "ps": { + "Package": "ps", + "Version": "1.7.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "878b467580097e9c383acbb16adab57a" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "3ee025083e66f18db6cf27b56e23e141" + }, + "renv": { + "Package": "renv", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "397b7b2a265bc5a7a06852524dabae20" + }, + "rex": { + "Package": "rex", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "lazyeval" + ], + "Hash": "ae34cd56890607370665bee5bd17812f" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "27f9502e1cdbfa195f94e03b0f517484" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96710351d642b70e8f02ddeb237c46a7" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, + "scales": { + "Package": "scales", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "RColorBrewer", + "cli", + "farver", + "glue", + "labeling", + "lifecycle", + "munsell", + "rlang", + "viridisLite" + ], + "Hash": "c19df082ba346b0ffa6f833e92de34d1" + }, + "shiny": { + "Package": "shiny", + "Version": "1.8.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "54b26646816af9960a4c64d8ceec75d6" + }, + "shinyGovstyle": { + "Package": "shinyGovstyle", + "Version": "0.0.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "jsonlite", + "shiny", + "shinyjs" + ], + "Hash": "a593ce187f4a7830392e0843041e3ea8" + }, + "shinyWidgets": { + "Package": "shinyWidgets", + "Version": "0.8.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "anytime", + "bslib", + "grDevices", + "htmltools", + "jsonlite", + "rlang", + "sass", + "shiny" + ], + "Hash": "bc918b6911c4e928e24a9928295de834" + }, + "shinyalert": { + "Package": "shinyalert", + "Version": "3.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "htmltools", + "shiny", + "uuid" + ], + "Hash": "45f99f3173e5513e2dec78dc4d63f9f0" + }, + "shinydashboard": { + "Package": "shinydashboard", + "Version": "0.7.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "promises", + "shiny", + "utils" + ], + "Hash": "e418b532e9bb4eb22a714b9a9f1acee7" + }, + "shinyjs": { + "Package": "shinyjs", + "Version": "2.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "digest", + "jsonlite", + "shiny" + ], + "Hash": "802e4786b353a4bb27116957558548d5" + }, + "shinytest2": { + "Package": "shinytest2", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "callr", + "checkmate", + "chromote", + "cpp11", + "crayon", + "fs", + "globals", + "httr", + "jsonlite", + "pingr", + "rlang", + "rmarkdown", + "shiny", + "testthat", + "withr" + ], + "Hash": "a414c1bb2eb6e2a920742d3ebce84962" + }, + "shinytitle": { + "Package": "shinytitle", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "shiny" + ], + "Hash": "12a2972d88910692c1a125d6e1e95d51" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" + }, + "stringi": { + "Package": "stringi", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "39e1144fd75428983dc3f63aa53dfa91" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "960e2ae9e09656611e0b8214ad543207" + }, + "styler": { + "Package": "styler", + "Version": "1.10.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R.cache", + "cli", + "magrittr", + "purrr", + "rlang", + "rprojroot", + "tools", + "vctrs", + "withr" + ], + "Hash": "93a2b1beac2437bdcc4724f8bf867e2c" + }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11", + "lifecycle" + ], + "Hash": "213b6b8ed5afbf934843e6c3b090d418" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ], + "Hash": "829f27b9c4919c16b593794a6344d6c0" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.52", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "cfbad971a71f0e27cec22e544a08bc3b" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "62b65c52671e6665f803ff02954446e9" + }, + "uuid": { + "Package": "uuid", + "Version": "1.2-0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "303c19bfd970bece872f93a824e323d9" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "c826c7c4241b6fc89ff55aaea3fa7491" + }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "websocket": { + "Package": "websocket", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "AsioHeaders", + "R6", + "cpp11", + "later" + ], + "Hash": "76e0d400757e318cca33def29ccebbc2" + }, + "withr": { + "Package": "withr", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "graphics" + ], + "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.46", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "00ce32f398db0415dde61abfef11300c" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "xmlparsedata": { + "Package": "xmlparsedata", + "Version": "1.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "45e4bf3c46476896e821fc0a408fb4fc" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9cb28d11799d93c953f852083d55ee9e" + } + } +} diff --git a/server.R b/server.R index 925a2fce..178a2575 100644 --- a/server.R +++ b/server.R @@ -24,7 +24,7 @@ server <- function(input, output, session) { # or plotly chart) using the list below, but it will need updating to match # any entries in your own dashboard's bookmarking url that you don't want # including. - setBookmarkExclude(c( + shiny::setBookmarkExclude(c( "cookies", "link_to_app_content_tab", "tabBenchmark_rows_current", "tabBenchmark_rows_all", "tabBenchmark_columns_selected", "tabBenchmark_cell_clicked", @@ -36,19 +36,19 @@ server <- function(input, output, session) { ".clientValue-default-plotlyCrosstalkOpts" )) - observe({ + shiny::observe({ # Trigger this observer every time an input changes - reactiveValuesToList(input) + shiny::reactiveValuesToList(input) session$doBookmark() }) - onBookmarked(function(url) { - updateQueryString(url) + shiny::onBookmarked(function(url) { + shiny::updateQueryString(url) }) - # observe({ + # shiny::observe({ # if (input$navlistPanel == "Example tab 1") { - # change_window_title( + # shinytitle::change_window_title( # session, # paste0( # site_title, " - ", @@ -57,7 +57,7 @@ server <- function(input, output, session) { # ) # ) # } else { - # change_window_title( + # shinytitle::change_window_title( # session, # paste0( # site_title, " - ", @@ -68,7 +68,7 @@ server <- function(input, output, session) { # }) # Cookies logic ------------------------------------------------------------- - observeEvent(input$cookies, { + shiny::observeEvent(input$cookies, { if (!is.null(input$cookies)) { if (!("dfe_analytics" %in% names(input$cookies))) { shinyjs::show(id = "cookieMain") @@ -94,7 +94,7 @@ server <- function(input, output, session) { }) # Need these set of observeEvent to create a path through the cookie banner - observeEvent(input$cookieAccept, { + shiny::observeEvent(input$cookieAccept, { msg <- list( name = "dfe_analytics", value = "granted" @@ -105,7 +105,7 @@ server <- function(input, output, session) { shinyjs::hide(id = "cookieMain") }) - observeEvent(input$cookieReject, { + shiny::observeEvent(input$cookieReject, { msg <- list( name = "dfe_analytics", value = "denied" @@ -116,15 +116,15 @@ server <- function(input, output, session) { shinyjs::hide(id = "cookieMain") }) - observeEvent(input$hideAccept, { + shiny::observeEvent(input$hideAccept, { shinyjs::toggle(id = "cookieDiv") }) - observeEvent(input$hideReject, { + shiny::observeEvent(input$hideReject, { shinyjs::toggle(id = "cookieDiv") }) - observeEvent(input$remove, { + shiny::observeEvent(input$remove, { shinyjs::toggle(id = "cookieMain") msg <- list(name = "dfe_analytics", value = "denied") session$sendCustomMessage("cookie-remove", msg) @@ -132,11 +132,11 @@ server <- function(input, output, session) { print(input$cookies) }) - cookies_data <- reactive({ + cookies_data <- shiny::reactive({ input$cookies }) - output$cookie_status <- renderText({ + output$cookie_status <- shiny::renderText({ cookie_text_stem <- "To better understand the reach of our dashboard tools, this site uses cookies to identify numbers of unique users as part of Google Analytics. You have chosen to" @@ -154,26 +154,27 @@ server <- function(input, output, session) { } }) - observeEvent(input$cookieLink, { + shiny::observeEvent(input$cookieLink, { # Need to link here to where further info is located. You can # updateTabsetPanel to have a cookie page for instance - updateTabsetPanel(session, "navlistPanel", + shiny::updateTabsetPanel(session, "navlistPanel", selected = "Support and feedback" ) }) # Dataset with timeseries data ---------------------------------------------- - reactive_rev_bal <- reactive({ - df_revbal %>% filter( - area_name == input$selectArea | area_name == "England", - school_phase == input$selectPhase - ) + reactive_rev_bal <- shiny::reactive({ + df_revbal |> + dplyr::filter( + area_name == input$selectArea | area_name == "England", + school_phase == input$selectPhase + ) }) # Dataset with benchmark data ----------------------------------------------- - reactive_benchmark <- reactive({ - df_revbal %>% - filter( + reactive_benchmark <- shiny::reactive({ + df_revbal |> + dplyr::filter( area_name %in% c(input$selectArea, input$selectBenchLAs), school_phase == input$selectPhase, year == max(year) @@ -182,8 +183,8 @@ server <- function(input, output, session) { # Charts -------------------------------------------------------------------- # Line chart for revenue balance over time - output$lineRevBal <- renderGirafe({ - girafe( + output$lineRevBal <- ggiraph::renderGirafe({ + ggiraph::girafe( ggobj = create_avg_rev_timeseries(reactive_rev_bal(), input$selectArea), options = list( opts_sizing(rescale = TRUE, width = 1.0), @@ -195,8 +196,8 @@ server <- function(input, output, session) { }) # Benchmarking bar chart - output$colBenchmark <- renderGirafe({ - girafe( + output$colBenchmark <- ggiraph::renderGirafe({ + ggiraph::girafe( ggobj = plot_avg_rev_benchmark(reactive_benchmark()), options = list( opts_sizing(rescale = TRUE, width = 1.0), @@ -208,10 +209,10 @@ server <- function(input, output, session) { }) # Benchmarking table - output$tabBenchmark <- renderDataTable({ - datatable( - reactive_benchmark() %>% - select( + output$tabBenchmark <- DT::renderDataTable({ + DT::datatable( + reactive_benchmark() |> + dplyr::select( Area = area_name, `Average Revenue Balance (£)` = average_revenue_balance, `Total Revenue Balance (£m)` = total_revenue_balance_million @@ -226,35 +227,35 @@ server <- function(input, output, session) { # Value boxes --------------------------------------------------------------- # Create a reactive value for average revenue balance - latest_average_balance <- reactive({ - reactive_rev_bal() %>% - filter( + latest_average_balance <- shiny::reactive({ + reactive_rev_bal() |> + dplyr::filter( year == max(year), area_name == input$selectArea, school_phase == input$selectPhase - ) %>% - pull(average_revenue_balance) + ) |> + dplyr::pull(average_revenue_balance) }) # Create a reactive value for previous year average - previous_average_balance <- reactive({ - previous_year <- reactive_rev_bal() %>% - filter( + previous_average_balance <- shiny::reactive({ + previous_year <- reactive_rev_bal() |> + dplyr::filter( year == max(year) - 1, area_name == input$selectArea, school_phase == input$selectPhase - ) %>% - pull(average_revenue_balance) + ) |> + dplyr::pull(average_revenue_balance) }) # Export values for use in UI tests ----------------------------------------- - exportTestValues( + shiny::exportTestValues( avg_rev_bal_value = latest_average_balance(), prev_avg_rev_bal_value = previous_average_balance() ) # Create a value box for average revenue balance - output$box_balance_latest <- renderValueBox({ + output$box_balance_latest <- shinydashboard::renderValueBox({ value_box( value = dfeR::pretty_num(latest_average_balance(), gbp = TRUE), subtitle = paste0("Average revenue balance"), @@ -263,7 +264,7 @@ server <- function(input, output, session) { }) # Create a value box for the change on previous year - output$box_balance_change <- renderValueBox({ + output$box_balance_change <- shinydashboard::renderValueBox({ value_box( value = dfeR::pretty_num( latest_average_balance() - previous_average_balance(), @@ -276,12 +277,12 @@ server <- function(input, output, session) { }) # Link in the user guide panel back to the main panel ----------------------- - observeEvent(input$link_to_app_content_tab, { - updateTabsetPanel(session, "navlistPanel", selected = "Example tab 1") + shiny::observeEvent(input$link_to_app_content_tab, { + shiny::updateTabsetPanel(session, "navlistPanel", selected = "Example tab 1") }) # Download the underlying data button -------------------------------------- - output$download_data <- downloadHandler( + output$download_data <- shiny::downloadHandler( filename = "shiny_template_underlying_data.csv", content = function(file) { write.csv(df_revbal, file) @@ -289,12 +290,12 @@ server <- function(input, output, session) { ) # Dynamic label showing custom selections ----------------------------------- - output$dropdown_label <- renderText({ + output$dropdown_label <- shiny::renderText({ paste0("Current selections: ", input$selectPhase, ", ", input$selectArea) }) # Stop app ------------------------------------------------------------------ session$onSessionEnded(function() { - stopApp() + shiny::stopApp() }) } diff --git a/ui.R b/ui.R index 407a8caf..48ef0683 100644 --- a/ui.R +++ b/ui.R @@ -19,15 +19,15 @@ # # ----------------------------------------------------------------------------- ui <- function(input, output, session) { - fluidPage( + shiny::fluidPage( # Set application metadata ------------------------------------------------ tags$head(HTML("Local Authority Interactive Tool (LAIT)")), tags$head(tags$link(rel = "shortcut icon", href = "dfefavicon.png")), use_shiny_title(), tags$html(lang = "en"), # Add meta description for search engines - meta() %>% - meta_general( + metathis::meta() %>% + metathis::meta_general( application_name = "Local Authority Interactive Tool (LAIT)", description = "Local Authority Interactive Tool (LAIT)", robots = "index,follow", @@ -46,7 +46,7 @@ ui <- function(input, output, session) { ), # Load javascript dependencies -------------------------------------------- - useShinydashboard(), + shinyWidgets::useShinydashboard(), shinyjs::useShinyjs(), # Cookies ----------------------------------------------------------------- @@ -64,7 +64,7 @@ ui <- function(input, output, session) { shinyGovstyle::cookieBanner("Local Authority Interactive Tool (LAIT)"), # Google analytics -------------------------------------------------------- - tags$head(includeHTML(("google-analytics.html"))), + tags$head(shiny::includeHTML(("google-analytics.html"))), tags$head( tags$link( rel = "stylesheet", @@ -116,6 +116,6 @@ ui <- function(input, output, session) { ), # Footer ------------------------------------------------------------------ - footer(full = TRUE) + shinyGovstyle::footer(full = TRUE) ) } From 52756e2320f2b11e11950a1fe438d85b9a1b3415 Mon Sep 17 00:00:00 2001 From: Jake Tufts Date: Wed, 21 Aug 2024 15:52:19 +0100 Subject: [PATCH 12/12] Removing app_dir from AppDriver in UI test, legacy from title issues --- tests/testthat/test-UI-01-basic_load.R | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/testthat/test-UI-01-basic_load.R b/tests/testthat/test-UI-01-basic_load.R index d22f5a51..9aa506c4 100644 --- a/tests/testthat/test-UI-01-basic_load.R +++ b/tests/testthat/test-UI-01-basic_load.R @@ -11,7 +11,6 @@ # ----------------------------------------------------------------------------- # Start an app running app <- AppDriver$new( - app_dir = "C:/Users/jtufts/Documents/no_net_work/Open source/local-authority-interactive-tool", name = "basic_load", height = 846, width = 1445,