diff --git a/.hooks/pre-commit.R b/.hooks/pre-commit.R index 3529ca9..af57148 100644 --- a/.hooks/pre-commit.R +++ b/.hooks/pre-commit.R @@ -1,5 +1,5 @@ #!/usr/bin/env Rscript -cat("Running commit hooks...",fill=TRUE) +cat("Running commit hooks...", fill = TRUE) shhh <- suppressPackageStartupMessages # It's a library, so shhh! shhh(library(dplyr)) shhh(library(xfun)) @@ -16,12 +16,12 @@ cat("Contents of the .gitignore file:") print(ign_files) # Run a pass through the .gitignore files and look for any issues -if(ncol(ign_files)>1){ +if (ncol(ign_files) > 1) { cat("ERROR: It looks like you've got commas in the .gitignore. Please correct the .gitignore file and try again.") error_flag <- TRUE } else { - for(i in 1:nrow(ign_files)){ - if(grepl(' ',ign_files$filename[i])){ + for (i in 1:nrow(ign_files)) { + if (grepl(" ", ign_files$filename[i])) { cat("ERROR: It looks like you've got spaces in filenames in the .gitignore. Please rename your files if they contain spaces and update the .gitignore file accordingly.") error_flag <- TRUE } @@ -41,25 +41,24 @@ for (file in current_files$files) { } else { file_status <- (log_files %>% filter(filename == file))$status if (!file_status %in% c("published", "Published", "reference", "Reference", "dummy", "Dummy")) { - if (!file %in% ign_files$filename & !grepl("unpublished",file)) { + if (!file %in% ign_files$filename & !grepl("unpublished", file)) { cat("Error:", file, "is not logged as published or reference data in datafiles_log.csv and is not found in .gitignore.\n\n") cat("If the file contains published or reference data then update its entry in datafiles_log.csv.\n\n") cat("If the file contains unpublished data then add it to the .gitignore file.\n\n") error_flag <- TRUE - } - else { - cat(file,"is recorded in the logfile as unpublished data and in .gitignore and so will not be included as part of the commit.\n\n") + } else { + cat(file, "is recorded in the logfile as unpublished data and in .gitignore and so will not be included as part of the commit.\n\n") } } } } -if(grepl('G-Z967JJVQQX', htmltools::includeHTML(("google-analytics.html"))) & - !(toupper(Sys.getenv("USERNAME")) %in% c("CFOSTER4", "CRACE", "LSELBY","RBIELBY", "JMACHIN"))){ - cat("Cleaning out the template's Google Analytics tag.",fill=TRUE) +if (grepl("G-Z967JJVQQX", htmltools::includeHTML(("google-analytics.html"))) & + !(toupper(Sys.getenv("USERNAME")) %in% c("CFOSTER4", "CRACE", "LSELBY", "RBIELBY", "JMACHIN"))) { + cat("Cleaning out the template's Google Analytics tag.", fill = TRUE) gsub_file("google-analytics.html", pattern = "G-Z967JJVQQX", replacement = "G-XXXXXXXXXX") gsub_file("ui.R", pattern = "Z967JJVQQX", replacement = "XXXXXXXXXX") - system2(command = "git", args=c("add","google-analytics.html")) + system2(command = "git", args = c("add", "google-analytics.html")) } if (error_flag) { @@ -68,7 +67,7 @@ if (error_flag) { } tidy_output <- dfeshiny::tidy_code() -if(any(tidy_output)){ +if (any(tidy_output)) { error_flag <- TRUE } @@ -81,7 +80,9 @@ if (error_flag) { cat("\n") cat("\n2. Rebuilding manifest.json...", fill = TRUE) -if (system.file(package = "git2r") == "") {renv::install("git2r")} +if (system.file(package = "git2r") == "") { + renv::install("git2r") +} shhh(library(git2r)) if (system.file(package = "rsconnect") != "" & system.file(package = "git2r") != "") { if (!any(grepl("manifest.json", git2r::status()))) { diff --git a/R/data_sources.R b/R/data_sources.R index 7496bbc..2e31443 100644 --- a/R/data_sources.R +++ b/R/data_sources.R @@ -1,24 +1,23 @@ data_sources_tab <- function() { tabPanel( value = "data_sources", - "Data Sources", + "Data sources", gov_main_layout( br(), gov_row( h2("Data sources"), p("Most data included in the dashboard is children’s social care statistics published by DfE and available on", a(href = "https://explore-education-statistics.service.gov.uk/", "Explore Education Statistics.", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), " The publications include:"), tags$ul( - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions", "Children looked after in England including adoptions (last updated: 25 April 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/characteristics-of-children-in-need", "Children in need (last updated: 26 October 2023) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://fingertips.phe.org.uk/profile/child-health-profiles/data#page/3/gid/1938133230/ati/502/iid/90284/age/26/sex/4/cat/-1/ctp/-1/yrr/1/cid/4/tbm/1/page-options/car-do-0", "Public health data explorer (last updated: 08 May 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-s-social-work-workforce", "Children's social work workforce (last updated: 29 February 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.ons.gov.uk/datasets/TS021/editions/2021/versions/3", "ONS - Census, Ethnic groups (last updated: 28 March 2023) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland", "Estimates of the population for the UK, England, Wales, Scotland, and Northern Ireland (last updated: 26 March 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.gov.uk/government/statistics/childrens-social-care-data-in-england-2023", "Children’s social care data in England 2023 (last updated: 8 September 2023) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.gov.uk/government/statistics/local-authority-revenue-expenditure-and-financing-england-2022-to-2023-individual-local-authority-data-outturn", "Local authority revenue expenditure and financing England: 2022 to 2023 (last updated: 14 February 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://assets.publishing.service.gov.uk/media/606458acd3bf7f0c8d06b7e2/Childrens_services_statistical_neighbour_benchmarking_tool_-_LGR_Version__April_2021_.xlsx", "Children's services statistical neighbour benchmarking tool (last updated: April 2021) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/outcomes-for-children-in-need-including-children-looked-after-by-local-authorities-in-england", "Outcomes for Children in Need including Children Looked After (last updated 18 April 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://assets.publishing.service.gov.uk/media/650c373752e73c000d942609/Childrens_social_care_in_England_2023_underlying_data.ods", "Ofsted Leadership ratings (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")) + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions", "Children looked after in England including adoptions (last updated: 25 April 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/characteristics-of-children-in-need", "Children in need (last updated: 26 October 2023) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://fingertips.phe.org.uk/profile/child-health-profiles/data#page/3/gid/1938133230/ati/502/iid/90284/age/26/sex/4/cat/-1/ctp/-1/yrr/1/cid/4/tbm/1/page-options/car-do-0", "Public health data explorer (last updated: 08 May 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-s-social-work-workforce", "Children's social work workforce (last updated: 29 February 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.ons.gov.uk/datasets/TS021/editions/2021/versions/3", "ONS - Census, Ethnic groups (last updated: 28 March 2023) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland", "Estimates of the population for the UK, England, Wales, Scotland, and Northern Ireland (last updated: 26 March 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.gov.uk/government/statistics/childrens-social-care-data-in-england-2023", "Children’s social care data in England 2023 (last updated: 8 September 2023) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.gov.uk/government/statistics/local-authority-revenue-expenditure-and-financing-england-2022-to-2023-individual-local-authority-data-outturn", "Local authority revenue expenditure and financing England: 2022 to 2023 (last updated: 14 February 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://assets.publishing.service.gov.uk/media/606458acd3bf7f0c8d06b7e2/Childrens_services_statistical_neighbour_benchmarking_tool_-_LGR_Version__April_2021_.xlsx", "Children's services statistical neighbour benchmarking tool (last updated: April 2021) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/outcomes-for-children-in-need-including-children-looked-after-by-local-authorities-in-england", "Outcomes for children in need including children looked after (last updated 18 April 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")) ) ) ) diff --git a/R/enabler1_page.R b/R/enabler1_page.R index 417de38..f06a8d6 100644 --- a/R/enabler1_page.R +++ b/R/enabler1_page.R @@ -1,7 +1,7 @@ enabler1_tab <- function() { tabPanel( value = "enabler1_page", - "Multi-Agency", + "Multi-agency", gov_main_layout( gov_row( column( diff --git a/R/enabler2_page.R b/R/enabler2_page.R index 9be12ea..cdc8cc7 100644 --- a/R/enabler2_page.R +++ b/R/enabler2_page.R @@ -62,22 +62,21 @@ enabler2_tab <- function() { column( width = 4, value_box( - title = "Share of total spend on Children's services", + title = "Share of total local authority spend on children's services", value = htmlOutput("total_spending_txt") ) ), column( width = 4, value_box( - title = "Average per child spend", + title = "Average per capita (of all children in a local authority) spend on children’s services", value = htmlOutput("avg_spend_per_child") ) ), column( width = 4, value_box( - title = "Share of total spend on Children's services - minus CLA", + title = "Share of children’s services spend not on CLA", value = htmlOutput("spend_minus_cla_txt") ) ), @@ -89,20 +88,20 @@ enabler2_tab <- function() { ), accordion( accordion_panel( - "Share of local authority total spend on Children’s Services, and per child spend", + "Share of local authority total spend on children’s services, and per child spend", gov_row( - h2("Share of local authority total spend on Children’s Services, and per child spend"), - p("This metric provides contextual information on the resource prioritisation within each Local Authority."), + h2("Share of local authority total spend on children’s services, and per child spend"), + p("This metric provides contextual information on the resource prioritisation within each local authority."), # extra dropdown for choice to view per child spend or share of spending div( class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", - p("This domain contains two levels of data: Share of total spend on children's services and spend per child on children's services"), + p("This domain contains two levels of data: Share of total LA spend on children's services and average per capita (of all children in a local authority) spend on children's services"), p("Use the dropdown below to select which level of spending data you would like to see in the charts below:"), selectizeInput( inputId = "spending_choice", label = "Select a spending level:", - choices = c("Share of total spend on children's services", "Spend per child on children's services"), + choices = c("Share of total local authority spend on children's services", "Spend per child on children's services"), selected = NULL, multiple = FALSE, options = NULL, @@ -129,8 +128,8 @@ enabler2_tab <- function() { help_text = ( tags$ul( tags$li("Share of spend is calculated by taking total children’s services expenditure divided by total local authority expenditure"), - tags$li("Average per child spend is calculated based on", a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/populationestimatesforenglandandwales/mid2022#:~:text=We%20estimate%20the%20population%20of,mid%2D1962%20(1.0%25)", "ONS published mid-2022 population estimates", target = "_blank"), "for children aged 0 to 17 years and total children’s services expenditure."), - tags$li("Average per child spend has been rounded to the nearest whole number."), + tags$li("Average per capita (of all children in a local authority) spend on children’s services is calculated based on", a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/populationestimatesforenglandandwales/mid2022#:~:text=We%20estimate%20the%20population%20of,mid%2D1962%20(1.0%25)", "ONS published mid-2022 population estimates", target = "_blank"), "for children aged 0 to 17 years and total children’s services expenditure."), + tags$li("Average per capita (of all children in a local authority) spend on children’s services has been rounded to the nearest whole number."), tags$li("Spending data is based on the RO3 and RSX data files from the", a(href = "https://www.gov.uk/government/statistics/local-authority-revenue-expenditure-and-financing-england-2022-to-2023-individual-local-authority-data-outturn", "Local authority revenue expenditure and financing England: 2022 to 2023 individual local authority data – outturn", target = "_blank")), tags$br(), p( @@ -156,9 +155,10 @@ enabler2_tab <- function() { ), ), accordion_panel( - "Share of Children and Young People Services spend minus spend on CLA", + "Share of children’s services spend not on CLA", gov_row( - h2("Share of Children and Young People Services spend minus spend on CLA by region"), + h2("Share of children’s services spend not on CLA by region"), + p("Prioritising funding and resources that help families early helps children and young people thrive. This metric looks at the resource prioritisation between early and later statutory intervention."), plotlyOutput("plot_spend_excl_cla_region"), br(), details( @@ -186,7 +186,7 @@ enabler2_tab <- function() { ) ), gov_row( - h2("Share of Children and Young People Services spend minus spend on CLA by local authority"), + h2("Share of children’s services spend not on CLA by local authority"), radioGroupButtons( "spending2_stats_toggle", label = NULL, @@ -275,6 +275,9 @@ enabler2_tab <- function() { ) ) ), + fluidRow( + p("The culture of leadership drives effective and efficient practice. Ofsted rating for leadership provides a summary judgement of the assessed culture and practice of leadership within each authority."), + ) ), accordion( accordion_panel( diff --git a/R/enabler3_page.R b/R/enabler3_page.R index 8063b68..3dfa091 100644 --- a/R/enabler3_page.R +++ b/R/enabler3_page.R @@ -39,7 +39,7 @@ enabler3_tab <- function() { width = 5, checkbox_Input( inputId = "national_comparison_checkbox_e3", - cb_labels = "Compare with National", + cb_labels = "Compare with national", checkboxIds = "Yes_national_e3", label = "", hint_label = NULL, @@ -53,7 +53,7 @@ enabler3_tab <- function() { width = 7, checkbox_Input( inputId = "region_comparison_checkbox_e3", - cb_labels = "Compare with Region", + cb_labels = "Compare with region", checkboxIds = "Yes_region_e3", label = "", hint_label = NULL, @@ -91,7 +91,7 @@ enabler3_tab <- function() { id = "enabler3_panels", type = "tabs", tabPanel( - "Workforce Stability", + "Workforce stability", fluidRow( br(), ), @@ -122,12 +122,12 @@ enabler3_tab <- function() { accordion( # Social Worker Turnover -------------- accordion_panel( - "Social Worker Turnover", + "Social worker turnover", gov_row( h2("Social worker turnover"), p("Prioritising a stable workforce allows children, young people and families to maintain consistent relationships with practitioners."), insert_text(inputId = "social_work_turnover_definition", text = paste( - "The ", "", "turnover rate", "", " is calculated as (the number of) FTE children and family social worker leavers in the year to 30 September divided by FTE children and family social workers in + "The ", "", "turnover rate", "", " is calculated as (the number of) FTE (full-time equivalent) children and family social worker leavers in the year to 30 September divided by FTE children and family social workers in post at 30 September. The turnover rate is a measure of churn in the workforce (although it doesn’t capture the movement of social workers to different children and family social work positions within the same local authority)." )), plotlyOutput("plot_s_w_turnover"), @@ -211,7 +211,7 @@ enabler3_tab <- function() { ), # Agency worker rates --------------------------- accordion_panel( - "Agency Rates", + "Agency rates", gov_row( h2("Agency rates"), p("Prioritising a stable and permanent workforce allows children, young people and families to maintain consistent relationships with practitioners. @@ -298,7 +298,7 @@ enabler3_tab <- function() { ), # Vacancy rates ------------------ accordion_panel( - "Vacancy Rates", + "Vacancy rates", gov_row( h2("Vacancy rates"), p("A workforce strategy should develop and maintain an effective workforce. With a well-supported workforce vacancy rates should remain low."), @@ -413,7 +413,7 @@ enabler3_tab <- function() { retention and allows practitioners to deliver impactful services."), insert_text(inputId = "caseload_definition", text = paste( "A", "", " case ", "", " is defined as any person allocated to a named social worker, where the work involves child and family social work. Cases may be held by social workers regardless of their role in the organisation and not just those specifically in a ‘case holder’ role.", "
", "
", - "", "Average caseload", "", "at 30 September is calculated as the total number of cases held by FTE social workers, including agency workers, in post divided by the number of FTE social workers, including agency workers, in post that held one or more cases.", "

