Skip to content

Commit

Permalink
2019 after rebase
Browse files Browse the repository at this point in the history
katie-aisling committed Dec 12, 2024
1 parent 1fd2e57 commit 6a42e9d
Showing 12 changed files with 2,654 additions and 541 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,8 +5,5 @@
.Ruserdata
*unpublished*
2019_rr/*
data/2019_shadow_l3va_step5_outputs.xlsx
data/2019_shadow_l3va_step5_outputs_Rversion.xlsx
data/2019A_l3va_step5_outputs_Rversion.xlsx
data/2023U_l3va_step5_outputs_Rversion.xlsx

511 changes: 470 additions & 41 deletions R/dashboard_panels.R

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions R/read_data.R
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ func_read_multiplesheets <- function(workbook) {
# assigning names to data frames
names(data_frame) <- sheet_names

# print data frame
print(data_frame)
# print(data_frame)
return(data_frame)
}


Binary file added data/2019A_l3va_step5_outputs_Rversion.xlsx
Binary file not shown.
Binary file removed data/2019_l3va_step5_outputs.xlsx
Binary file not shown.
Binary file removed data/2019_shadow_l3va_step5_outputs.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions data/pupil_upload_template.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unique_identifier,forename,surname,gender,cohort_code,cohort_name,qualification_code,qualification_name,subject_code,subject_name,size,qual_id,prior_attainment,actual_points,disadvantaged_status
5 changes: 1 addition & 4 deletions datafiles_log.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
filename,status
data/2019_shadow_l3va_step5_outputs.xlsx,unpublished
data/2019_shadow_l3va_step5_outputs_Rversion.xlsx,unpublished
data/2019A_l3va_step5_outputs_Rversion.xlsx,unpublished
data/2019A_l3va_step5_outputs_Rversion.xlsx,published
data/2023U_l3va_step5_outputs_Rversion.xlsx,unpublished
data/pupil_upload_template.csv,published
data/2019_l3va_step5_outputs.xlsx,published
71 changes: 8 additions & 63 deletions global.R
Original file line number Diff line number Diff line change
@@ -57,6 +57,9 @@ round2 <- function(x, n) {
}


# Function defined for not in -------------------------------------
`%not_in%` <- purrr::negate(`%in%`)




@@ -112,74 +115,16 @@ source("R/read_data.R")
# -----------------------------------------------------------------------------------------------------------------------------
# ---- read in the ready reckoner data from the Excel spreadsheet ----
# -----------------------------------------------------------------------------------------------------------------------------
data <- func_read_multiplesheets("data/2019_shadow_l3va_step5_outputs.xlsx")

data <- func_read_multiplesheets("data/2019A_l3va_step5_outputs_Rversion.xlsx")

template_data <- read.csv("data/pupil_upload_template.csv")

# -----------------------------------------------------------------------------------------------------------------------------
# ---- tidy RR data and sort data types ----
# -----------------------------------------------------------------------------------------------------------------------------

colnames(data$national_bands) <- to_snake_case(colnames(data$national_bands))
colnames(data$subject_variance) <- to_snake_case(colnames(data$subject_variance))
colnames(data$qualification_variance) <- to_snake_case(colnames(data$qualification_variance))
colnames(data$points_lookup) <- to_snake_case(colnames(data$points_lookup))
colnames(data$subject_chart) <- to_snake_case(colnames(data$subject_chart))
colnames(data$qualid_lookup) <- to_snake_case(colnames(data$qualid_lookup))
colnames(data$gnumber_lookup) <- to_snake_case(colnames(data$gnumber_lookup))
colnames(data$disadvantaged_variance) <- to_snake_case(colnames(data$disadvantaged_variance))

data$national_bands <- data$national_bands %>%
mutate(
qual_id = as.character(qual_id)
) %>%
rename(
avg_prior_x_0 = prior_min,
avg_prior_x_21 = prior_max,
avg_outcome_y_0 = outcome_min,
avg_outcome_y_21 = outcome_max
)

colnames(data$national_bands) <- gsub(".*prior_", "", colnames(data$national_bands))
colnames(data$national_bands) <- gsub(".*outcome_", "", colnames(data$national_bands))

data$subject_variance <- data$subject_variance %>% mutate(
qual_id = as.character(qual_id),
qual_co_id = as.character(qual_co_id),
sublevno = as.character(sublevno),
subject_code = as.character(subject_code),
exam_cohort = as.character(exam_cohort)
)
data$qualification_variance <- data$qualification_variance %>% mutate(
qual_co_id = as.character(qual_co_id),
sublevno = as.character(sublevno)
)
data$points_lookup <- data$points_lookup %>% mutate(
qualification_code = as.character(qualification_code)
)
data$subject_chart <- data$subject_chart %>% mutate(
qual_id = as.character(qual_id),
exam_cohort = as.character(exam_cohort),
sublevno = as.character(sublevno),
subject_code = as.character(subject_code)
)
data$qualid_lookup <- data$qualid_lookup %>% mutate(
qual_id = as.character(qual_id),
qualification_code = as.character(qualification_code),
subject_code = as.character(subject_code),
size = as.character(size)
)
data$gnumber_lookup <- data$gnumber_lookup %>% mutate(
qual_id = as.character(qual_id),
qualification_number = as.character(qualification_number),
qualification_code = as.character(qualification_code),
subject_code = as.character(subject_code)
)
data$disadvantaged_variance <- data$disadvantaged_variance %>% mutate(
qual_id = as.character(qual_id),
exam_cohort = as.character(exam_cohort),
sublevno = as.character(sublevno)
)
# -----------------------------------------------------------------------------------------------------------------------------
# ---- other ----
# -----------------------------------------------------------------------------------------------------------------------------

expandable <- function(inputId, label, contents) {
govDetails <- shiny::tags$details(
59 changes: 43 additions & 16 deletions renv.lock
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
},
"MASS": {
"Package": "MASS",
"Version": "7.3-60",
"Version": "7.3-61",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
@@ -46,11 +46,11 @@
"stats",
"utils"
],
"Hash": "a56a6365b3fa73293ea8d084be0d9bb0"
"Hash": "0cafd6f0500e5deba33be22c46bf6055"
},
"Matrix": {
"Package": "Matrix",
"Version": "1.6-3",
"Version": "1.7-1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
@@ -63,7 +63,7 @@
"stats",
"utils"
],
"Hash": "1d1b6901cf9b6b1b446bc56a7d47efa4"
"Hash": "5122bb14d8736372411f955e1b16bc8a"
},
"R.cache": {
"Package": "R.cache",
@@ -139,6 +139,18 @@
],
"Hash": "45f0398006e83a5b10b72a90663d8d8c"
},
"RCurl": {
"Package": "RCurl",
"Version": "1.98-1.16",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"bitops",
"methods"
],
"Hash": "ddbdf53d15b47be4407ede6914f56fbb"
},
"Rcpp": {
"Package": "Rcpp",
"Version": "1.0.13-1",
@@ -216,6 +228,13 @@
],
"Hash": "e84984bf5f12a18628d9a02322128dfd"
},
"bitops": {
"Package": "bitops",
"Version": "1.0-9",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "d972ef991d58c19e6efa71b21f5e144b"
},
"brio": {
"Package": "brio",
"Version": "1.1.5",
@@ -329,13 +348,13 @@
},
"codetools": {
"Package": "codetools",
"Version": "0.2-19",
"Version": "0.2-20",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "c089a619a7fae175d149d89164f8c7d8"
"Hash": "61e097f35917d342622f21cdc79c256e"
},
"colorspace": {
"Package": "colorspace",
@@ -418,20 +437,28 @@
},
"dfeshiny": {
"Package": "dfeshiny",
"Version": "0.1.1",
"Version": "0.5.2",
"Source": "GitHub",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteUsername": "dfe-analytical-services",
"RemoteRepo": "dfeshiny",
"RemoteRef": "437c6e4c60b5eb9c1f55333588b65110d47b7ba2",
"RemoteSha": "437c6e4c60b5eb9c1f55333588b65110d47b7ba2",
"RemoteRef": "main",
"RemoteSha": "91f1eb3cbac6e1d2ba64300e22a36c95a73dda25",
"Requirements": [
"R",
"RCurl",
"checkmate",
"glue",
"htmltools",
"magrittr",
"shiny",
"shinyGovstyle",
"shinyjs",
"stringr",
"styler"
],
"Hash": "8b41a1f9eb64dd5bb3ba1b0edf73cb53"
"Hash": "7735cc512edb4955f58dfa2ed4307dce"
},
"diffobj": {
"Package": "diffobj",
@@ -865,7 +892,7 @@
},
"mgcv": {
"Package": "mgcv",
"Version": "1.9-0",
"Version": "1.9-1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
@@ -878,7 +905,7 @@
"stats",
"utils"
],
"Hash": "086028ca0460d0c368028d3bda58f31b"
"Hash": "110ee9d83b496279960e162ac97764ce"
},
"mime": {
"Package": "mime",
@@ -903,7 +930,7 @@
},
"nlme": {
"Package": "nlme",
"Version": "3.1-163",
"Version": "3.1-166",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
@@ -913,7 +940,7 @@
"stats",
"utils"
],
"Hash": "8d1938040a05566f4f7a14af4feadd6b"
"Hash": "ccbb8846be320b627e6aa2b4616a2ded"
},
"openssl": {
"Package": "openssl",
@@ -1463,7 +1490,7 @@
},
"testthat": {
"Package": "testthat",
"Version": "3.2.1.1",
"Version": "3.2.2",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
@@ -1488,7 +1515,7 @@
"waldo",
"withr"
],
"Hash": "3f6e7e5e2220856ff865e4834766bf2b"
"Hash": "6773967afbe2f74c87021e72c1bb05c0"
},
"tibble": {
"Package": "tibble",
2,490 changes: 2,100 additions & 390 deletions server.R

Large diffs are not rendered by default.

51 changes: 29 additions & 22 deletions ui.R
Original file line number Diff line number Diff line change
@@ -66,15 +66,15 @@ ui <- function(input, output, session) {
href = "dfefavicon.png"
),
# Add title for browser tabs
tags$title("DfE Shiny Template")
tags$title("16-18 Ready Reckoner")
),
use_shiny_title(),
tags$html(lang = "en"),
# Add meta description for search engines
meta() %>%
meta_general(
application_name = "DfE Shiny Template",
description = "DfE Shiny Template",
application_name = "16-18 Ready Reckoner",
description = "16-18 Ready Reckoner",
robots = "index,follow",
generator = "R-Shiny",
subject = "stats development",
@@ -103,40 +103,47 @@ ui <- function(input, output, session) {
href = "dfe_shiny_gov_style.css"
)
),
shinyGovstyle::cookieBanner("DfE R-Shiny dashboard template"),
shinyGovstyle::cookieBanner("16-18 Ready Reckoner"),
shinyGovstyle::header(
main_text = "",
main_link = "https://www.gov.uk/government/organisations/department-for-education",
secondary_text = "DfE Shiny Template",
secondary_text = "16-18 Ready Reckoner",
logo = "images/DfE_logo_landscape.png",
logo_width = 150,
logo_height = 32
),
shinyGovstyle::banner(
"beta banner",
"beta",
paste0(
"This Dashboard is in beta phase and we are still reviewing performance
and reliability. "
)
),
# shinyGovstyle::banner(
# "beta banner",
# "beta",
# paste0(
# "This Dashboard is in beta phase and we are still reviewing performance
# and reliability. ",
# "In case of slowdown or connection issues due to high demand, we have
# produced two instances of this site which can be accessed at the
# following links: ",
# "<a href=", site_primary, " id='link_site_1'>Site 1</a> and ",
# "<a href=", site_overflow, " id='link_site_2'>Site 2</a>."
# )
# ),
shiny::navlistPanel(
"",
id = "navlistPanel",
widths = c(2, 8),
well = FALSE,
homepage_panel(),
data_upload_panel(),
data_checking_panel(),
student_va_panel(),
national_chart_panel()
# dashboard_panel(),
# homepage_panel(),
# a11y_panel(),
# support_panel(
# team_email = "statistics.development@education.gov.uk",
# repo_name = "https://github.com/dfe-analytical-services/shiny-template",
# form_url = "https://forms.office.com"
# )
subject_va_panel(),
cohort_va_panel(),
a11y_panel(),
support_panel(
team_email = "attainment.statistics@education.gov.uk",
repo_name = "https://github.com/dfe-analytical-services/16-18-ready-reckoners",
publication_name = "A level and other 16 to 18 results",
publication_slug = "a-level-and-other-16-to-18-results"
# form_url = "https://forms.office.com"
)
),
tags$script(
src = "script.js"

0 comments on commit 6a42e9d

Please sign in to comment.