generated from dfe-analytical-services/shiny-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat: Setting up info_pages dev folder and user_guide dev app * Feat: Adding context, an accordian to display each View and the content for the All LA page (with image) * Feat: Added LA view to user guide * Feat: Added rest of the user guide * Feat: Adding information page and creating a dev app for it * Feat: Order by alphabet fn * Chore: Improving styling of indicator info table module * Feat: Latest data update notification * Feat: Adding development update log (xlsx) * Feat: Added development update notification banner * Feat: Improving the search method for info pages * Feat: New update banner sheet * Feat: Adding intro spiel for each heading * Chore: New useful links data, also lowercasing all data file names * Feat: Jazzing up the latest dev updates * Feat: Useful links now into info-pages * Feat: Adding info page to main app, removing some of the spiel * Feat: Turning dev updates into more of a bslib card and adding collapsible functionality * Chore: Removed the default gap that appears fro bslibs page_fillable between elements (like beta banner) * Feat: Added news banner to dev info app and main app * Feat: News banner added to top of the app (included with beta banner - now capitalised) * Feat: Spinners on info page tables, rewritten noti banner for latest data updates as card rather than shinyGovstyle * Feat: Adding owner title for useful links * Chore: Linting fixes * Rename Development_update_log.xlsx to development_update_log.xlsx * Update and rename Banner_update.csv to banner_update.csv
- Loading branch information
Showing
40 changed files
with
1,674 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"Data update" | ||
"Welcome to the first release of the new Local Authority Interactive Tool (LAIT), we hope you find this easy to use but any feedback would be greatly appreciated." |
Binary file not shown.
File renamed without changes.
162 changes: 121 additions & 41 deletions
162
01_data/02_prod/LAIT Data Dictionary.csv → 01_data/02_prod/lait_data_dictionary.csv
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"Tool_Name","Type","Owner","Link" | ||
"Child Health Profiles","Web Tool","OHID","https://fingertips.phe.org.uk/profile/child-health-profiles" | ||
"Early Years Outcome Dashboard","Rshiny Tool","DfE","https://department-for-education.shinyapps.io/smapey-dashboard/" | ||
"Five-Year Ofsted Inspection Data","ODS","Ofsted","https://www.gov.uk/government/publications/five-year-ofsted-inspection-data" | ||
"High Needs Dashboard","Excel Tool","DfE","https://www.gov.uk/government/publications/high-needs-benchmarking-tool" | ||
"Level 2 and 3 Attainment by 19 Dashboard","Rshiny Tool","DfE","https://department-for-education.shinyapps.io/attainment-age-19/" | ||
"Local Authority School Places Scorecards","Rshiny Tool","DfE","https://department-for-education.shinyapps.io/la-school-places-scorecards/?_inputs_&navlistPanel=%22Homepage%22&tabs=%22quantity%22&tabs_tech_notes=%22Quantity%22&cookies-cookie_accept=0&cookies-cookie_reject=0&cookies-cookie_link=0&linklascorecardsTab=0&linkQuantityTab=0&linkForecastTab=0&linkPreferenceTab=0&linkQualityTab=0&linkCostTab=0&linkTechnicalnotesTab=0&cookie_consent_clear=0&LA_choice=%22England%22&phase_choice=%22Primary%22&selectBenchLAs=null&selectBenchLAspref=null&chart_choice=%22Ofsted%20Rating%22&selectBenchLAsquality=null" | ||
"NEET and Participation LA Scorecards","Rshiny Tool","DfE","https://department-for-education.shinyapps.io/neet-comparative-la-scorecard/" | ||
"Public Health Outcomes Framework","Web Tool","OHID","https://fingertips.phe.org.uk/profile/public-health-outcomes-framework" | ||
"School Performance Tables","Web Tool","DfE","https://www.gov.uk/school-performance-tables" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
source(here::here("global.R")) | ||
|
||
# Load functions | ||
list.files("R/", full.names = TRUE) |> | ||
(\(x) { | ||
x[grepl("fn_", x)] | ||
})() |> | ||
purrr::walk(source) | ||
|
||
# Load modules | ||
list.files("R/lait_modules/", full.names = TRUE) |> | ||
purrr::walk(source) | ||
|
||
# Load ui panels | ||
list.files("R/ui_panels/", full.names = TRUE) |> | ||
purrr::walk(source) | ||
|
||
ui_dev <- function(input, output, session) { | ||
bslib::page_fillable( | ||
|
||
# Set application metadata ------------------------------------------------ | ||
tags$head(HTML("<title>Local Authority Interactive Tool (LAIT)</title>")), | ||
tags$head(tags$link(rel = "shortcut icon", href = here::here("www/dfefavicon.png"))), | ||
tags$head(includeHTML(here::here("google-analytics.html"))), | ||
shinytitle::use_shiny_title(), | ||
tags$html(lang = "en"), | ||
# Add meta description for search engines | ||
metathis::meta() |> | ||
metathis::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 | ||
), | ||
|
||
# Styling with CSS | ||
shiny::includeCSS(here::here("www/dfe_shiny_gov_style.css")), | ||
# Remove any gaps between elements | ||
gap = 0, | ||
|
||
# Load javascript dependencies -------------------------------------------- | ||
shinyWidgets::useShinydashboard(), | ||
shinyjs::useShinyjs(), | ||
tags$head(htmltools::includeScript(here::here("www/custom_js.js"))), | ||
reactable.extras::reactable_extras_dependency(), | ||
shinyToastify::useShinyToastify(), | ||
|
||
# Cookies ----------------------------------------------------------------- | ||
# Setting up cookie consent based on a cookie recording the consent: | ||
# https://book.javascript-for-r.com/shiny-cookies.html | ||
dfeshiny::dfe_cookies_script(), | ||
dfeshiny::cookies_banner_ui( | ||
"cookie-banner", | ||
"Local Authority Interactive Tool (LAIT)" | ||
), | ||
|
||
# Header ------------------------------------------------------------------ | ||
shinyGovstyle::header( | ||
main_text = "", | ||
main_link = "https://www.gov.uk/government/organisations/department-for-education", | ||
secondary_text = "Local Authority Interactive Tool (LAIT)", | ||
logo = "www/images/DfE_logo_landscape.png", | ||
logo_width = 150, | ||
logo_height = 32 | ||
), | ||
|
||
# Beta banner ------------------------------------------------------------- | ||
shiny::tagList( | ||
shinyGovstyle::banner( | ||
ifelse(banner_update_msg == "", "beta-banner", "beta-banner-no-border"), | ||
"Beta", | ||
"This Dashboard is in beta phase and we are still reviewing performance and reliability." | ||
) | ||
), | ||
# News banner -------------------------------------------------------------- | ||
if (banner_update_msg != "") { | ||
shinyGovstyle::banner( | ||
inputId = "update-msg-banner", | ||
type = "News", | ||
label = banner_update_msg | ||
) | ||
}, | ||
|
||
# Start of app ============================================================ | ||
|
||
# Nav panels -------------------------------------------------------------- | ||
bslib::navset_pill_list( | ||
"", | ||
id = "navsetpillslist", | ||
widths = c(2, 10), | ||
well = FALSE, | ||
|
||
# ======================================================================= | ||
# User guide | ||
# ======================================================================= | ||
info_page_panel() | ||
) | ||
) | ||
} | ||
|
||
|
||
# Define the `server` function | ||
server_dev <- function(input, output, session) { | ||
# Call the banner module server | ||
bannerModuleServer( | ||
"banner_module", | ||
banner_update_msg | ||
) | ||
|
||
# Indicator information table | ||
IndicatorInfoTableServer( | ||
"indicator_info_table", | ||
metrics_clean | ||
) | ||
|
||
# Latest indicator update notification | ||
LatestDataUpdateServer( | ||
"latest_indicator_update", | ||
metrics_clean | ||
) | ||
|
||
# Latest development update | ||
LatestDevUpdateServer( | ||
"latest_dev_update", | ||
development_update_log | ||
) | ||
|
||
# Useful links | ||
UsefulLinksServer( | ||
"useful_links", | ||
useful_links | ||
) | ||
} | ||
|
||
# Launch the Shiny app | ||
shinyApp(ui_dev, server_dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
source(here::here("global.R")) | ||
|
||
# Load functions | ||
list.files("R/", full.names = TRUE) |> | ||
(\(x) { | ||
x[grepl("fn_", x)] | ||
})() |> | ||
purrr::walk(source) | ||
|
||
# Load modules | ||
list.files("R/lait_modules/", full.names = TRUE) |> | ||
purrr::walk(source) | ||
|
||
# Load ui panels | ||
list.files("R/ui_panels/", full.names = TRUE) |> | ||
purrr::walk(source) | ||
|
||
ui_dev <- function(input, output, session) { | ||
bslib::page_fillable( | ||
|
||
# Set application metadata ------------------------------------------------ | ||
tags$head(HTML("<title>Local Authority Interactive Tool (LAIT)</title>")), | ||
tags$head(tags$link(rel = "shortcut icon", href = here::here("www/dfefavicon.png"))), | ||
tags$head(includeHTML(here::here("google-analytics.html"))), | ||
shinytitle::use_shiny_title(), | ||
tags$html(lang = "en"), | ||
# Add meta description for search engines | ||
metathis::meta() |> | ||
metathis::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 | ||
), | ||
|
||
# Styling with CSS | ||
shiny::includeCSS(here::here("www/dfe_shiny_gov_style.css")), | ||
|
||
# Load javascript dependencies -------------------------------------------- | ||
shinyWidgets::useShinydashboard(), | ||
shinyjs::useShinyjs(), | ||
tags$head(htmltools::includeScript(here::here("www/custom_js.js"))), | ||
reactable.extras::reactable_extras_dependency(), | ||
shinyToastify::useShinyToastify(), | ||
|
||
# Cookies ----------------------------------------------------------------- | ||
# Setting up cookie consent based on a cookie recording the consent: | ||
# https://book.javascript-for-r.com/shiny-cookies.html | ||
dfeshiny::dfe_cookies_script(), | ||
dfeshiny::cookies_banner_ui( | ||
"cookie-banner", | ||
"Local Authority Interactive Tool (LAIT)" | ||
), | ||
|
||
# Header ------------------------------------------------------------------ | ||
shinyGovstyle::header( | ||
main_text = "", | ||
main_link = "https://www.gov.uk/government/organisations/department-for-education", | ||
secondary_text = "Local Authority Interactive Tool (LAIT)", | ||
logo = "www/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: ", | ||
"<a href=", site_primary, " id='link_site_1'>Site 1</a> and ", | ||
"<a href=", site_overflow, " id='link_site_2'>Site 2</a>." | ||
) | ||
), | ||
|
||
# Start of app ============================================================ | ||
|
||
# Nav panels -------------------------------------------------------------- | ||
bslib::navset_pill_list( | ||
"", | ||
id = "navsetpillslist", | ||
widths = c(2, 10), | ||
well = FALSE, | ||
|
||
# ======================================================================= | ||
# User guide | ||
# ======================================================================= | ||
user_guide_panel() | ||
) | ||
) | ||
} | ||
|
||
|
||
# Define the `server` function | ||
server_dev <- function(input, output, session) { | ||
# Add server logic here as needed | ||
} | ||
|
||
# Launch the Shiny app | ||
shinyApp(ui_dev, server_dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.