", + "", "Average caseload", "", "at 30 September is calculated as the total number of cases held by FTE (Full-time Equivalent) social workers, including agency workers, in post divided by the number of FTE social workers, including agency workers, in post that held one or more cases.", "

", "The number of cases held doesn’t account for the complexity of the cases held and this should also be taken into consideration when interpreting the caseload figures." )), br(), diff --git a/R/intro_panel.R b/R/intro_panel.R index 759e3a9..1f13812 100644 --- a/R/intro_panel.R +++ b/R/intro_panel.R @@ -10,7 +10,7 @@ introductionPanel <- function() { heading_text("Introduction", size = "l"), p( "This dashboard displays data indicators to help both local and central government understand progress towards the outcomes and enablers set out in the", - a(href = "https://www.gov.uk/government/publications/childrens-social-care-national-framework", "Children’s Social Care National Framework.", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), + a(href = "https://www.gov.uk/government/publications/childrens-social-care-national-framework", "Children’s Social Care National Framework (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), "You can view the progress for England nationally or choose a specific region or local authority in England to view its progress.", actionLink("go_to_user_guide", "Read the user guide"), "for further information on how to do this after reading this introduction page." ), @@ -24,11 +24,11 @@ introductionPanel <- function() { h2("Outcomes"), p("The outcomes included in the dashboard are what children’s social care should achieve for the children, young people and families they support. They reflect the core purpose of children’s social care. The outcomes included are:"), - tags$ol( - tags$li("Children, young people and families stay together and get the help they need"), - tags$li("Children and young people are supported by their family network"), - tags$li("Children and young people are safe in and outside of their home"), - tags$li("Children in care and care leavers have stable, loving homes"), + tags$ul( + tags$li("1. children, young people and families stay together and get the help they need"), + tags$li("2. children and young people are supported by their family network"), + tags$li("3. children and young people are safe in and outside of their home"), + tags$li("4. children in care and care leavers have stable, loving homes"), style = "font-family: GDS Transport, arial, sans-serif; font-size :17px;" ), ), @@ -38,9 +38,9 @@ introductionPanel <- function() { p("The enablers included in the dashboard refer to aspects of the children’s social care system that facilitate effective support for children, young people and families. The enablers are foundational to good practice. The enablers included are:"), tags$ul( - tags$li("Multi-agency working is prioritised and effective"), - tags$li("Leaders drive conditions for effective practice"), - tags$li("The workforce is equipped and effective"), + tags$li("multi-agency working is prioritised and effective"), + tags$li("leaders drive conditions for effective practice"), + tags$li("the workforce is equipped and effective"), style = "font-family: GDS Transport, arial, sans-serif; font-size :17px;" ), ) diff --git a/R/outcome1_page.R b/R/outcome1_page.R index 2abb463..5ea8ae5 100644 --- a/R/outcome1_page.R +++ b/R/outcome1_page.R @@ -1,7 +1,7 @@ outcome1_tab <- function() { tabPanel( value = "outcome1_page", - "Family Support", + "Family support", gov_main_layout( gov_row( column( @@ -41,7 +41,7 @@ outcome1_tab <- function() { width = 5, checkbox_Input( inputId = "national_comparison_checkbox_o1", - cb_labels = "Compare with National", + cb_labels = "Compare with national", checkboxIds = "Yes_national_o1", label = "", hint_label = NULL, @@ -55,7 +55,7 @@ outcome1_tab <- function() { width = 7, checkbox_Input( inputId = "region_comparison_checkbox_o1", - cb_labels = "Compare with Region", + cb_labels = "Compare with region", checkboxIds = "Yes_region_o1", label = "", hint_label = NULL, @@ -94,7 +94,7 @@ outcome1_tab <- function() { column( width = 6, value_box( - title = "Children In Need rate per 10,000 children", + title = "Children in need rate per 10,000 children", value = htmlOutput("cin_rate_headline_txt") ) ), @@ -109,14 +109,14 @@ outcome1_tab <- function() { accordion( ### CIN ------------------ accordion_panel( - "Rate of Children in Need (CIN)", + "Rate of children in need (CIN)", gov_row( - h2("Rate of Children in Need (CIN)"), + h2("Rate of children in need (CIN)"), p("Helping children to stay together with their families means ensuring the right support is in place at earlier stages of intervention. - Looking at the flow of children who become a CIN will show children being supported by the wider system. Combined with family stability indicators, this will reflect a broad view of flow into and through the children’s social care system."), + Looking at the flow of children who become CIN will show children being supported by the wider system. Combined with family stability indicators, this will reflect a broad view of flow into and through the children’s social care system."), insert_text(inputId = "CIN_definition", text = paste( - "", "Children In Need (CIN) rate", "
", - "The Children In Need rate is calculated as the number of Children In Need at 31 March, per 10,000 children in the population." + "", "Rate of children in need (CIN)", "
", + "The rate of children in need is calculated as the number of children in need at 31 March, per 10,000 children in the population." )), plotlyOutput("plot_cin_rate"), br(), @@ -152,7 +152,7 @@ outcome1_tab <- function() { ), # cin by region gov_row( - h2("Children In Need rates by region"), + h2("CIN rates by region"), p("This is a static chart and will not react to geographical level and location selected in the filters at the top."), br(), plotlyOutput("plot_cin_rate_reg"), @@ -362,9 +362,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -398,9 +398,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -457,9 +457,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -497,9 +497,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -552,9 +552,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -587,9 +587,9 @@ outcome1_tab <- function() { tags$li("Historical data may differ from older publications which is mainly due to amendments made by local authorities after the previous publication. However, users looking for a longer time series may wish to view the equivalent data in earlier releases of the publication."), tags$br(), p( - "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "Children looked after data guidance.", target = "_blank"), + "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions/data-guidance", "children looked after data guidance.", target = "_blank"), tags$br(), - "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "Children looked after methodology.", target = "_blank") + "For more information on the methodology, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/methodology/children-looked-after-in-england-including-adoptions", "children looked after methodology.", target = "_blank") ) ) ) @@ -669,7 +669,7 @@ outcome1_tab <- function() { div( class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", - p("This domain contains breakdowns of data for the following social care groups: Children In Need, excluding children on a child protection plan and children looked after (CINO), Children on a Child Protection Plan, excluding children looked after (CPPO), Children Looked After (CLA) for 12 months."), + p("This domain contains breakdowns of data for the following social care groups: children in need, excluding children on a child protection plan and children looked after (CINO), children on a child protection plan, excluding children looked after (CPPO), children looked after (CLA) for 12 months."), p("It also breakdowns the data by school type: total, primary, secondary (the headline boxes above show data for 'total' school type)."), p("Use the dropdowns to select which social care group and school type you would like to see in the below accordions:"), selectizeInput( @@ -693,9 +693,9 @@ outcome1_tab <- function() { label = "Social care group definitions:", help_text = ( tags$ul( - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), - tags$li("CLA 12 months refers to Children Looked After for 12 months (excludes children who are in respite care in their most recent episode during the reporting year)."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), + tags$li("CLA 12 months refers to children looked after for 12 months (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$br(), p( "For more information on the data and definitions, refer to the", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/outcomes-for-children-in-need-including-children-looked-after-by-local-authorities-in-england/data-guidance", "Outcomes for children in need, including children looked after data guidance.", target = "_blank"), @@ -727,7 +727,7 @@ outcome1_tab <- function() { accordion_panel( "School attendance", gov_row( - h2("School attendance of Children In Need and Children Looked After"), + h2("School attendance of children in need and children looked after"), p("Attending an education setting is a key component of long term development and wellbeing for children and young people, which affects their outcomes. Barriers to attendance can be prevalent amongst children in need, and children’s social care has an important role in helping to overcome @@ -763,9 +763,9 @@ outcome1_tab <- function() { Due to the disruption during the 2020/21 and 2021/22 academic years, caution should be taken when comparing data to previous years. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/pupil-absence-in-schools-in-england", "Pupil absence in schools in England.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), - tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), + tags$li("CLA refers to children looked after (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), p( @@ -813,9 +813,9 @@ outcome1_tab <- function() { Due to the disruption during the 2020/21 and 2021/22 academic years, caution should be taken when comparing data to previous years. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/pupil-absence-in-schools-in-england", "Pupil absence in schools in England.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), - tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), + tags$li("CLA refers to children looked after (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), p( @@ -886,8 +886,8 @@ outcome1_tab <- function() { Due to the disruption during the 2020/21 and 2021/22 academic years, caution should be taken when comparing data to previous years. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/pupil-absence-in-schools-in-england", "Pupil absence in schools in England.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), @@ -935,8 +935,8 @@ outcome1_tab <- function() { Due to the disruption during the 2020/21 and 2021/22 academic years, caution should be taken when comparing data to previous years. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/pupil-absence-in-schools-in-england", "Pupil absence in schools in England.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), @@ -1031,7 +1031,7 @@ outcome1_tab <- function() { div( class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", - p("This domain contains breakdowns of data for the following social care groups: Children In Need, excluding children on a child protection plan and children looked after (CINO), Children on a Child Protection Plan, excluding children looked after (CPPO), Children Looked After (CLA) for 12 months."), + p("This domain contains breakdowns of data for the following social care groups: children in need, excluding children on a child protection plan and children looked after (CINO), children on a child protection plan, excluding children looked after (CPPO), children looked after (CLA) for 12 months."), p("Use this dropdown to select which social care group you would like to see in the below accordions:"), selectizeInput( inputId = "attainment_extra_breakdown", @@ -1046,8 +1046,8 @@ outcome1_tab <- function() { label = "Social care group definitions:", help_text = ( tags$ul( - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$br(), p( @@ -1061,14 +1061,11 @@ outcome1_tab <- function() { ### ks2 attainment ----- accordion( accordion_panel( - "Key Stage 2 (KS2)", + "Key stage 2 (KS2)", gov_row( - h2("Key Stage 2 attainment"), - p("Educational attainment is a key component of long-term development and wellbeing for children and young people, which affects their outcomes. - Children should be supported to access and make progress in education to support their development and life chances. - Virtual School Heads have a statutory duty to promote the educational attainment of all children in their care. This - includes ensuring suitable and timely educational provision and managing pupil premium Plus funding aligned to - objectives in the child’s personal education Plan."), + h2("Key stage 2 attainment"), + p("Educational attainment is a key component of long-term development and wellbeing for children and young people, which affects their outcomes. Children should be supported to access and make progress in education to support their development and life chances. Virtual school heads have a statutory duty to promote the educational attainment of all children in their care. + This includes ensuring suitable and timely educational provision and managing pupil premium plus funding aligned to objectives in the child’s personal education plan"), insert_text(inputId = "ks2_definition", text = paste( "", "Expected standard for year 6 pupils (mostly aged 11)", "
", htmlOutput("outcome1_choice_social_care_group_text_2") @@ -1095,8 +1092,8 @@ outcome1_tab <- function() { "Writing teacher assessment and reading, writing and maths (combined) measures from 2018 onwards are not directly comparable to previous years due to changes in the writing teacher assessment frameworks. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/key-stage-2-attainment", "Key stage 2 attainment.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), @@ -1139,8 +1136,8 @@ outcome1_tab <- function() { "Writing teacher assessment and reading, writing and maths (combined) measures from 2018 onwards are not directly comparable to previous years due to changes in the writing teacher assessment frameworks. For more detailed information on this see ", a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/key-stage-2-attainment", "Key stage 2 attainment.", target = "_blank"), ), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), @@ -1175,14 +1172,11 @@ outcome1_tab <- function() { ), ### KS4 attainment --------- accordion_panel( - "Key Stage 4 (KS4)", + "Key stage 4 (KS4)", gov_row( - h2("Key Stage 4 attainment"), - p("Educational attainment is a key component of long-term development and wellbeing for children and young people, which affects their outcomes. - Children should be supported to access and make progress in education to support their development and life chances. - Virtual School Heads have a statutory duty to promote the educational attainment of all children in their care. This - includes ensuring suitable and timely educational provision and managing pupil premium Plus funding aligned to - objectives in the child’s personal education Plan."), + h2("Key stage 4 attainment"), + p("Educational attainment is a key component of long-term development and wellbeing for children and young people, which affects their outcomes. Children should be supported to access and make progress in education to support their development and life chances. + Virtual school heads have a statutory duty to promote the educational attainment of all children in their care. This includes ensuring suitable and timely educational provision and managing pupil premium plus funding aligned to objectives in the child’s personal education plan."), insert_text(inputId = "ks4_definition", text = paste( "", "Attainment 8 for pupils finishing GCSEs (mostly aged 16)", "
", htmlOutput("outcome1_choice_social_care_group_text_3") @@ -1212,8 +1206,8 @@ outcome1_tab <- function() { ), tags$li("In 2022/23 there was a return to pre-pandemic standards for GCSEs, with protection built into the grading process to recognise the disruption that students have faced. Therefore, the more meaningful comparison is with 2019, the last year that summer exams were taken before the pandemic, as 2023 saw a return to pre-pandemic grading, with some protections. In 2022 outcomes broadly reflected a mid-point between 2019 and 2021, to take account of the impact of the pandemic and in line with Ofqual’s approach to grading in 2022. It is expected that performance in 2023 will generally be lower than in 2022. Users need to exercise extreme caution when considering comparisons over time, as they may not reflect changes in pupil performance alone."), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), @@ -1259,8 +1253,8 @@ outcome1_tab <- function() { ), tags$li("In 2022/23 there was a return to pre-pandemic standards for GCSEs, with protection built into the grading process to recognise the disruption that students have faced. Therefore, the more meaningful comparison is with 2019, the last year that summer exams were taken before the pandemic, as 2023 saw a return to pre-pandemic grading, with some protections. In 2022 outcomes broadly reflected a mid-point between 2019 and 2021, to take account of the impact of the pandemic and in line with Ofqual’s approach to grading in 2022. It is expected that performance in 2023 will generally be lower than in 2022. Users need to exercise extreme caution when considering comparisons over time, as they may not reflect changes in pupil performance alone."), - tags$li("CINO refers to Children In Need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), - tags$li("CPPO refers to children on a Child Protection Plan, excluding children looked after."), + tags$li("CINO refers to children in need, excluding children on a child protection plan and children looked after. This includes children on child in need plans as well as other types of plan or arrangements. It also includes children awaiting a referral to be considered, an assessment to start or, for an assessment which has started, for the assessment to be completed."), + tags$li("CPPO refers to children on a child protection plan, excluding children looked after."), tags$li("CLA refers to Children Looked After (excludes children who are in respite care in their most recent episode during the reporting year)."), tags$li("Children in need data for the years ending 31 March 2021 and 2022 is not available for Hackney local authority, therefore 2020 data for Hackney has been included in 2021 and 2022 national totals, and regional totals for inner London and London. Refer to the methodology section for more information."), tags$br(), diff --git a/R/outcome2_page.R b/R/outcome2_page.R index 2c47b4d..b55b60c 100644 --- a/R/outcome2_page.R +++ b/R/outcome2_page.R @@ -1,7 +1,7 @@ outcome2_tab <- function() { tabPanel( value = "outcome2_page", - "Family Network", + "Family network", gov_main_layout( gov_row( column( @@ -44,7 +44,7 @@ outcome2_tab <- function() { width = 5, checkbox_Input( inputId = "national_comparison_checkbox_o2", - cb_labels = "Compare with National", + cb_labels = "Compare with national", checkboxIds = "Yes_national_o2", label = "", hint_label = NULL, @@ -58,7 +58,7 @@ outcome2_tab <- function() { width = 7, checkbox_Input( inputId = "region_comparison_checkbox_o2", - cb_labels = "Compare with Region", + cb_labels = "Compare with region", checkboxIds = "Yes_region_o2", label = "", hint_label = NULL, @@ -95,14 +95,14 @@ outcome2_tab <- function() { column( width = 6, value_box( - title = "Percentage of children who cease being looked after due to Special Guardianship Order (SGO)", + title = "Percentage of children who cease being looked after due to special guardianship order (SGO)", value = htmlOutput("SGO_headline_txt") ) ), column( width = 6, value_box( - title = "Percentage of children who cease being looked after due to Residence order or Child Arrangement Order (CAO)", + title = "Percentage of children who cease being looked after due to residence order or child arrangements order (CAO)", value = htmlOutput("CAO_headline_txt") ) ), @@ -113,12 +113,12 @@ outcome2_tab <- function() { accordion( ## SGO ------ accordion_panel( - "Percentage of children who cease being looked after due to Special Guardianship Order (SGO)", + "Percentage of children who cease being looked after due to special guardianship order (SGO)", gov_row( - h2("Special Guardianship Order (SGO)"), - p("Children ceasing to be looked after during the year due to the reason of Special Guardianship Order."), + h2("Special guardianship order (SGO)"), + p("Children ceasing to be looked after during the year due to the reason of special guardianship order."), insert_text(inputId = "SGO_def", text = paste( - tags$b("Special guardianship order"), " - A Special Guardianship Order is a private law order (under section14A Children Act 1989) appointing one or more individuals to be a child's 'special guardian'." + tags$b("Special guardianship order"), " - A special guardianship order is a private law order (under section14A Children Act 1989) appointing one or more individuals to be a child's 'special guardian'." )), br(), plotlyOutput("SGO_time_series"), @@ -151,7 +151,7 @@ outcome2_tab <- function() { ) ), gov_row( - h2("Special Guardianship Order (SGO) by region"), + h2("Special guardianship order (SGO) by region"), p("This is a static chart and will not react to geographical level and location selected in the filters at the top. The chart represents data from 2023."), @@ -186,7 +186,7 @@ outcome2_tab <- function() { ) ), gov_row( - h2("Special Guardianship Order (SGO) by local authority"), + h2("Special guardianship order (SGO) by local authority"), p(sprintf("The charts below represent data from %s.", max(ceased_cla_data$time_period))), radioGroupButtons( "sgo_stats_toggle", @@ -200,12 +200,12 @@ outcome2_tab <- function() { ), ## CAO ---------------- accordion_panel( - "Percentage of children who cease being looked after due to Child Arrangement Order (CAO)", + "Percentage of children who cease being looked after due to residence order or child arrangements order (CAO)", gov_row( - h2("Residence order or Child Arrangement Order (CAO)"), - p("Children ceasing to be looked after during the year due to the reason of Child Arrangement Order."), + h2("Residence order or child arrangements order (CAO)"), + p("Children ceasing to be looked after during the year due to the reason of child arrangements order."), insert_text(inputId = "CAO_def", text = paste( - tags$b("Child Arrangements Order"), " - An order from court which details the arrangements for a child, including where and with whom the child will live, and who else they will spend time or have contact with. A Child Arrangements Order is usually used to determine arrangements between parents but can also be used to order that a child lives with, or otherwise has contact with, another person, such as a family member or friend." + tags$b("Child arrangements order"), " - An order from court which details the arrangements for a child, including where and with whom the child will live, and who else they will spend time or have contact with. A child arrangements order is usually used to determine arrangements between parents but can also be used to order that a child lives with, or otherwise has contact with, another person, such as a family member or friend." )), plotlyOutput("CAO_time_series"), br(), @@ -237,7 +237,7 @@ outcome2_tab <- function() { ) ), gov_row( - h2("Residence order or Child Arrangement Order (CAO) by region"), + h2("Residence order or child arrangements order (CAO) by region"), p("This is a static chart and will not react to geographical level and location selected in the filters at the top. The chart represents data from 2023."), @@ -272,7 +272,7 @@ outcome2_tab <- function() { ) ), gov_row( - h2("Residence order or Child Arrangement Order (CAO) by local authority"), + h2("Residence order or child arrangements order (CAO) by local authority"), p(sprintf("The charts below represent data from %s.", max(ceased_cla_data$time_period))), radioGroupButtons( "cao_stats_toggle", diff --git a/R/outcome3_page.R b/R/outcome3_page.R index e810917..9ac0bbb 100644 --- a/R/outcome3_page.R +++ b/R/outcome3_page.R @@ -41,7 +41,7 @@ outcome3_tab <- function() { width = 5, checkbox_Input( inputId = "national_comparison_checkbox_o3", - cb_labels = "Compare with National", + cb_labels = "Compare with national", checkboxIds = "Yes_national_o3", label = "", hint_label = NULL, @@ -55,7 +55,7 @@ outcome3_tab <- function() { width = 7, checkbox_Input( inputId = "region_comparison_checkbox_o3", - cb_labels = "Compare with Region", + cb_labels = "Compare with region", checkboxIds = "Yes_region_o3", label = "", hint_label = NULL, @@ -92,14 +92,14 @@ outcome3_tab <- function() { column( width = 4, value_box( - title = "Percentage of Child Protection Plans (CPP) starting during year, which were a second or subsequent plan", + title = "Percentage of child protection plans (CPP) starting during year, which were a second or subsequent plan", value = htmlOutput("cpp_in_year_txt") ) ), column( width = 4, value_box( - title = "Percentage of Child Protection Plans (CPP) longer than 2 years", + title = "Percentage of child protection plans (CPP) longer than 2 years", value = htmlOutput("cpp_duration_txt") ) ), @@ -120,10 +120,10 @@ outcome3_tab <- function() { ### Repeat CPP ------------------------ accordion( accordion_panel( - "Percentage of Child Protection Plans (CPP) starting during year, which were a second or subsequent plan", - h2("Percentage of Child Protection Plans (CPP) starting during year, which were a second or subsequent plan"), + "Percentage of child protection plans (CPP) starting during year, which were a second or subsequent plan", + h2("Percentage of child protection plans (CPP) starting during year, which were a second or subsequent plan"), insert_text(inputId = "CIN_CPP_definition", text = paste( - "", "Child Protection Plan (CPP)", "
", + "", "Child protection plan (CPP)", "
", "A child becomes the subject of a child protection plan if they are assessed as being at risk of harm, at an initial child protection conference." )), plotlyOutput("repeat_cpp_time_series"), @@ -155,7 +155,7 @@ outcome3_tab <- function() { ) ), gov_row( - h2("Repeat Child Protection Plan (CPP) by region"), + h2("Repeat child protection plan (CPP) by region"), p("This is a static chart and will not react to geographical level and location selected in the filters at the top."), br(), plotlyOutput("plot_cpp_repeat_reg"), @@ -188,7 +188,7 @@ outcome3_tab <- function() { ), ), gov_row( - h2("Repeat Child Protection Plan (CPP) by local authority"), + h2("Repeat child protection plan (CPP) by local authority"), p(sprintf("The charts below represent data from %s.", max(repeat_cpp$time_period))), radioGroupButtons( "CPP_stats_toggle", @@ -202,10 +202,10 @@ outcome3_tab <- function() { ), ### Repeat CPP 2+ --------------------------------------------------- accordion_panel( - "Percentage of Child Protection Plans (CPP) longer than 2 years", - h2("Percentage of Child Protection Plans (CPP) longer than 2 years"), + "Percentage of child protection plans (CPP) longer than 2 years", + h2("Percentage of child protection plans (CPP) longer than 2 years"), insert_text(inputId = "CIN_CPP__longdefinition", text = paste( - "", "Child Protection Plan (CPP)", "
", + "", "Child protection plan (CPP)", "
", "A child becomes the subject of a child protection plan if they are assessed as being at risk of harm, at an initial child protection conference." )), plotlyOutput("duration_cpp_time_series"), @@ -225,7 +225,7 @@ outcome3_tab <- function() { label = "Additional information:", help_text = ( tags$ul( - tags$li("The metric shown in the graph refers to the percentage of children who have been on a Child Protection Plan (CPP) for longer than 2 years."), + tags$li("The metric shown in the graph refers to the percentage of children who have been on a child protection plan (CPP) for longer than 2 years."), tags$li("Local authority data is not available for this metric as there are a large number of local authorities with suppressed data."), tags$br(), p( @@ -237,7 +237,7 @@ outcome3_tab <- function() { ) ), gov_row( - h2("Child Protection Plans (CPP) longer than 2 years, by region"), + h2("Child protection plans (CPP) longer than 2 years, by region"), p("This is a static chart and will not react to geographical level and location selected in the filters at the top."), br(), plotlyOutput("plot_cpp_duration_reg"), @@ -258,7 +258,7 @@ outcome3_tab <- function() { label = "Additional information:", help_text = ( tags$ul( - tags$li("The metric shown in the graph refers to the percentage of children who have been on a Child Protection Plan (CPP) for longer than 2 years."), + tags$li("The metric shown in the graph refers to the percentage of children who have been on a child protection plan (CPP) for longer than 2 years."), tags$li("Local authority data is not available for this metric as there are a large number of local authorities with suppressed data."), tags$br(), p( @@ -339,7 +339,8 @@ outcome3_tab <- function() { br() ), gov_row( - h2("Factors identified at the end of assessment in the year to 31 March 2023 related to child abuse or neglect."), + h2("Factors identified at the end of assessment in the year to 31 March 2023 related to child abuse or neglect"), + p("This metric looks at those children who are assessed as needing support for child abuse or neglect."), warning_text(inputId = "assessment_factors_def1", text = paste( "Factors identified at the end of assessment are additional factors that social workers record as being relevant in an episode of need. The majority of children have more than one factor recorded for each episode of need. @@ -383,7 +384,7 @@ outcome3_tab <- function() { div( class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", - p("This domain contains breakdowns of data for the following assessment factors: ", paste(unique(af_child_abuse_extra_filter %>% str_sort()), collapse = ", "), "."), + p("This domain contains breakdowns of data for the following assessment factors: ", paste0(paste(unique(af_child_abuse_extra_filter %>% str_sort()), collapse = ", "), ".")), p("Use the dropdown below to select which assessment factor you would like to see in the below accordions:"), selectizeInput( inputId = "assessment_factors_1", @@ -487,7 +488,8 @@ outcome3_tab <- function() { br(), ), gov_row( - h2("Factors identified at the end of assessment in the year to 31 March 2023 related to specific types of harms outside the home."), + h2("Factors identified at the end of assessment in the year to 31 March 2023 related to specific types of harms outside the home"), + p("This metric looks at those children who are assessed as needing support for harms outside the home."), warning_text( inputId = "assessment_factors_def2", text = paste( "Factors identified at the end of assessment are additional factors that social workers record as being relevant in an episode of need. @@ -530,7 +532,7 @@ outcome3_tab <- function() { div( class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", - p("This domain contains breakdowns of data for the following assessment factors: ", paste(unique(extra_familial_harm_af %>% str_sort()), collapse = ", "), "."), + p("This domain contains breakdowns of data for the following assessment factors: ", paste0(paste(unique(extra_familial_harm_af %>% str_sort()), collapse = ", "), ".")), p("Use the dropdown below to select which assessment factor you would like to see in the below accordions:"), selectizeInput( inputId = "assessment_factors_2", diff --git a/R/outcome4_page.R b/R/outcome4_page.R index 564f5d1..6d7ae89 100644 --- a/R/outcome4_page.R +++ b/R/outcome4_page.R @@ -1,7 +1,7 @@ outcome4_tab <- function() { tabPanel( value = "outcome4_page", - "Stable Homes", + "Stable homes", gov_main_layout( gov_row( column( @@ -43,7 +43,7 @@ outcome4_tab <- function() { width = 5, checkbox_Input( inputId = "national_comparison_checkbox_o4", - cb_labels = "Compare with National", + cb_labels = "Compare with national", checkboxIds = "Yes_national_o4", label = "", hint_label = NULL, @@ -57,7 +57,7 @@ outcome4_tab <- function() { width = 7, checkbox_Input( inputId = "region_comparison_checkbox_o4", - cb_labels = "Compare with Region", + cb_labels = "Compare with region", checkboxIds = "Yes_region_o4", label = "", hint_label = NULL, @@ -130,14 +130,13 @@ outcome4_tab <- function() { ) ), br(), - p("Care leavers should be supported to access education, employment and - training that supports them and allows them to achieve their aspirations and goals.") ), accordion( ## Placement changes during year ----------- accordion_panel( "Percentage of CLA with 3 or more placements during the year", h2("Percentage of CLA with 3 or more placements during the year"), + p("Those children who cannot remain living with families or family network should be provided with a stable home environment. Minimising changes to the number of times that children have to move home while in care is key to this ambition."), gov_row( plotlyOutput("placement_changes_ts_plot"), br(), @@ -214,6 +213,13 @@ outcome4_tab <- function() { "Distance of placements from home", gov_row( h2("Placements more than 20 miles from home"), + p("Children should be supported to remain in school placements and to retain contact with friends and family networks where this is in their best interests. As such, where possible, children should be supported to remain close to their home address."), + insert_text( + inputId = "distance_definition", + text = paste( + "Distance is the distance in miles between the child's home and placement. In some cases this is not known, for example UASC, or not recorded for confidentiality reasons, such as some children placed for adoption." + ) + ), plotlyOutput("placement_distance_ts_plot"), br(), details( @@ -289,6 +295,7 @@ outcome4_tab <- function() { accordion_panel( "Percentage of children living in foster, residential care, or secure children’s homes", h2("Percentage of children living in foster, residential care, or secure children’s homes"), + p("This indicator looks at the proportion of children living in different placement types. Where possible, the aim is to support children in care to live in foster care arrangements."), gov_row( # Box here to have an extra dropdown just for this section to split the percentage for each placement div( @@ -396,6 +403,7 @@ outcome4_tab <- function() { gov_row( div( h2("Average time between placement order and match for those children who are adopted"), + p("For those children for whom adoption has been assessed as the right option, ensuring that the child moves to an appropriate home as soon as possible will increase stability for the child."), class = "input_box", style = "min-height:100%; height = 100%; overflow-y: visible", insert_text( diff --git a/R/plotting.R b/R/plotting.R index 2465b4d..022fae5 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -3,7 +3,7 @@ # Time series repeat function ---- # This is a repeat use function for all of the time series plots in this dashboard. -plotly_time_series_custom_scale <- function(dataset, level, breakdown, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, percentage = FALSE) { +plotly_time_series_custom_scale <- function(dataset, level, breakdown, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, decimal_percentage = FALSE) { # Set the upper limit of the y-axis, then give it a bit extra on top of that so the max y-axis tick has a better chance of being near the top of the axis ylim_upper <- (ceiling(ylim_upper / 20) * 20) + (ylim_upper * 0.05) @@ -17,7 +17,7 @@ plotly_time_series_custom_scale <- function(dataset, level, breakdown, yvalue, y p <- ggplot(filtered_data, aes( x = `Time period`, y = !!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), color = `Location`, - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_sentence(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Location: ", `Location`, "
", @@ -101,7 +101,7 @@ plotly_time_series_custom_scale <- function(dataset, level, breakdown, yvalue, y } # By LA bar chart repeat function ---- -by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, yupperlim = NULL, add_rect = FALSE, percentage = FALSE) { +by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, yupperlim = NULL, add_rect = FALSE, decimal_percentage = FALSE) { if (selected_geo_lvl == "Local authority") { if (add_rect == "FALSE") { la_data <- dataset %>% @@ -185,7 +185,7 @@ by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_ if (add_rect == FALSE) { p <- ggplot(la_data, aes( x = Breakdown, y = !!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), fill = `Selection`, - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_sentence(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Local authority: ", Breakdown, "
", @@ -273,7 +273,7 @@ by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_ } # By Region bar chart repeat function ----- -by_region_bar_plot <- function(dataset, yvalue, yaxis_title, yupperlim, add_rect = FALSE, percentage = FALSE) { +by_region_bar_plot <- function(dataset, yvalue, yaxis_title, yupperlim, add_rect = FALSE, decimal_percentage = FALSE) { if (add_rect == FALSE) { reg_data <- dataset %>% filter(geographic_level == "Regional", time_period == max(time_period)) %>% @@ -284,7 +284,7 @@ by_region_bar_plot <- function(dataset, yvalue, yaxis_title, yupperlim, add_rect p <- ggplot(reg_data, aes( x = `Breakdown`, y = !!sym(str_to_title(str_replace_all(yvalue, "_", " "))), fill = factor(time_period), - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_sentence(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_title(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Region: ", `Breakdown`, "
", @@ -1297,7 +1297,7 @@ all_assessment_factors_plot <- function(dataset, factorslist, selected_geo_break return(p) } -factors_by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, yupperlim = NULL, add_rect = FALSE, percentage = FALSE) { +factors_by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, yupperlim = NULL, add_rect = FALSE, decimal_percentage = FALSE) { if (selected_geo_lvl == "Local authority") { if (add_rect == "FALSE") { la_data <- dataset %>% @@ -1381,7 +1381,7 @@ factors_by_la_bar_plot <- function(dataset, selected_geo_breakdown = NULL, selec if (add_rect == FALSE) { p <- ggplot(la_data, aes( x = Breakdown, y = !!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), fill = `Selection`, - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_sentence(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_sentence(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Local authority: ", Breakdown, "
", @@ -1594,7 +1594,7 @@ plot_ofsted_reg <- function() { # Statistical Neighbours function ---- -statistical_neighbours_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, percentage = FALSE) { +statistical_neighbours_plot <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, decimal_percentage = FALSE) { # Set the upper limit of the y-axis, then give it a bit extra on top of that so the max y-axis tick has a better chance of being near the top of the axis ylim_upper <- (ceiling(ylim_upper / 10) * 10) + (ylim_upper * 0.05) @@ -1622,7 +1622,7 @@ statistical_neighbours_plot <- function(dataset, selected_geo_breakdown = NULL, ggplot(filtered_data, aes( x = Breakdown, y = !!sym(str_to_title(str_replace_all(yvalue, "_", " "))), fill = `Selection`, - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_title(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_title(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Local authority: ", `Breakdown`, "
", @@ -1701,7 +1701,7 @@ statistical_neighbours_plot <- function(dataset, selected_geo_breakdown = NULL, } } -statistical_neighbours_plot_factors <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, percentage = FALSE) { +statistical_neighbours_plot_factors <- function(dataset, selected_geo_breakdown = NULL, selected_geo_lvl = NULL, yvalue, yaxis_title, ylim_upper, add_rect = FALSE, decimal_percentage = FALSE) { # Set the upper limit of the y-axis, then give it a bit extra on top of that so the max y-axis tick has a better chance of being near the top of the axis ylim_upper <- (ceiling(ylim_upper / 10) * 10) + (ylim_upper * 0.05) @@ -1729,7 +1729,7 @@ statistical_neighbours_plot_factors <- function(dataset, selected_geo_breakdown p <- ggplot(filtered_data, aes( x = Breakdown, y = !!sym(str_to_title(str_replace_all(yvalue, "_", " "))), fill = `Selection`, - text = if (percentage) { + text = if (decimal_percentage) { paste0( str_to_title(str_replace_all(yvalue, "_", " ")), ": ", format(!!sym(str_to_title(str_replace_all(yvalue, "_", " "))), nsmall = 1), "
", "Local authority: ", `Breakdown`, "
", @@ -2106,7 +2106,7 @@ cellfunc <- function(value) { } # Ordering tables with suppression -cellfunc_percent <- function(value) { +cellfunc_decimal_percent <- function(value) { if (value == -100) { return("c") } else if (value == -200) { diff --git a/R/read_data.R b/R/read_data.R index 1cd2c75..11d487b 100644 --- a/R/read_data.R +++ b/R/read_data.R @@ -422,8 +422,11 @@ read_spending_data <- function(file = "data/RSX_2023-24_data_by_LA.ods") { `Total Expenditure` == "x" ~ 0, TRUE ~ as.numeric(`Total Expenditure`) )) + + # calculate the share of the - data3$cs_share <- janitor::round_half_up(((data3$exp) / (data3$total_exp)) * 100) + # data3$cs_share <- janitor::round_half_up(((data3$exp) / (data3$total_exp)) * 100) + data3$cs_share <- ((data3$exp) / (data3$total_exp)) * 100 data3 <- data3 %>% mutate(cs_share = case_when( `CS Expenditure` == "x" ~ 0, @@ -453,7 +456,7 @@ read_spending_data <- function(file = "data/RSX_2023-24_data_by_LA.ods") { group_by(region_name) %>% summarise(exp = sum(exp), total_exp = sum(total_exp), cs_share = ((exp / total_exp) * 100)) %>% rename("geo_breakdown" = "region_name") - regional_spending$cs_share <- janitor::round_half_up(regional_spending$cs_share) + # regional_spending$cs_share <- janitor::round_half_up(regional_spending$cs_share) regional_spending$geographic_level <- "Regional" regional_spending$time_period <- "2023/24" regional_spending$new_la_code <- as.character("") @@ -469,13 +472,16 @@ read_spending_data <- function(file = "data/RSX_2023-24_data_by_LA.ods") { "new_la_code" = "", "old_la_code" = as.numeric("") ) - london_com$cs_share <- janitor::round_half_up(london_com$cs_share) + # london_com$cs_share <- janitor::round_half_up(london_com$cs_share) regional_spending <- rbind(regional_spending, london_com) df <- full_join(merged_data, national_data, by = c("time_period", "geographic_level", "geo_breakdown", "new_la_code", "old_la_code", "CS Expenditure", "Total Expenditure", "exp", "total_exp", "cs_share")) df2 <- full_join(df, regional_spending, by = c("time_period", "geographic_level", "geo_breakdown", "new_la_code", "old_la_code", "exp", "total_exp", "cs_share")) + + df2$cs_share <- round(df2$cs_share, 1) + final_dataset <- df2 %>% mutate(exp = case_when( `CS Expenditure` == "x" ~ -300, @@ -498,7 +504,7 @@ read_spending_data <- function(file = "data/RSX_2023-24_data_by_LA.ods") { `CS Share` )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, "CS Expenditure", "Total Expenditure", exp, total_exp, cs_share, "CS Share") - final_dataset$cs_share <- janitor::round_half_up(final_dataset$cs_share) + # final_dataset$cs_share <- janitor::round_half_up(final_dataset$cs_share) return(final_dataset) } @@ -595,7 +601,8 @@ read_spending_data2 <- function(file = "data/RO3_2023-24_data_by_LA.ods") { TRUE ~ as.numeric(`Total Expenditure`) )) # calculate the share of the expenditure not for CLA - data3$minus_cla_share <- janitor::round_half_up(((data3$total_exp - data3$cla_exp) / (data3$total_exp)) * 100) + # data3$minus_cla_share <- janitor::round_half_up(((data3$total_exp - data3$cla_exp) / (data3$total_exp)) * 100) + data3$minus_cla_share <- ((data3$total_exp - data3$cla_exp) / (data3$total_exp)) * 100 data3 <- data3 %>% mutate(minus_cla_share = case_when( `CLA Expenditure` == "x" ~ 0, @@ -622,7 +629,7 @@ read_spending_data2 <- function(file = "data/RO3_2023-24_data_by_LA.ods") { group_by(region_name) %>% summarise(cla_exp = sum(cla_exp), total_exp = sum(total_exp), minus_cla_share = (((total_exp - cla_exp) / total_exp) * 100)) %>% rename("geo_breakdown" = "region_name") - regional_spending$minus_cla_share <- janitor::round_half_up(regional_spending$minus_cla_share) + # regional_spending$minus_cla_share <- janitor::round_half_up(regional_spending$minus_cla_share) regional_spending$geographic_level <- "Regional" regional_spending$time_period <- "2023/24" regional_spending$new_la_code <- as.character("") @@ -638,13 +645,15 @@ read_spending_data2 <- function(file = "data/RO3_2023-24_data_by_LA.ods") { "new_la_code" = as.character(""), "old_la_code" = as.numeric(""), ) - london_com$minus_cla_share <- janitor::round_half_up(london_com$minus_cla_share) + # london_com$minus_cla_share <- janitor::round_half_up(london_com$minus_cla_share) regional_spending <- rbind(regional_spending, london_com) df <- full_join(merged_data, national_data, by = c("time_period", "geographic_level", "geo_breakdown", "new_la_code", "old_la_code", "CLA Expenditure", "Total Expenditure", "cla_exp", "total_exp", "minus_cla_share")) df2 <- full_join(df, regional_spending, by = c("time_period", "geographic_level", "geo_breakdown", "new_la_code", "old_la_code", "cla_exp", "total_exp", "minus_cla_share")) + df2$minus_cla_share <- round(df2$minus_cla_share, 1) + final_dataset <- df2 %>% mutate(exp = case_when( `CLA Expenditure` == "x" ~ -300, @@ -667,7 +676,7 @@ read_spending_data2 <- function(file = "data/RO3_2023-24_data_by_LA.ods") { `Excluding CLA Share` )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, "CLA Expenditure", "Total Expenditure", cla_exp, total_exp, minus_cla_share, "Excluding CLA Share") - final_dataset$minus_cla_share <- janitor::round_half_up(final_dataset$minus_cla_share) + # final_dataset$minus_cla_share <- janitor::round_half_up(final_dataset$minus_cla_share) return(final_dataset) } @@ -1094,7 +1103,7 @@ read_outcomes_ks2_data <- function(file = "data/ks2_la.csv") { geographic_level == "Local authority" ~ la_name )) %>% mutate(pt_rwm_met_expected_standard = ifelse(!is.na(as.numeric(pt_rwm_met_expected_standard)), - format(as.numeric(as.character(pt_rwm_met_expected_standard)), nsmall = 1), + format(as.numeric(as.character(pt_rwm_met_expected_standard)), nsmall = 0), pt_rwm_met_expected_standard )) %>% select( @@ -1251,7 +1260,7 @@ read_outcome2 <- function(file = "data/la_children_who_ceased_during_the_year.cs geographic_level == "Local authority" ~ la_name )) %>% mutate(percentage = ifelse(!is.na(as.numeric(percentage)), - format(as.numeric(as.character(percentage)), nsmall = 1), + format(as.numeric(as.character(percentage)), nsmall = 0), percentage )) %>% mutate(`Ceased (%)` = case_when( @@ -1575,7 +1584,7 @@ read_number_placements_data <- function(file = "data/la_cla_placement_stability. geographic_level == "Local authority" ~ la_name )) %>% mutate(percentage = ifelse(!is.na(as.numeric(percentage)), - format(as.numeric(as.character(percentage)), nsmall = 1), + format(as.numeric(as.character(percentage)), nsmall = 0), percentage )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, cla_group, placement_stability, number, percentage) %>% @@ -1606,7 +1615,7 @@ read_placement_info_data <- function(file = "data/la_cla_on_31_march_by_characte )) %>% filter(cla_group %in% c("Placement", "Distance between home and placement")) %>% mutate(percentage = ifelse(!is.na(as.numeric(percentage)), - format(as.numeric(as.character(percentage)), nsmall = 1), + format(as.numeric(as.character(percentage)), nsmall = 0), percentage )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, cla_group, characteristic, number, percentage) %>% @@ -1635,7 +1644,7 @@ read_care_leavers_activity_data <- function(file = "data/la_care_leavers_activit geographic_level == "Local authority" ~ la_name )) %>% mutate(percentage = ifelse(!is.na(as.numeric(percentage)), - format(as.numeric(as.character(percentage)), nsmall = 1), + format(as.numeric(as.character(percentage)), nsmall = 0), percentage )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, age, activity, number, percentage) @@ -1676,7 +1685,7 @@ read_care_leavers_accommodation_suitability <- function(file = "data/la_care_lea geographic_level == "Local authority" ~ la_name )) %>% mutate(percentage = ifelse(!is.na(as.numeric(percentage)), - format(as.numeric(as.character(percentage)), nsmall = 1), + format(as.numeric(as.character(percentage)), nsmall = 0), percentage )) %>% select(time_period, geographic_level, geo_breakdown, new_la_code, old_la_code, age, accommodation_suitability, number, percentage) diff --git a/R/standard_panels.R b/R/standard_panels.R index 084e2af..346f731 100644 --- a/R/standard_panels.R +++ b/R/standard_panels.R @@ -1,44 +1,3 @@ -a11y_panel <- function() { - tabPanel( - "Accessibility", - gov_main_layout( - gov_row( - column( - width = 12, - h1("Accessibility statement"), - p("This accessibility statement applies to the Children's Social Care - Outcomes and Enablers dashboard. - This application is run by the Department for Education. We want as many people as possible to be able to use this application, - and have actively developed this application with accessibilty in mind.", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), - h2("WCAG 2.1 compliance"), - p("We follow the recommendations of the ", a(href = "https://www.w3.org/TR/WCAG21/", "WCAG 2.1 requirements. ", target = "_blank", onclick = "ga('send', 'event', 'click', 'link', 'IKnow', 1)"), "This application has been checked using the ", a(href = "https://github.com/ewenme/shinya11y", target = "_blank", "Shinya11y tool "), ", which did not detect accessibility issues. - This application also fully passes the accessibility audits checked by the ", a(href = "https://developers.google.com/web/tools/lighthouse", target = "_blank", "Google Developer Lighthouse tool"), ". This means that this application:", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), - tags$div(tags$ul( - tags$li("uses colours that have sufficient contrast"), - tags$li("allows you to zoom in up to 300% without the text spilling off the screen"), - tags$li("has its performance regularly monitored, with a team working on any feedback to improve accessibility for all users"), - style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;" - )), - h2("Limitations"), - p("We recognise that there are still potential issues with accessibility in this application, but we will continue - to review updates to technology available to us to keep improving accessibility for all of our users. For example, these - are known issues that we will continue to monitor and improve:", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), - tags$div(tags$ul( - tags$li("Screen reader and keyboard users cannot navigate through the interactive graphs effectively. An accessible alternative table is provided to view and a CSV format is available for users to download."), - tags$li("Some users may have difficultly reading the graph due to the use of colour. An accessible alternative table is provided to view and a CSV format is available for users to download."), - style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;" - )), - h2("Feedback"), - p( - "If you have any feedback on how we could further improve the accessibility of this application, contact us at", - a(href = "mailto:CSCDashboard.FEEDBACK@education.gov.uk", "CSCDashboard.FEEDBACK@education.gov.uk", target = "_blank"), - style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;" - ) - ) - ) - ) - ) -} - support_links <- function() { tabPanel( "Support and feedback", @@ -52,7 +11,7 @@ support_links <- function() { "If you have any feedback or suggestions for improvements, submit them using our ", a( href = "https://forms.office.com/e/dMDRycTXcU", target = "_blank", - "feedback form (Opens in a new tab)", .noWS = c("after") + "feedback form (opens in a new tab)", .noWS = c("after") ), "." ), p( @@ -60,17 +19,17 @@ support_links <- function() { a(href = "mailto:CSCDashboard.FEEDBACK@education.gov.uk", target = "_blank", "CSCDashboard.FEEDBACK@education.gov.uk", .noWS = c("after")), "." ), h2("Find more information on the data"), - p("Most data included in the dashboard is children’s social care statistics published by DfE and available on", a(href = "https://explore-education-statistics.service.gov.uk/", "Explore Education Statistics.", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), " The publications include:"), + p("Most data included in the dashboard is children’s social care statistics published by DfE and available on", a(href = "https://explore-education-statistics.service.gov.uk/", "Explore Education Statistics (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;"), " The publications include:"), tags$ul( - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions", "Children looked after in England including adoptions (last updated: 25 April 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/characteristics-of-children-in-need", "Children in need (last updated: 26 October 2023) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://fingertips.phe.org.uk/profile/child-health-profiles/data#page/3/gid/1938133230/ati/502/iid/90284/age/26/sex/4/cat/-1/ctp/-1/yrr/1/cid/4/tbm/1/page-options/car-do-0", "Public health data explorer (last updated: 08 May 2024) (Opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-s-social-work-workforce", "Children's social work workforce (last updated: 29 February 2024) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.ons.gov.uk/datasets/TS021/editions/2021/versions/3", "ONS - Census, Ethnic groups (last updated: 28 March 2023) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland", "Estimates of the population for the UK, England, Wales, Scotland, and Northern Ireland (last updated: 26 March 2024) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.gov.uk/government/statistics/childrens-social-care-data-in-england-2023", "Children’s social care data in England 2023 (last updated: 8 September 2023) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://www.gov.uk/government/statistics/local-authority-revenue-expenditure-and-financing-england-2022-to-2023-individual-local-authority-data-outturn", "Local authority revenue expenditure and financing England: 2022 to 2023 (last updated: 14 February 2024) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), - tags$li(a(href = "https://assets.publishing.service.gov.uk/media/606458acd3bf7f0c8d06b7e2/Childrens_services_statistical_neighbour_benchmarking_tool_-_LGR_Version__April_2021_.xlsx", "Children's services statistical neighbour benchmarking tool (last updated: April 2021) (Opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")) + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-looked-after-in-england-including-adoptions", "Children looked after in England including adoptions (last updated: 25 April 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/characteristics-of-children-in-need", "Children in need (last updated: 26 October 2023) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://fingertips.phe.org.uk/profile/child-health-profiles/data#page/3/gid/1938133230/ati/502/iid/90284/age/26/sex/4/cat/-1/ctp/-1/yrr/1/cid/4/tbm/1/page-options/car-do-0", "Public health data explorer (last updated: 08 May 2024) (opens in a new tab).", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/children-s-social-work-workforce", "Children's social work workforce (last updated: 29 February 2024) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.ons.gov.uk/datasets/TS021/editions/2021/versions/3", "ONS - Census, Ethnic groups (last updated: 28 March 2023) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland", "Estimates of the population for the UK, England, Wales, Scotland, and Northern Ireland (last updated: 26 March 2024) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.gov.uk/government/statistics/childrens-social-care-data-in-england-2023", "Children’s social care data in England 2023 (last updated: 8 September 2023) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://www.gov.uk/government/statistics/local-authority-revenue-expenditure-and-financing-england-2022-to-2023-individual-local-authority-data-outturn", "Local authority revenue expenditure and financing England: 2022 to 2023 (last updated: 14 February 2024) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")), + tags$li(a(href = "https://assets.publishing.service.gov.uk/media/606458acd3bf7f0c8d06b7e2/Childrens_services_statistical_neighbour_benchmarking_tool_-_LGR_Version__April_2021_.xlsx", "Children's services statistical neighbour benchmarking tool (last updated: April 2021) (opens in a new tab)", target = "_blank", style = "font-family: GDS Transport, arial, sans-serif; font-size :19px;")) ), h2("Contact us"), p( @@ -80,15 +39,9 @@ support_links <- function() { h2("See the source code"), p( "The source code for this dashboard is available in our ", - a(href = "https://github.com/dfe-analytical-services/CSC_outcomes_and_enablers", target = "_blank", "GitHub repository", .noWS = c("after")), + a(href = "https://github.com/dfe-analytical-services/CSC_outcomes_and_enablers", target = "_blank", "GitHub repository (opens in a new tab)", .noWS = c("after")), "." ) - ), - column( - 12, - h2("Use of cookies"), - textOutput("cookie_status"), - actionButton("remove", "Reset cookie consent"), ) ) ) diff --git a/R/ui_panels/accessibility_statement.R b/R/ui_panels/accessibility_statement.R new file mode 100644 index 0000000..3ecc0f8 --- /dev/null +++ b/R/ui_panels/accessibility_statement.R @@ -0,0 +1,176 @@ +a11y_panel <- function() { + tabPanel( + "Accessibility", + gov_main_layout( + gov_row( + column( + width = 12, + h1("Accessibility statement for Children's Social Care - Outcomes and Enablers dashboard"), + p( + "This accessibility statement applies to the", + "https://department-for-education.shinyapps.io/csc-outcomes-enablers/", + "website. This website is run by the", + a( + href = "https://www.gov.uk/government/organisations/department-for-education", + "Department for Education (DfE)", + .noWS = "after" + ), ".", + "This statement does not cover any other services run by the Department for Education (DfE) or GOV.UK." + ), + h2("How you should be able to use this website"), + p("We want as many people as possible to be able to use this website. You should be able to:"), + tags$div(tags$ul( + tags$li("change colours, contrast levels and fonts using browser or device settings"), + tags$li("zoom in up to 400% without the text spilling off the screen"), + tags$li("navigate most of the website using a keyboard or speech recognition software"), + tags$li("listen to most of the website using a screen reader + (including the most recent versions of JAWS, NVDA and VoiceOver)") + )), + p("We’ve also made the website text as simple as possible to understand."), + p( + a(href = "https://mcmw.abilitynet.org.uk/", "AbilityNet"), + " has advice on making your device easier to use if you have a disability." + ), + h2("How accessible this website is"), + p("We know some parts of this website are not fully accessible:"), + tags$div(tags$ul( + tags$li(paste( + "Screen reader and keyboard users cannot navigate through the interactive", + "graphs effectively. An accessible alternative table is provided to view and a", + "CSV format is available for users to download." + )), + tags$li(paste( + "Some users may have difficultly reading some charts due to the use of colour. An", + "accessible alternative table is provided to view and a CSV format is available for", + "users to download." + )), + )), # TODO + h2("Feedback and contact information"), + p( + "If you need information on this website in a different format please see the parent", + "publications", + a( + href = "https://explore-education-statistics.service.gov.uk/find-statistics", + "on Explore education statistics", + .noWS = "after" + ), + ", as detailed on the data sources page of this service.", + ". More details are available on that service for alternative formats of this data.", + ), + p("We’re always looking to improve the accessibility of this website. + If you find any problems not listed on this page or think we’re not meeting + accessibility requirements, contact us:"), + tags$ul(tags$li( + a( + href = "mailto:explore.statistics@education.gov.uk", + "explore.statistics@education.gov.uk" + ) + )), + h2("Enforcement procedure"), + p("The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies + (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 + (the ‘accessibility regulations’)."), + p( + "If you are not happy with how we respond to your complaint, ", + a( + href = "https://www.equalityadvisoryservice.com/", + "contact the Equality Advisory and Support Service (EASS)", + .noWS = "after" + ), + "." + ), + h2("Technical information about this website's accessibility"), + p("The Department for Education (DfE) is committed to making its website accessible, in accordance with the + Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018."), + h3("Compliance status"), + p( + "This website is partially compliant with the", + a( + href = "https://www.w3.org/TR/WCAG22/", + "Web Content Accessibility Guidelines version 2.2 AA standard", + .noWS = "after" + ), + " due to the non-compliances listed below." + ), + h3("Non accessible content"), + p("The content listed below is non-accessible for the following reasons. + We will address these issues to ensure our content is accessible."), + tags$div(tags$ul( + tags$li("Some form elements do not have appropriate labels (checkboxes)."), + tags$li("Items other than
  • ,