From dc78072a2a3694aaf5423d03225be6443b5be6bd Mon Sep 17 00:00:00 2001 From: Pat Thomas Date: Tue, 30 Jan 2024 10:25:02 +0000 Subject: [PATCH 1/5] Update dashboard_panels --- R/dashboard_panels.R | 178 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 167 insertions(+), 11 deletions(-) diff --git a/R/dashboard_panels.R b/R/dashboard_panels.R index 5cba49e..be1ed80 100644 --- a/R/dashboard_panels.R +++ b/R/dashboard_panels.R @@ -5,7 +5,7 @@ homepage_panel <- function() { gov_row( column( 12, - h1("16 to 18 time series attainment and single year entry dashboard"), + h1("16 to 18 time series attainment and single year entry dashboard"), br(), br() ), @@ -39,8 +39,15 @@ homepage_panel <- function() { h4("APS for A level by all & gender"), p("The line charts display the yearly trend and grades for all students and by gender, while the female - male gender gap shows the difference in average point score. To view and explore trend select up to four institution types from the drop-down menu at the top of the page."), + tags$div( - title = "(A level subject entries and result by all", + title = "(A level students entering maths and science by gender", + h3(actionLink("link_to_alevelMathsScience_tab", "A level students entering maths and science by gender")), + p("The line chart shows the yearly trend in the proportion of A level students entering maths and science from 2009/10 to 2022/23 (end of 16-18 study). + Select one subject or combination from the dropdown menu at the top of the page, followed by the start year to view changes over time (end year is fixed at the latest year available).")), + + tags$div( + title = "(A level subject entry and result by all", h3(actionLink("link_to_alevelAllSubject_tab", "A level subject entry and result by all")), p("The line charts for subject entries and cumulative percentage grades display the yearly trend from 1995/96 to 2022/23. Drop-down menus at the top of the page allows for the selection and comparison of up to four subjects @@ -49,9 +56,9 @@ homepage_panel <- function() { p("The data refers to all entries by 16-18 year olds in the year stated (where 2023 means 2022/23 academic year).") ), tags$div( - title = "(A level subject entries and result by gender", + title = "(A level subject entry and result by gender", h3(actionLink("link_to_alevelFmSubject_tab", "A level subject entry and result by gender")), - p("The line charts for subject entries and cumulative percentage grades display the yearly trend for female and male from 1995/96 to 2022/23. + p("The line charts for subject entries and cumulative percentage grades display the yearly trend for female, male and all students from 1995/96 to 2022/23. Select one subject from the dropdown menu at the top of the page, followed by the start year to view changes over time (end year is fixed at the latest year available)."), p(""), br(), br(), @@ -118,7 +125,7 @@ homepage_panel <- function() { p("• Total Classical studies covers Latin, Greek, Classical civilisation, and Other classical studies"), p("• STEM subjects cover Biology, Chemistry, Physics, Total maths, Further mathematics and Computer science. "), p("• Total Music includes Music and Music technology."), - p("The data refers to all entries by 16-18 year olds in the year stated (where 2022 means 2022/23 academic year).") + p("The data refers to all entries by 16-18 year olds in the year stated (where 2023 means 2022/23 academic year).") ) ) ) @@ -133,7 +140,7 @@ homepage_panel <- function() { dashboard_panel_aps <- function() { tabPanel( value = "dashboard", - "Attainment: APS per entry and average result", + "Attainment: APS per entry & average result (end of 16-18 study)", # Define UI for application that draws a histogram @@ -200,7 +207,7 @@ dashboard_panel_aps <- function() { inputId = "ees_1", label = "Visit Explore Education Statistics", icon = icon("table-cells"), - onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2021-22', '_blank')", + onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2022-23', '_blank')", style = "width:100%;white-space:normal;" ) ), @@ -369,7 +376,7 @@ dashboard_panel_aps <- function() { dashboard_panel_sub_all <- function() { tabPanel( value = "dashboard_alse", - "A level subject entries and grade: comparison by subject", + "A level entry & result: comparison by subject (single academic year)", # Define UI for application that draws a histogram @@ -442,7 +449,7 @@ dashboard_panel_sub_all <- function() { inputId = "ees_2a", label = "Visit Explore Education Statistics", icon = icon("table-cells"), - onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2021-22', '_blank')", + onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2022-23', '_blank')", style = "width:100%;white-space:normal;" ) ), @@ -567,7 +574,7 @@ dashboard_panel_sub_all <- function() { dashboard_panel_sub_fm <- function() { tabPanel( value = "dashboard_fm", - "A level entry and grade: comparison by gender", + "A level entry & result: comparison by gender (single academic year)", # Define UI for application that draws a histogram @@ -629,7 +636,7 @@ dashboard_panel_sub_fm <- function() { inputId = "ees_2b", label = "Visit Explore Education Statistics", icon = icon("table-cells"), - onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2021-22', '_blank')", + onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2022-23', '_blank')", style = "width:100%;white-space:normal;" ) ), @@ -742,3 +749,152 @@ dashboard_panel_sub_fm <- function() { ) ) } + + + +############## Maths and science ################# + +dashboard_panel_ms <- function() { + tabPanel( + value = "dashboard_ms", + "A level maths & science: comparison by gender (end of 16-18 study)", + + # Define UI for application that draws a histogram + + # Sidebar with a slider input for number of bins + gov_main_layout( + gov_row( + column( + width = 12, + h2("A level maths and science entry (end of 16 to 18 study): comparison by gender, England from 2009/10 to 2022/23") + ), + column( + width = 12, + div( + class = "well", + style = "min-height: 100%; height: 100%; overflow-y: visible", + gov_row( + column( + width = 6, + + selectizeInput("subjectMs", "Select one subject or combination", + choices = list( + `Single subject` = list( + "Biology", "Chemistry", "Computer science", "Further maths", "Maths", + "Physics" + ), + + `Combination` = list("One maths/science subject", "Two maths/science subjects", + "Three maths/science subjects", "Four maths/science subjects", "Zero maths/science subjects")), selected = c("Maths") + + ) + ), + column( + width = 3, + selectInput( + inputId = "year_start_ms", + label = "Select start year", + choices = seq(2010, latest_year, 1), + selected = 2010 + ) + ), + column( + width = 3, + selectInput( + inputId = "year_end_ms", + label = " End year", + choices = latest_year, + # choices = seq(1996, latest_year, 1), + selected = latest_year + ) + ), + column( + width = 4, + p(strong("Download full dataset")), + downloadButton( + outputId = "downloadDataSubjectMs", + label = "Download data", + icon = shiny::icon("download"), + class = "downloadButton" + ) + ), + column( + width = 4, + p(strong("For more tables and metadata")), + actionButton( + inputId = "ees_3", + label = "Visit Explore Education Statistics", + icon = icon("table-cells"), + onclick = "window.open('https://explore-education-statistics.service.gov.uk/find-statistics/a-level-and-other-16-to-18-results/2022-23', '_blank')", + style = "width:100%;white-space:normal;" + ) + ), + column( + width = 4, + p(strong("Reset chart selection")), + align = "right", + actionButton(inputId = "resetSubMs", label = "Reset selections", icon = icon("fas fa-arrows-rotate")) + ) + + ) + ) + ), + + + ), + column( + width = 12, + tabsetPanel( + id = "tabsetpanel3", + tabPanel( + value = "alevelMsSubject", + "Maths and Science", + fluidRow( + column( + width = 12, + h3("A level maths and science: Comparison by gender"), + textOutput("textSubMs"), br(), + # column( + # width = 6, + # paste("Download chart data:"), br(), + # downloadButton( + # outputId = "downloadSubMs", + # label = "Download data", + # icon = shiny::icon("download"), + # class = "downloadButton" + # ) + # ) + ), + # valueBoxOutput("", width = 3), + # valueBoxOutput("boxapsGrade", width = 6), + box( + width = 12, + plotlyOutput("plotSubjectMs") %>% spinner(), + + + ) + ), + + column( + width = 12, + # div( + # class = "well", + # style = "min-height: 100%; height: 100%; overflow-y: visible", + fluidRow( + column(width = 12), + p("Note: The number of students from 2009/10 to 2017/18 has been calculated from rounded data, so less precise than the number of students from + 2018/19 to 2022/23") + + ) + ), + + dataTableOutput("tabMs"), + + + ) + ) + ) + ) + ) +} + \ No newline at end of file From 5d7716b1af65685c2b840451fe659c8a18adc4ea Mon Sep 17 00:00:00 2001 From: Pat Thomas Date: Tue, 30 Jan 2024 10:26:29 +0000 Subject: [PATCH 2/5] Update renv/activate --- renv/activate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renv/activate.R b/renv/activate.R index a00f781..019b5a6 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "1.0.3" + version <- "0.16.0" # the project directory project <- getwd() From 6b52e5ab0e574ef0a8686f7c1dc3a4e3af9966c1 Mon Sep 17 00:00:00 2001 From: Pat Thomas Date: Tue, 30 Jan 2024 10:29:05 +0000 Subject: [PATCH 3/5] Update renv lock --- renv.lock | 247 +++++++++++++++++++----------------------------------- 1 file changed, 86 insertions(+), 161 deletions(-) diff --git a/renv.lock b/renv.lock index a0039a0..b41b145 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.3.1", + "Version": "4.3.2", "Repositories": [ { "Name": "CRAN", @@ -19,10 +19,10 @@ }, "DT": { "Package": "DT", - "Version": "0.30", + "Version": "0.31", "Source": "Repository", "Repository": "CRAN", - "Hash": "dffb4d94a00be1b4a4507e53ab95bd90", + "Hash": "77b5189f5272ae2b21e3ac2175ad107c", "Requirements": [ "crosstalk", "htmltools", @@ -44,56 +44,14 @@ }, "Matrix": { "Package": "Matrix", - "Version": "1.6-3", + "Version": "1.6-1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "1d1b6901cf9b6b1b446bc56a7d47efa4", + "Hash": "1a00d4828f33a9d690806e98bd17150c", "Requirements": [ "lattice" ] }, - "R.cache": { - "Package": "R.cache", - "Version": "0.16.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fe539ca3f8efb7410c3ae2cf5fe6c0f8", - "Requirements": [ - "R.methodsS3", - "R.oo", - "R.utils", - "digest" - ] - }, - "R.methodsS3": { - "Package": "R.methodsS3", - "Version": "1.8.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "278c286fd6e9e75d0c2e8f731ea445c8", - "Requirements": [] - }, - "R.oo": { - "Package": "R.oo", - "Version": "1.25.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a0900a114f4f0194cf4aa8cd4a700681", - "Requirements": [ - "R.methodsS3" - ] - }, - "R.utils": { - "Package": "R.utils", - "Version": "2.12.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "325f01db13da12c04d8f6e7be36ff514", - "Requirements": [ - "R.methodsS3", - "R.oo" - ] - }, "R6": { "Package": "R6", "Version": "2.5.1", @@ -114,7 +72,7 @@ "Package": "Rcpp", "Version": "1.0.11", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "ae6cbbe1492f4de79c45fce06f967ce8", "Requirements": [] }, @@ -139,10 +97,10 @@ }, "askpass": { "Package": "askpass", - "Version": "1.2.0", + "Version": "1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796", + "Hash": "e8a22846fff485f0be3770c2da758713", "Requirements": [ "sys" ] @@ -199,16 +157,17 @@ }, "bslib": { "Package": "bslib", - "Version": "0.5.1", + "Version": "0.6.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "283015ddfbb9d7bf15ea9f0b5698f0d9", + "Hash": "c0d8599494bc7fb408cd206bbdd9cab0", "Requirements": [ "base64enc", "cachem", "htmltools", "jquerylib", "jsonlite", + "lifecycle", "memoise", "mime", "rlang", @@ -239,20 +198,20 @@ }, "checkmate": { "Package": "checkmate", - "Version": "2.3.0", + "Version": "2.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "ed4275b13c6ab74b89a31def0b6bf835", + "Hash": "c01cab1cb0f9125211a6fc99d540e315", "Requirements": [ "backports" ] }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "89e6d8219950eac806ae0c489052048a", + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52", "Requirements": [] }, "clipr": { @@ -281,10 +240,10 @@ }, "cpp11": { "Package": "cpp11", - "Version": "0.4.6", + "Version": "0.4.7", "Source": "Repository", "Repository": "CRAN", - "Hash": "707fae4bbf73697ec8d85f9d7076c061", + "Hash": "5a295d7d963cc5035284dcdbaf334f4e", "Requirements": [] }, "crayon": { @@ -325,18 +284,18 @@ }, "curl": { "Package": "curl", - "Version": "5.1.0", + "Version": "5.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "9123f3ef96a2c1a93927d828b2fe7d4c", + "Hash": "2118af9cb164c8d2dddc7b89eaf732d9", "Requirements": [] }, "data.table": { "Package": "data.table", - "Version": "1.14.8", + "Version": "1.14.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "b4c06e554f33344e044ccd7fdca750a9", + "Hash": "6ea17a32294d8ca00455825ab0cf71b9", "Requirements": [] }, "debugme": { @@ -361,23 +320,6 @@ "rprojroot" ] }, - "dfeshiny": { - "Package": "dfeshiny", - "Version": "0.1.1", - "Source": "GitHub", - "RemoteType": "github", - "RemoteUsername": "dfe-analytical-services", - "RemoteRepo": "dfeshiny", - "RemoteRef": "main", - "RemoteSha": "437c6e4c60b5eb9c1f55333588b65110d47b7ba2", - "RemoteHost": "api.github.com", - "Hash": "b3f1cac9ab18652447e842b04f702959", - "Requirements": [ - "shiny", - "shinyGovstyle", - "styler" - ] - }, "diffobj": { "Package": "diffobj", "Version": "0.3.5", @@ -392,16 +334,16 @@ "Package": "digest", "Version": "0.6.33", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "b18a9cf3c003977b0cc49d5e76ebe48d", "Requirements": [] }, "dplyr": { "Package": "dplyr", - "Version": "1.1.3", + "Version": "1.1.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "e85ffbebaad5f70e1a2e2ef4302b4949", + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec", "Requirements": [ "R6", "cli", @@ -455,10 +397,10 @@ }, "fansi": { "Package": "fansi", - "Version": "1.0.5", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "3e8583a60163b4bc1a80016e63b9959e", + "Hash": "962174cf2aeb5b9eea581522286a911f", "Requirements": [] }, "farver": { @@ -534,16 +476,16 @@ "Package": "fs", "Version": "1.6.3", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "47b5f30c720c23999b913a1a635cf0bb", "Requirements": [] }, "gdtools": { "Package": "gdtools", - "Version": "0.3.4", + "Version": "0.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "dcbec937764c19774f6f719e6bf45c69", + "Hash": "98158453e15bbd2486fac8454f4b4409", "Requirements": [ "Rcpp", "curl", @@ -607,10 +549,10 @@ }, "gtable": { "Package": "gtable", - "Version": "0.3.4", + "Version": "0.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "b29cf3031f49b04ab9c852c912547eef", + "Hash": "b44addadb528a0d227794121c00572a0", "Requirements": [ "cli", "glue", @@ -674,10 +616,10 @@ }, "htmlwidgets": { "Package": "htmlwidgets", - "Version": "1.6.2", + "Version": "1.6.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "a865aa85bcb2697f47505bfd70422471", + "Hash": "04291cc45198225444a397606810ac37", "Requirements": [ "htmltools", "jsonlite", @@ -696,10 +638,10 @@ }, "httpuv": { "Package": "httpuv", - "Version": "1.6.12", + "Version": "1.6.11", "Source": "Repository", "Repository": "CRAN", - "Hash": "c992f75861325961c29a188b45e549f7", + "Hash": "838602f54e32c1a0f8cc80708cefcefa", "Requirements": [ "R6", "Rcpp", @@ -709,10 +651,10 @@ }, "httr": { "Package": "httr", - "Version": "1.4.7", + "Version": "1.4.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "ac107251d9d9fd72f0ca8049988f1d7f", + "Hash": "7e5e3cbd2a7bc07880c94e22348fb661", "Requirements": [ "R6", "curl", @@ -743,7 +685,7 @@ "Package": "jsonlite", "Version": "1.8.7", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "266a20443ca13c65688b2116d5220f76", "Requirements": [] }, @@ -781,10 +723,10 @@ }, "lattice": { "Package": "lattice", - "Version": "0.22-5", + "Version": "0.21-9", "Source": "Repository", "Repository": "CRAN", - "Hash": "7c5e89f04e72d6611c77451f6331a091", + "Hash": "5558c61e0136e247252f5f952cdaad6a", "Requirements": [] }, "lazyeval": { @@ -830,7 +772,7 @@ "Package": "mgcv", "Version": "1.9-0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "086028ca0460d0c368028d3bda58f31b", "Requirements": [ "Matrix", @@ -867,10 +809,10 @@ }, "openssl": { "Package": "openssl", - "Version": "2.1.1", + "Version": "2.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5", + "Hash": "0f7cd2962e3044bb940cca4f4b5cecbe", "Requirements": [ "askpass" ] @@ -885,10 +827,10 @@ }, "patchwork": { "Package": "patchwork", - "Version": "1.1.3", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "c5754106c02e8e019941100c81149431", + "Hash": "9c8ab14c00ac07e9e04d1664c0b74486", "Requirements": [ "cli", "ggplot2", @@ -1021,10 +963,10 @@ }, "processx": { "Package": "processx", - "Version": "3.8.2", + "Version": "3.8.3", "Source": "Repository", - "Repository": "RSPM", - "Hash": "3efbd8ac1be0296a46c55387aeace0f3", + "Repository": "CRAN", + "Hash": "82d48b1aec56084d9438dbf98087a7e9", "Requirements": [ "R6", "ps" @@ -1032,10 +974,10 @@ }, "progress": { "Package": "progress", - "Version": "1.2.2", + "Version": "1.2.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061", + "Hash": "f4625e061cb2865f111b47ff163a5ca6", "Requirements": [ "R6", "crayon", @@ -1045,14 +987,13 @@ }, "promises": { "Package": "promises", - "Version": "1.2.1", + "Version": "1.2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d8a15c9d000970ada1ab21405387dee", + "Hash": "4ab2c43adb4d4699cf3690acd378d75d", "Requirements": [ "R6", "Rcpp", - "fastmap", "later", "magrittr", "rlang" @@ -1110,10 +1051,10 @@ }, "rematch": { "Package": "rematch", - "Version": "2.0.0", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "cbff1b666c6fa6d21202f07e2318d4f1", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c", "Requirements": [] }, "rematch2": { @@ -1128,10 +1069,10 @@ }, "renv": { "Package": "renv", - "Version": "1.0.3", + "Version": "0.16.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "41b847654f567341725473431dd0d5ab", + "Hash": "c9e8442ab69bc21c9697ecf856c1e6c7", "Requirements": [] }, "rlang": { @@ -1164,10 +1105,10 @@ }, "rprojroot": { "Package": "rprojroot", - "Version": "2.0.4", + "Version": "2.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144", + "Hash": "1de7ab598047a87bba48434ba35d497d", "Requirements": [] }, "rstudioapi": { @@ -1180,10 +1121,10 @@ }, "sass": { "Package": "sass", - "Version": "0.4.7", + "Version": "0.4.8", "Source": "Repository", - "Repository": "RSPM", - "Hash": "6bd4d33b50ff927191ec9acbf52fd056", + "Repository": "CRAN", + "Hash": "168f9353c76d4c4b0a0bbf72e2c2d035", "Requirements": [ "R6", "fs", @@ -1194,14 +1135,16 @@ }, "scales": { "Package": "scales", - "Version": "1.2.1", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "906cb23d2f1c5680b8ce439b44c6fa63", + "Hash": "c19df082ba346b0ffa6f833e92de34d1", "Requirements": [ "R6", "RColorBrewer", + "cli", "farver", + "glue", "labeling", "lifecycle", "munsell", @@ -1211,10 +1154,10 @@ }, "shiny": { "Package": "shiny", - "Version": "1.7.5.1", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "5ec01cc255f2138fc2f0dc74d2b1a1a1", + "Hash": "3a1f41807d648a908e3c7f0334bf85e6", "Requirements": [ "R6", "bslib", @@ -1282,7 +1225,7 @@ "Package": "shinycssloaders", "Version": "1.0.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "f39bb3c44a9b496723ec7e86f9a771d8", "Requirements": [ "digest", @@ -1372,18 +1315,18 @@ }, "stringi": { "Package": "stringi", - "Version": "1.8.1", + "Version": "1.8.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "12bf57fdcb9b7068bea39b32f87ecac9", + "Hash": "058aebddea264f4c99401515182e656a", "Requirements": [] }, "stringr": { "Package": "stringr", - "Version": "1.5.0", + "Version": "1.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8", + "Hash": "960e2ae9e09656611e0b8214ad543207", "Requirements": [ "cli", "glue", @@ -1394,23 +1337,6 @@ "vctrs" ] }, - "styler": { - "Package": "styler", - "Version": "1.10.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d61238fd44fc63c8adf4565efe8eb682", - "Requirements": [ - "R.cache", - "cli", - "magrittr", - "purrr", - "rlang", - "rprojroot", - "vctrs", - "withr" - ] - }, "sys": { "Package": "sys", "Version": "3.4.2", @@ -1421,20 +1347,20 @@ }, "systemfonts": { "Package": "systemfonts", - "Version": "1.0.5", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "15b594369e70b975ba9f064295983499", + "Hash": "90b28393209827327de889f49935140a", "Requirements": [ "cpp11" ] }, "testthat": { "Package": "testthat", - "Version": "3.2.0", + "Version": "3.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "877508719fcb8c9525eccdadf07a5102", + "Hash": "4767a686ebe986e6cb01d075b3f09729", "Requirements": [ "R6", "brio", @@ -1442,7 +1368,6 @@ "cli", "desc", "digest", - "ellipsis", "evaluate", "jsonlite", "lifecycle", @@ -1510,10 +1435,10 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.48", + "Version": "0.49", "Source": "Repository", "Repository": "CRAN", - "Hash": "8f96d229b7311beb32b94cf413b13f84", + "Hash": "5ac22900ae0f386e54f1c307eca7d843", "Requirements": [ "xfun" ] @@ -1559,10 +1484,10 @@ }, "vctrs": { "Package": "vctrs", - "Version": "0.6.4", + "Version": "0.6.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "266c1ca411266ba8f365fcc726444b87", + "Hash": "c03fa420630029418f7e6da3667aac4a", "Requirements": [ "cli", "glue", @@ -1580,10 +1505,10 @@ }, "vroom": { "Package": "vroom", - "Version": "1.6.4", + "Version": "1.6.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "9db52c1656cf19c124f93124ea57f0fd", + "Hash": "390f9315bc0025be03012054103d227c", "Requirements": [ "bit64", "cli", @@ -1603,10 +1528,10 @@ }, "waldo": { "Package": "waldo", - "Version": "0.5.2", + "Version": "0.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6", + "Hash": "2c993415154cdb94649d99ae138ff5e5", "Requirements": [ "cli", "diffobj", @@ -1661,10 +1586,10 @@ }, "yaml": { "Package": "yaml", - "Version": "2.3.7", + "Version": "2.3.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d0056cc5383fbc240ccd0cb584bf436", + "Hash": "29240487a071f535f5e5d5a323b7afbd", "Requirements": [] } } From bdfebb7b0975641d5e2ce01be028ee212a01a405 Mon Sep 17 00:00:00 2001 From: Pat Thomas Date: Tue, 30 Jan 2024 10:31:23 +0000 Subject: [PATCH 4/5] Update server --- server.R | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 199 insertions(+), 11 deletions(-) diff --git a/server.R b/server.R index 6fa6527..5bd57c0 100644 --- a/server.R +++ b/server.R @@ -395,8 +395,8 @@ server <- function(input, output, session) { `Institution type` = school_type, `Characteristic gender` = characteristic_gender, `Number of students` = number_of_students, - `APS per entry` = aps_2016_2022, - `APS per entry grade` = aps_grade_2016_2022, + `APS per entry` = aps_2016_2023, + `APS per entry grade` = aps_grade_2016_2023, Version = version ) }) @@ -432,7 +432,7 @@ server <- function(input, output, session) { output$textHeadline <- renderText({ val <- paste(input$headlineAps, collapse = ",") # val1<-paste(input$allGender, collapse=", ") - paste("The boxes display the latest provisional average grades in 2022/23 for A level, applied general and tech level. In 2018, there was a large drop in the number of applied general + paste("The boxes display the latest revised average grades in 2022/23 for A level, applied general and tech level. In 2018, there was a large drop in the number of applied general and tech level students. This was due to the change in the list of tech level and applied general qualifications eligible for reporting in the performance tables. The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in England. To view results, click on the drop-down box and select one institution type. ") @@ -535,11 +535,11 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in reactiveSubjectFm <- reactive({ - subjNameFm <- subjectByGender + subjNameFm <- subjectByGender #dfMs subjNameFm <- subset( subjNameFm, - subject_name == input$subjectFm & + subject_name == input$subjectFm & #subjectMs between(year, as.numeric(input$year_start_fm), as.numeric(input$year_end_fm)) ) @@ -615,8 +615,8 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in val2 <- paste(input$year_end_fm, collapse = ", ") paste( - "The line chart shows the A level exam entries for female and male on ", val, " from ", val1, "to ", val2, - " in England. " + "The line chart shows the A level exam entries on ", val, " from ", val1, "to ", val2, + " for female, male and all students in England. " ) }) @@ -627,8 +627,8 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in val2 <- paste(input$year_end_fm, collapse = ", ") paste( - "The line chart shows the A level cumulative percentage grades for female and male on ", val, "\n from ", val1, " to ", val2, - " in England. The shaded area on chart shows the Centre Assessment Grade (CAG) and Teacher Assessed Grade (TAG) + "The line chart shows the A level cumulative percentage grades on ", val, "\n from ", val1, " to ", val2, + " for female, male and all students in England. The shaded area on chart shows the Centre Assessment Grade (CAG) and Teacher Assessed Grade (TAG) awarded in 2019/20 and 2020/21 respectively." ) }) @@ -793,8 +793,8 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in `Institution type` = school_type, `Characteristic gender` = characteristic_gender, `Number of students` = number_of_students, - `APS per entry` = aps_2016_2022, - `APS per entry grade 2016-2023` = aps_grade_2016_2022, + `APS per entry` = aps_2016_2023, + `APS per entry grade 2016-2023` = aps_grade_2016_2023, `APS per entry 2013-2015` = aps_2013_2015, `APS per entry grade 2013-2015` = aps_grade_2013_2015, Version = version @@ -837,6 +837,190 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in }) + + + ####### Maths and science + + + reactiveSubjectMs <- reactive({ + subjNameMs <- dfMs + + subjNameMs <- subset( + subjNameMs, + subject == input$subjectMs & #subjectMs + + between(year, as.numeric(input$year_start_ms), as.numeric(input$year_end_ms)) + ) + + subjNameMs + }) + + output$plotSubjectMs <- renderPlotly({ + createTimeSeriesSubjectMs(reactiveSubjectMs(), + subByMs = input$subjectMs + ) + }) + + + # observeEvent(input$year_start_fm, {updateSelectInput(session, "year_end_fm", label = NULL, + # choices = seq(ifelse(input$year_start_fm == latest_year, latest_year, as.numeric(input$year_start_fm)), latest_year, 1), + # selected = input$year_end_fm) }) + observeEvent(input$year_end_ms, { + updateSelectInput(session, "year_start_ms", + label = NULL, + choices = seq(2010, ifelse(input$year_end_ms == 2010, 2010, as.integer(2018)), 1), + selected = input$year_start_ms + ) + }) + + observeEvent(input$resetSubMs, { + updateSelectInput(session, "subjectMs", selected = "Maths") + updateSelectInput(session, "year_start_ms", selected = 2010) + updateSelectInput(session, "year_end_ms", selected = latest_year) + + }) + + + + output$textSubMs <- renderText({ + val <- paste(input$subjectMs, collapse = ",") + val1 <- paste(input$year_start_ms, collapse = ", ") + val2 <- paste(input$year_end_ms, collapse = ", ") + + paste( + "The line chart shows the proportion of A level students that entered ", val, " from ", val1, "to ", val2, "for female, male and all students in England." + + ) + }) + + + + # + # output$textResFm <- renderText({ + # val <- paste(input$subjectFm, collapse = ", ") + # val1 <- paste(input$year_start_fm, collapse = ", ") + # val2 <- paste(input$year_end_fm, collapse = ", ") + # + # paste( + # "The line chart shows the A level cumulative percentage grades for female and male on ", val, "\n from ", val1, " to ", val2, + # " in England. The shaded area on chart shows the Centre Assessment Grade (CAG) and Teacher Assessed Grade (TAG) + # awarded in 2019/20 and 2020/21 respectively." + # ) + # }) + # + + + # Download selected subjects + + + + + + + + # Download subject entry and cumulative result for all subject from top panel + + + + output$downloadDataSubjectMs <- downloadHandler( + filename = "alevel_maths_science_data.csv", + content = function(file) { + data <- dfMsRaw + write.csv(data, file, row.names = FALSE) + } + ) + + + + # Download selected subject entries by gender + selectedSubMs <- reactive({ + subjName <- dfMs %>% + select( + year, time_period, subject, + characteristic_gender, percent_entered, number_of_students, version + ) + subjName <- subset( + subjName, + subject_name == input$subjectMs & + + between(year, as.numeric(input$year_start_ms), as.numeric(input$year_end_ms)) + ) + + subjName + }) + + + + selectedMsData <- reactive({ + msData <- dfMs + msData <- subset( + msData, + subject == input$subjectMs) %>% + select( + Year = year, + `Time period` = time_period, + `Characteristic gender` = characteristic_gender, + Subject = subject, + `Proportion of students` = percent_entered, + `Number of students` = number_of_students, + Version = version) + + }) + + + output$tabMs <- renderDataTable({ + datatable(selectedMsData(), + extens = "Buttons", + options = ( + list( + infor = F, paging = F, + searching = F, + stripClasses = F, + lengthChange = F, + scrollY = "260px", + scrollX = T, + scrollCollapse = T, + dom = "Bfrtip", + buttons = (c("copy", "csv", "excel")), + class = "display" + )), + rownames = FALSE + ) + }) + + + + # + # + # output$resall <- renderDataTable({ + # datatable(selected_subAll(), + # options = list( + # infor = T, paging = F, + # searching = F, + # stripClasses = F, + # lengthChange = F, + # scrollY = "260px", + # scrollX = T, + # scrollCollapse = T, + # rownames = FALSE, + # autoWidth = TRUE, + # server = TRUE + # ) + # ) + # }) + + + + + + + + + + + + + @@ -854,6 +1038,10 @@ The chart shows the average point score from 2015/16 to 2022/23 for ", val, " in observeEvent(input$link_to_alevelAllSubject_tab, { updateTabsetPanel(session, "navlistPanel", selected = "dashboard_alse") }) + + observeEvent(input$link_to_alevelMathsScience_tab, { + updateTabsetPanel(session, "navlistPanel", selected = "dashboard_ms") + }) From adbf9fc40659946d99df041fd4d3fd9d4e41ba42 Mon Sep 17 00:00:00 2001 From: Pat Thomas Date: Tue, 30 Jan 2024 11:04:08 +0000 Subject: [PATCH 5/5] update code --- R/plotting.R | 97 +++++++++++++++++++++++++++++++++-------------- datafiles_log.csv | 16 +++----- global.R | 42 +++++++++++++------- ui.R | 1 + 4 files changed, 104 insertions(+), 52 deletions(-) diff --git a/R/plotting.R b/R/plotting.R index 4a7aac4..65189e1 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -70,7 +70,7 @@ createTimeSeriesHeadline <- function(dfAps, allAps) { axis.text.x = element_text(angle = 300), axis.title.x = element_text(size = 10), axis.title.y = element_text(margin = margin(r = 12)), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth =1.0) ) + expand_limits(x = 2016, y = 0) + ggtitle(paste0("\n Average point score: ", allAps)) @@ -96,23 +96,6 @@ createTimeSeriesHeadline <- function(dfAps, allAps) { - - - - - - - - - - - - - - - - - @@ -121,6 +104,9 @@ createTimeSeriesHeadline <- function(dfAps, allAps) { createApsTimeSeries <- function(dfAps, instGroup, instType, allGender) { validate(need(dfAps$school_type, message = "To view charts select type of students and up to 4 institution types from the drop-down menus at the top page")) + + fig2<-dfAps%>% + filter(year>=2016) fig1 <- ggplot(dfAps, aes(x = year_2013_2015, y = aps_2013_2015, color = school_type)) + @@ -150,7 +136,7 @@ createApsTimeSeries <- function(dfAps, instGroup, instType, allGender) { axis.line = element_line(size = 1.0) ) - fig2 <- ggplot(dfAps, aes(x = year_2016_2022, y = aps_2016_2022, color = school_type)) + + fig2 <- ggplot(fig2, aes(x = year, y = aps_2016_2023, color = school_type)) + geom_line(stat = "identity", linewidth = 1.5) + geom_curve(aes(x = 2016.5, y = 48, xend = 2016, yend = 45), curvature = .3, @@ -167,7 +153,7 @@ createApsTimeSeries <- function(dfAps, instGroup, instType, allGender) { arrow = arrow(length = unit(0.03, "npc"), type = "closed"), color = "black", size = .05, angle = 90 ) + - geom_label(aes(label = aps_grade_2016_2022, y = aps_2016_2022), show.legend = F) + + geom_label(aes(label = aps_grade_2016_2023, y = aps_2016_2023), show.legend = F) + ggtitle(paste0("\n APS & grade 2015/16 to 2021/22 \n", allGender)) + coord_cartesian(ylim = c(10, 60)) + scale_y_continuous(limits = c(10, 60)) + @@ -191,7 +177,7 @@ createApsTimeSeries <- function(dfAps, instGroup, instType, allGender) { axis.title = element_text(size = 12), legend.text = element_text(size = 12), axis.text.x = element_text(angle = 300), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth = 1.0) ) finalFig <- (fig1 + fig2 + plot_layout(widths = c(0.7, 2)) & @@ -208,7 +194,7 @@ createApsFmTimeSeries <- function(dfApsFm, instGroup, instType, fmGender) { validate(need(dfApsFm$school_type, message = "To view chart select between 1 and 4 institution types from the drop-down menu at the top page.")) fmFig <- ggplot(dfApsFm, aes( - x = year, y = aps_2016_2022, + x = year, y = aps_2016_2023, color = school_type )) + geom_line(stat = "identity", linewidth = 1.5) + @@ -222,7 +208,7 @@ createApsFmTimeSeries <- function(dfApsFm, instGroup, instType, fmGender) { arrow = arrow(length = unit(0.03, "npc"), type = "closed"), color = "black", size = .05, angle = 90 ) + - geom_label(aes(label = aps_grade_2016_2022, y = aps_2016_2022), show.legend = F) + + geom_label(aes(label = aps_grade_2016_2023, y = aps_2016_2023), show.legend = F) + ggtitle(paste0("Average point score and grade \n", fmGender)) + coord_cartesian(ylim = c(10, 60)) + scale_x_continuous(breaks = seq(2016, 2023, 1)) + @@ -245,7 +231,7 @@ createApsFmTimeSeries <- function(dfApsFm, instGroup, instType, fmGender) { axis.title = element_text(size = 12), legend.text = element_text(size = 12), axis.text.x = element_text(angle = 300), - axis.line = element_line(size = 1.0) + + axis.line = element_line(linewidth = 1.0) + expand_limits(x = 0, y = 0) ) fmFig @@ -283,7 +269,7 @@ createGenderGap <- function(dfApsGap, instGroup, instType) { axis.text.x = element_text(angle = 300), axis.title.x = element_blank(), axis.title.y = element_text(margin = margin(r = 10)), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth = 1.0) ) ggplotly(fig, tooltip = c("x", "y", "colour")) %>% config( @@ -335,7 +321,7 @@ createTimeSeriesSubject <- function(dfSubjectA, subAll, subName) { axis.text.x = element_text(angle = 300), axis.title.x = element_blank(), axis.title.y = element_text(margin = margin(r = 10)), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth = 1.0) ) + expand_limits(x = 0, y = 0) + ggtitle(paste0("\nA level entry count:\n ", subAll)) @@ -384,7 +370,7 @@ createTimeSeriesResult <- function(dfSubjectA, subAll, resAll, subName) { axis.text.x = element_text(angle = 300), axis.title.x = element_blank(), axis.title.y = element_text(margin = margin(r = 10)), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth = 1.0) ) + expand_limits(x = 0, y = 0) + ggtitle(paste0("\nA level cumulative percentage: ", resAll, "\n", subAll)) @@ -439,7 +425,7 @@ createTimeSeriesSubjectFm <- function(dfSubjectG, subByFm) { axis.text.x = element_text(angle = 300), axis.title.x = element_text(size = 10), axis.title.y = element_text(margin = margin(r = 12)), - axis.line = element_line(size = 1.0) + axis.line = element_line(linewidth = 1.0) ) + expand_limits(x = 0, y = 0) + ggtitle(paste0(" \n A level entry count\n ", subByFm)) @@ -499,3 +485,58 @@ createTimeSeriesResultFm <- function(dfSubjectG, subByFm, resByFm) { hovermode = "x" ) } + + +############################ Plot maths and science ############################################### + +createTimeSeriesSubjectMs <- function(dfSubjectMs, subByMs) { + validate(need(dfSubjectMs$subject, message = "To view chart select one subject and a start year from the drop-down menus at the top of the page.")) + + + fig <- dfSubjectMs %>% + rename(Year = "year", Percent = "percent_entered", Subject = "subject", Gender = "characteristic_gender") + fig <- ggplot( + fig, aes( + x = Year, y = Percent, + color = Gender + ) + ) + + geom_line(stat = "identity", linewidth = 1) + + # geom_point(size=1.5)+ + scale_x_log10(breaks = seq(2010, 2023, 1)) + + scale_y_continuous(labels = scales::comma) + + scale_color_manual( + # breaks = (dfSubjectG$charateristic_gender), + values = c("#3D3D3D", "#F46A25", "#12436D") + ) + + labs(x = "", y = "", color = "") + + theme_classic() + + theme( + legend.position = "", + text = element_text(size = 12), + legend.title = element_blank(), + plot.title = element_text(size = 10), + axis.text.x = element_text(angle = 300), + axis.title.x = element_text(size = 10), + axis.title.y = element_text(margin = margin(r = 12)), + axis.line = element_line(linewidth = 1.0) + ) + + expand_limits(x = 0, y = 0) + + ggtitle(paste0(" \n A level percent entry: " , subByMs)) + + ggplotly(fig, tooltip = c("x", "y", "colour")) %>% + config( + modeBarButtonsToRemove = c( + "zoom2d", "zoomIn2d", "zoomOut2d", "pan2d", "autoScale2d", + "resetScale2d", "hoverCompareCartesian", "drawrect", "select2d", "lasso2d", + "hoverClosestCartesian", "toggleSpikelines" + ), displaylogo = FALSE, + toImageButtonOptions = list(format = "svg", filename = "subjectMs_image") + ) %>% + layout( + xaxis = list(fixedrange = TRUE), yaxis = list(fixedrange = TRUE), + legend = list(orientation = "h", x = .2, y = -.3), + hovermode = "x" + ) +} + diff --git a/datafiles_log.csv b/datafiles_log.csv index 6c95ed1..255a68a 100644 --- a/datafiles_log.csv +++ b/datafiles_log.csv @@ -1,12 +1,6 @@ filename,status -data/la_maintained_schools_revenue_reserve_final.csv,published -data/date_format.csv,published -data/date_format.meta.csv,published -data/some_unpublished_data.csv,unpublished -data/alevel_attainmentV1.csv,published -data/all_attainmentV1.csv,published -data/all_level_timeseries_data_1996_to_2022V1.csv,published -data/aps_gender_gapV2.csv,unpublished -data/all_level_timeseries_data_1996_to_2022V2.csv,unpublished -data/all_attainmentV2.csv,unpublished -data/alevel_attainmentV2.csv,unpublished +alevel_attainment_with_rev2023.csv,unpublished +all_attainment_with_rev2023.csv,unpublished +all_alevel_timeseries_data_1996_to_2023rev.csv,unpublished +aps_gender_gap_with_rev2023.csv,unpublished +maths_science_2010_2023rev.csv,unpublished diff --git a/global.R b/global.R index 5e4b4b2..414a88c 100644 --- a/global.R +++ b/global.R @@ -13,7 +13,7 @@ shhh <- suppressPackageStartupMessages # It's a library, so shhh! shhh(library(shiny)) # shhh(library(shinya11y)) shhh(library(shinyjs)) -shhh(library(tools)) +#shhh(library(tools)) shhh(library(testthat)) shhh(library(shinytest)) shhh(library(shinydashboard)) @@ -33,7 +33,7 @@ shhh(library(hrbrthemes)) shhh(library(forcats)) shhh(library(patchwork)) shhh(library(readr)) -shhh(library(dfeshiny)) +#shhh(library(dfeshiny)) # Functions --------------------------------------------------------------------------------- @@ -169,28 +169,29 @@ homeEconomics <- dfAlevelSubject %>% # Read in A level aggregate APS and grade by institution type + data <- read_alevel_aps_data() dfAlevelAps <- data %>% rename( - aps_2016_2022 = "aps_per_entry_2016_2022", aps_grade_2016_2022 = "aps_per_entry_grade_2016_2022", aps_2013_2015 = "aps_per_entry_2013_2015", + aps_2016_2023 = "aps_per_entry", aps_grade_2016_2023 = "aps_per_entry_grade", aps_2013_2015 = "aps_per_entry_2013_2015", aps_grade_2013_2015 = "aps_per_entry_grade_2013_2015" ) %>% select( - time_period, year, school_type, school_type_group, number_of_students, aps_2016_2022, aps_2013_2015, aps_grade_2016_2022, aps_grade_2013_2015, - characteristic_gender, time_period, year_2016_2022, year_2013_2015, version + time_period, year, school_type, school_type_group, number_of_students, aps_2016_2023, aps_2013_2015, aps_grade_2016_2023, aps_grade_2013_2015, + characteristic_gender, time_period, year, year_2013_2015, version ) %>% mutate( - aps_grade_2016_2022 = as.factor(aps_grade_2016_2022), + aps_grade_2016_2023 = as.factor(aps_grade_2016_2023), aps_grade_2013_2015 = as.factor(aps_grade_2013_2015), - aps_2016_2022 = round(as.numeric(aps_2016_2022), 2), + aps_2016_2023 = round(as.numeric(aps_2016_2023), 2), aps_2013_2015 = round(as.numeric(aps_2013_2015), 2), characteristic_gender = as.factor(characteristic_gender), school_type = as.factor(school_type), school_type_group = as.factor(school_type_group), version = as.factor(version), school_type = as.factor(recode(school_type, - "All schools and FE sector colleges" = "All Institutions", - "All state-funded schools and colleges" = "All state-funded" + "All schools and FE sector colleges" = "All Institutions", + "All state-funded schools and colleges" = "All state-funded" )) ) @@ -209,8 +210,8 @@ fmDiff <- dfApsGenderGap %>% mutate( gender_gap = round(as.numeric(gender_gap), 1), school_type = as.factor(recode(school_type, - "All schools and FE sector colleges" = "All Institutions", - "All state-funded schools and colleges" = "All state-funded" + "All schools and FE sector colleges" = "All Institutions", + "All state-funded schools and colleges" = "All state-funded" )) ) @@ -237,11 +238,26 @@ dfAttainment <- dfAttainmentRaw %>% version = as.factor(version), cert_type = as.factor(cert_type), school_type = as.factor(recode(school_type, - "All schools and FE sector colleges" = "All Institutions", - "All state-funded schools and colleges" = "All state-funded" + "All schools and FE sector colleges" = "All Institutions", + "All state-funded schools and colleges" = "All state-funded" )), cert_type = as.factor(recode(cert_type, "Alevel" = "A level")) ) %>% group_by(school_type, cert_type) %>% arrange(desc(year), .by_group = TRUE) %>% ungroup() + + +############################################################################################################# +# Maths Science attainment + + +dfMsRaw <- read_all_ms_data() + +dfMs<-dfMsRaw%>% + mutate(subject=as.factor(subject), + characteristic_gender=as.factor(characteristic_gender), + version=as.factor(version))%>% + filter(!subject %in% c("Five Maths/Science subjects" , "Six Maths/Science subjects", "Total Students")) + + diff --git a/ui.R b/ui.R index 1eaacde..f0c679e 100644 --- a/ui.R +++ b/ui.R @@ -115,6 +115,7 @@ ui <- function(input, output, session) { well = FALSE, homepage_panel(), dashboard_panel_aps(), + dashboard_panel_ms(), dashboard_panel_sub_all(), dashboard_panel_sub_fm(), flow_panel(),