Skip to content

Commit

Permalink
Merge pull request #28 from dfe-analytical-services/octupdate
Browse files Browse the repository at this point in the history
Total December 2024 update
  • Loading branch information
rmbielby authored Dec 5, 2024
2 parents efc338a + 1c5480a commit ce839e1
Show file tree
Hide file tree
Showing 28 changed files with 335 additions and 267 deletions.
25 changes: 0 additions & 25 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,4 @@

source("renv/activate.R")

# Tidy code function
tidy_code <- function() {
source("global.r")
tidy_code_function()
}

# Function to run tests
run_tests_locally <- function() {
Sys.unsetenv("http_proxy")
Sys.unsetenv("https_proxy")
source("global.r")
# message("================================================================================")
# message("== testthat ====================================================================")
# message("")
# testthat::test_dir("tests/testthat")
# message("")
message("================================================================================")
message("== shinytest ===================================================================")
message("")
shinytest2::test_app()
message("")
message("================================================================================")
}

# Install commit-hooks locally
statusWriteCommit <- file.copy(".hooks/pre-commit.R", ".git/hooks/pre-commit", overwrite = TRUE)
20 changes: 8 additions & 12 deletions .github/workflows/deploy-shiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- development
pull_request:


name: deploy-shiny

jobs:
Expand All @@ -19,20 +20,15 @@ jobs:

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.4.1
use-public-rspm: true

- name: Set env vars (dev)
if: endsWith(github.ref, '/development')
run: |
echo "SHINYAPP_NAME='dev-ks4-ready-reckoners'" >> $GITHUB_ENV
- name: Set env vars (prod)
if: endsWith(github.ref, '/main')
run: |
echo "SHINYAPP_NAME='ks4-ready-reckoners'">> $GITHUB_ENV
- name: Install git2r dependencies
run: sudo apt-get install -y libgit2-dev
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Restore renv snapshot
shell: Rscript {0}
Expand Down
2 changes: 1 addition & 1 deletion .hooks/pre-commit.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (error_flag) {
}


tidy_output <- tidy_code()
tidy_output <- dfeshiny::tidy_code()
if(any(tidy_output)){
error_flag <- TRUE
}
Expand Down
19 changes: 9 additions & 10 deletions R/dashboard_panels.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ homepage_panel <- function() {
p("The aim of this is to help the user understand how we arrive at a value added score for their school.
The ready reckoner allows the user to input the value added scores in Progress 8 or any of its
elements, for all pupils in their school. These value added scores can be copied and pasted directly
from the pupil level file on the ", a(href = "https://tableschecking.education.gov.uk/", "checking site.")),
from the pupil level file on the ", a(href = "https://check-your-performance-measures-data.education.gov.uk/hc/en-gb", "checking site.")),
h4("The EBacc subject pupil ready reckoner."),
p("The aim of this is to help the user to understand how we arrive at a value added score for their pupil.
The ready reckoner allows the user to input, for an individual pupil, their key stage 2 prior attainment
Expand All @@ -30,7 +30,7 @@ homepage_panel <- function() {
p("The aim of this is to help the user understand how we arrive at a value added score for their school.
The ready reckoner allows the user to input the value added scores in any of the three subject areas
in the English Baccalaureate, for all pupils in their school. These value added scores can be copied
and pasted directly from the pupil level file on the ", a(href = "https://tableschecking.education.gov.uk/", "checking site.")),
and pasted directly from the pupil level file on the ", a(href = "https://check-your-performance-measures-data.education.gov.uk/hc/en-gb", "checking site.")),
h3("How to use this app"),
tags$ol(
tags$li("Select the 'School ready reckoner' or 'Pupil ready reckoner' tab from the left side bar."),
Expand Down Expand Up @@ -64,12 +64,12 @@ dashboard_panel <- function() {
class = "border-0",
p(
strong("Please download a csv file your school's pupil scores from "),
a(href = "https://tableschecking.education.gov.uk/", "https://tableschecking.education.gov.uk/", .noWS = c("after")),
a(href = "https://check-your-performance-measures-data.education.gov.uk/hc/en-gb", "https://check-your-performance-measures-data.education.gov.uk/hc/en-gb", .noWS = c("after")),
strong(" and upload the file here:")
),
fileInput("user_input_VA",
label = NULL,
# (a(href="https://tableschecking.education.gov.uk/", "https://tableschecking.education.gov.uk/ and upload the file here:")),
# (a(href="https://check-your-performance-measures-data.education.gov.uk/hc/en-gb", "https://check-your-performance-measures-data.education.gov.uk/hc/en-gb and upload the file here:")),
multiple = FALSE,
accept = c("text/csv", "text/comma-separated-values", ".csv")
),
Expand Down Expand Up @@ -392,15 +392,14 @@ dashboard3_panel <- function() {
card_body(
p(
"You can download an Excel file containing all of the ",
a(href = "https://content.explore-education-statistics.service.gov.uk/api/releases/90c95fb2-f2a1-4723-aba8-09c4b6e231a5/files/65a7f69f-f21b-4001-883f-247f13ebc971", "model values tables here.")
a(href = "https://explore-education-statistics.service.gov.uk/find-statistics/key-stage-4-performance#explore-data-and-files", "model values tables in the 'Additional supporting files' section here.")
),
p("Each Attainment 8 average is the average Attainment 8 score of all pupils nationally in
state-funded mainstream schools within the same prior attainment group at KS2. The
following table shows the revised Attainment 8 averages for each KS2 prior
attainment group, based on the 2023 cohort averages."),
## p("Changes to national subject entry patterns and performance, as well as changes to the
## methodology and grading as a result of COVID-19 this year will cause these averages to
## change in future years."),
attainment group, based on the 2024 cohort averages."),
p("Changes to national subject entry patterns and performance will cause these averages to
change in future years."),
p("Schools may change their curriculum offer in response to the
Progress 8 measure and to the Government’s EBacc ambition, so any modelling based
on current national results could be misleading."),
Expand Down Expand Up @@ -433,7 +432,7 @@ dashboard3_panel <- function() {
defaultColDef = colDef(format = colFormat(digits = 2))
),
("For more information on these tables, please click here for the"),
(a(href = "https://assets.publishing.service.gov.uk/media/652fad41d0666200131b7c47/Secondary_accountability_measures_-_2023_guidance_for_maintained_secondary_schools__academies_and_free_schools.pdf", "Secondary Accountability measures document."))
(a(href = "https://www.gov.uk/government/publications/progress-8-school-performance-measure", "Secondary Accountability measures document."))
)
)
)
Expand Down
68 changes: 34 additions & 34 deletions data/ebac_att8_splits.csv
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
KS2 prior attainment group,KS2 average scaled score range,Science average,Humanities average,Languages average
1,59 to 82,1.79,1.62,4.31
2,82.5 to 86,1.7,1.43,3.17
3,86.5 to 87.5,1.96,1.63,3.12
4,88 to 89,2.12,1.74,3.39
5,89.5 to 90.5,2.25,1.89,3.35
6,91 to 92,2.4,1.98,3.31
7,92.5 to 93,2.54,2.14,3.34
8,93.5 to 94,2.68,2.28,3.36
9,94.5 to 95,2.8,2.38,3.35
10,95.5 to 96,2.92,2.53,3.43
11,96.5 to 97,3.05,2.64,3.45
12,97.5 to 98,3.22,2.82,3.5
13,98.5 to 99,3.38,2.98,3.62
14,99.5 to 100,3.54,3.15,3.67
15,100.5 to 101,3.7,3.33,3.73
16,101.5 to 102,3.89,3.53,3.84
17,102.5 to 103,4.05,3.74,3.91
18,103.5 to 104,4.26,4.01,4.06
19,104.5 to 105,4.44,4.21,4.19
20,105.5 to 106,4.67,4.46,4.28
21,106.5 to 107,4.95,4.77,4.48
22,107.5 to 108,5.22,5.07,4.63
23,108.5 to 109,5.5,5.37,4.88
24,109.5 to 110,5.78,5.67,5.1
25,110.5 to 111,6.03,5.92,5.29
26,111.5 to 112,6.34,6.24,5.59
27,112.5 to 113,6.65,6.53,5.84
28,113.5 to 114,6.91,6.79,6.1
29,114.5 to 115,7.19,7.02,6.35
30,115.5 to 116,7.45,7.28,6.66
31,116.5 to 117,7.7,7.51,6.91
32,117.5 to 118,7.88,7.68,7.1
33,118.5 to 119,8.13,7.88,7.4
34,119.5 to 120,8.33,8.09,7.67
1,59 to 82,1.83,1.72,4.36
2,82.5 to 86,1.78,1.5,3.23
3,86.5 to 87.5,2.01,1.7,3.22
4,88 to 89,2.15,1.84,3.31
5,89.5 to 90.5,2.3,1.92,3.21
6,91 to 92,2.43,2.07,3.38
7,92.5 to 93,2.55,2.19,3.37
8,93.5 to 94,2.66,2.26,3.32
9,94.5 to 95,2.8,2.42,3.3
10,95.5 to 96,2.94,2.53,3.44
11,96.5 to 97,3.04,2.62,3.48
12,97.5 to 98,3.21,2.81,3.55
13,98.5 to 99,3.36,2.97,3.66
14,99.5 to 100,3.52,3.17,3.7
15,100.5 to 101,3.68,3.33,3.79
16,101.5 to 102,3.84,3.53,3.82
17,102.5 to 103,4.05,3.75,3.97
18,103.5 to 104,4.24,3.99,4.1
19,104.5 to 105,4.45,4.23,4.24
20,105.5 to 106,4.68,4.5,4.4
21,106.5 to 107,4.92,4.76,4.53
22,107.5 to 108,5.21,5.09,4.8
23,108.5 to 109,5.47,5.39,5
24,109.5 to 110,5.72,5.65,5.2
25,110.5 to 111,6.01,5.96,5.46
26,111.5 to 112,6.28,6.25,5.71
27,112.5 to 113,6.57,6.5,5.96
28,113.5 to 114,6.86,6.81,6.3
29,114.5 to 115,7.13,7.05,6.49
30,115.5 to 116,7.41,7.29,6.79
31,116.5 to 117,7.66,7.51,7.07
32,117.5 to 118,7.87,7.69,7.28
33,118.5 to 119,8.12,7.92,7.59
34,119.5 to 120,8.33,8.13,7.79
68 changes: 34 additions & 34 deletions data/ebac_pupil_modelvalues_file.csv
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
ks2emss_grp,sciest,humest,lanest
1,1.79,1.62,4.31
2,1.7,1.43,3.17
3,1.96,1.63,3.12
4,2.12,1.74,3.39
5,2.25,1.89,3.35
6,2.4,1.98,3.31
7,2.54,2.14,3.34
8,2.68,2.28,3.36
9,2.8,2.38,3.35
10,2.92,2.53,3.43
11,3.05,2.64,3.45
12,3.22,2.82,3.5
13,3.38,2.98,3.62
14,3.54,3.15,3.67
15,3.7,3.33,3.73
16,3.89,3.53,3.84
17,4.05,3.74,3.91
18,4.26,4.01,4.06
19,4.44,4.21,4.19
20,4.67,4.46,4.28
21,4.95,4.77,4.48
22,5.22,5.07,4.63
23,5.5,5.37,4.88
24,5.78,5.67,5.1
25,6.03,5.92,5.29
26,6.34,6.24,5.59
27,6.65,6.53,5.84
28,6.91,6.79,6.1
29,7.19,7.02,6.35
30,7.45,7.28,6.66
31,7.7,7.51,6.91
32,7.88,7.68,7.1
33,8.13,7.88,7.4
34,8.33,8.09,7.67
1,1.83,1.72,4.36
2,1.78,1.5,3.23
3,2.01,1.7,3.22
4,2.15,1.84,3.31
5,2.3,1.92,3.21
6,2.43,2.07,3.38
7,2.55,2.19,3.37
8,2.66,2.26,3.32
9,2.8,2.42,3.3
10,2.94,2.53,3.44
11,3.04,2.62,3.48
12,3.21,2.81,3.55
13,3.36,2.97,3.66
14,3.52,3.17,3.7
15,3.68,3.33,3.79
16,3.84,3.53,3.82
17,4.05,3.75,3.97
18,4.24,3.99,4.1
19,4.45,4.23,4.24
20,4.68,4.5,4.4
21,4.92,4.76,4.53
22,5.21,5.09,4.8
23,5.47,5.39,5
24,5.72,5.65,5.2
25,6.01,5.96,5.46
26,6.28,6.25,5.71
27,6.57,6.5,5.96
28,6.86,6.81,6.3
29,7.13,7.05,6.49
30,7.41,7.29,6.79
31,7.66,7.51,7.07
32,7.87,7.69,7.28
33,8.12,7.92,7.59
34,8.33,8.13,7.79
,,,
,,,
,,,
Expand Down
2 changes: 1 addition & 1 deletion data/ebac_stdev_file.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scivastdev,humvastdev,lanvastdev
1.466372,1.796712,1.982004
1.456564513,1.775990694,1.95913665
2 changes: 1 addition & 1 deletion data/ebac_stdev_file_named.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Science VA,Humanities VA,Languages VA
1.466372,1.796712,1.982004
1.456564513,1.775990694,1.95913665
68 changes: 34 additions & 34 deletions data/p8_att8_splits.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
KS2 prior attainment group,KS2 average scaled score range,Attainment 8 average,English average,Maths average,EBacc average,Open average,"Average EBacc slots filled
(out of 3)","Average open slots filled
(out of 3)"
1,59 to 82,15.86,3.81,2.29,4.19,5.56,1.870689,2.06226
2,82.5 to 86,16.47,4.08,2.38,4.14,5.88,2.084684,2.229025
3,86.5 to 87.5,19.27,4.75,3.04,4.9,6.59,2.243386,2.353174
4,88 to 89,20.77,5.03,3.35,5.34,7.05,2.327491,2.41777
5,89.5 to 90.5,22.19,5.36,3.64,5.77,7.41,2.398763,2.466471
6,91 to 92,23.86,5.66,4.08,6.21,7.91,2.459398,2.527004
7,92.5 to 93,25.69,6,4.51,6.74,8.45,2.528533,2.587171
8,93.5 to 94,27.01,6.33,4.8,7.09,8.79,2.549953,2.608199
9,94.5 to 95,28.21,6.57,5.11,7.43,9.1,2.585147,2.623882
10,95.5 to 96,29.79,6.89,5.46,7.91,9.53,2.634453,2.676082
11,96.5 to 97,31.11,7.14,5.79,8.3,9.88,2.65679,2.690871
12,97.5 to 98,33.09,7.53,6.22,8.89,10.45,2.714896,2.744659
13,98.5 to 99,34.64,7.82,6.61,9.36,10.86,2.720089,2.746568
14,99.5 to 100,36.39,8.17,6.96,9.91,11.35,2.75762,2.784937
15,100.5 to 101,38.08,8.47,7.37,10.44,11.8,2.781975,2.803645
16,101.5 to 102,39.9,8.81,7.76,11.04,12.28,2.799022,2.81907
17,102.5 to 103,41.57,9.14,8.11,11.59,12.73,2.810317,2.82757
18,103.5 to 104,43.73,9.55,8.55,12.3,13.33,2.832667,2.850308
19,104.5 to 105,45.55,9.9,8.91,12.92,13.83,2.85013,2.863645
20,105.5 to 106,47.77,10.3,9.41,13.66,14.41,2.869373,2.88122
21,106.5 to 107,50.41,10.75,9.97,14.59,15.1,2.889354,2.898192
22,107.5 to 108,52.87,11.2,10.49,15.43,15.76,2.901923,2.906626
23,108.5 to 109,55.6,11.67,11.11,16.35,16.47,2.918755,2.925137
24,109.5 to 110,58.25,12.13,11.67,17.26,17.19,2.927702,2.928155
25,110.5 to 111,60.63,12.56,12.17,18.04,17.86,2.93758,2.940001
26,111.5 to 112,63.4,13.02,12.76,19.02,18.59,2.943146,2.942439
27,112.5 to 113,66.17,13.47,13.38,19.95,19.37,2.954111,2.9528
28,113.5 to 114,68.6,13.91,13.88,20.77,20.05,2.961609,2.959774
29,114.5 to 115,71.02,14.25,14.49,21.59,20.7,2.97134,2.964582
30,115.5 to 116,73.33,14.63,14.95,22.35,21.4,2.97028,2.968141
31,116.5 to 117,75.6,15,15.41,23.11,22.08,2.974944,2.971961
32,117.5 to 118,77.51,15.39,15.76,23.68,22.68,2.983207,2.977366
33,118.5 to 119,79.77,15.73,16.28,24.4,23.36,2.984629,2.983061
34,119.5 to 120,81.97,16.19,16.62,25.01,24.16,2.983842,2.977558
1,59 to 82,15.96,3.86,2.39,4.36,5.34,1.861625,2.047967
2,82.5 to 86,16.63,4.18,2.5,4.37,5.58,2.115079,2.232176
3,86.5 to 87.5,19.01,4.76,3.07,4.99,6.19,2.233446,2.322784
4,88 to 89,20.78,5.14,3.45,5.49,6.7,2.330372,2.418635
5,89.5 to 90.5,22,5.37,3.75,5.86,7.02,2.385142,2.446627
6,91 to 92,23.7,5.73,4.16,6.33,7.47,2.448288,2.487132
7,92.5 to 93,25.02,6.02,4.48,6.68,7.84,2.477678,2.532943
8,93.5 to 94,26.42,6.34,4.82,7.05,8.22,2.54695,2.586391
9,94.5 to 95,27.65,6.55,5.13,7.44,8.53,2.565786,2.606296
10,95.5 to 96,29.12,6.81,5.51,7.91,8.88,2.610309,2.630383
11,96.5 to 97,30.24,7.03,5.78,8.2,9.23,2.632156,2.660826
12,97.5 to 98,32.3,7.46,6.24,8.82,9.78,2.683889,2.703024
13,98.5 to 99,33.78,7.73,6.56,9.29,10.19,2.704565,2.721245
14,99.5 to 100,35.46,8.06,6.95,9.81,10.64,2.730455,2.736297
15,100.5 to 101,37.27,8.39,7.31,10.39,11.17,2.770589,2.775039
16,101.5 to 102,38.94,8.72,7.68,10.9,11.65,2.787804,2.79439
17,102.5 to 103,41.02,9.1,8.13,11.59,12.2,2.812212,2.819874
18,103.5 to 104,42.97,9.47,8.52,12.23,12.75,2.828742,2.830649
19,104.5 to 105,45.12,9.85,8.97,12.95,13.35,2.852885,2.855155
20,105.5 to 106,47.45,10.28,9.45,13.74,13.98,2.872186,2.86914
21,106.5 to 107,49.76,10.7,9.93,14.51,14.63,2.886123,2.887517
22,107.5 to 108,52.57,11.17,10.53,15.48,15.39,2.905124,2.901213
23,108.5 to 109,55.3,11.66,11.08,16.38,16.17,2.923312,2.921284
24,109.5 to 110,57.6,12.06,11.56,17.16,16.81,2.931774,2.927516
25,110.5 to 111,60.22,12.5,12.12,18.06,17.54,2.936864,2.93055
26,111.5 to 112,62.86,12.99,12.63,18.91,18.33,2.948249,2.942948
27,112.5 to 113,65.46,13.39,13.2,19.81,19.07,2.952793,2.949855
28,113.5 to 114,68.16,13.82,13.77,20.73,19.83,2.96221,2.958969
29,114.5 to 115,70.6,14.23,14.29,21.53,20.55,2.970085,2.963521
30,115.5 to 116,73.15,14.6,14.9,22.35,21.3,2.97297,2.970405
31,116.5 to 117,75.46,14.95,15.42,23.1,21.99,2.977025,2.971379
32,117.5 to 118,77.26,15.26,15.77,23.69,22.54,2.976277,2.968514
33,118.5 to 119,79.74,15.7,16.26,24.42,23.36,2.984448,2.97945
34,119.5 to 120,82.03,16.14,16.71,25.02,24.15,2.987572,2.987572
Loading

0 comments on commit ce839e1

Please sign in to comment.