Skip to content

Commit

Permalink
Merge pull request #110 from dfe-analytical-services/05Dec24LiveData
Browse files Browse the repository at this point in the history
Updating dashboard with data for 19 Dec publication.
  • Loading branch information
t-surtees authored Dec 19, 2024
2 parents 492c738 + f7e40ac commit 0bd636b
Show file tree
Hide file tree
Showing 33 changed files with 71,139 additions and 59,015 deletions.
52,688 changes: 28,814 additions & 23,874 deletions data/EES_daily_data.csv

Large diffs are not rendered by default.

10,614 changes: 5,801 additions & 4,813 deletions data/EES_weekly_data.csv

Large diffs are not rendered by default.

982 changes: 491 additions & 491 deletions data/EES_ytd_data.csv

Large diffs are not rendered by default.

64,566 changes: 35,247 additions & 29,319 deletions data/attendance_data_dashboard.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion global.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ google_analytics_key <- "DG7P4WLB0Y"

#### SECTION 1 - date filters ####
start_date <- as.Date("2024-09-09")
end_date <- as.Date("2024-11-22")
end_date <- as.Date("2024-12-06")
# funeral_date <- as.Date("2022-09-19")
# strike_date_1 <- as.Date("2023-02-01")
# strike_date_2 <- as.Date("2023-03-15")
Expand Down
37 changes: 31 additions & 6 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -497,28 +497,29 @@
},
"dfeshiny": {
"Package": "dfeshiny",
"Version": "0.5.1",
"Version": "0.5.3",
"Source": "GitHub",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteUsername": "dfe-analytical-services",
"RemoteRepo": "dfeshiny",
"RemoteRef": "bff6fef6be5049c7a4a41b350244dba6320ecd7c",
"RemoteSha": "bff6fef6be5049c7a4a41b350244dba6320ecd7c",
"RemoteRef": "main",
"RemoteSha": "8c345bf079b6a5b4d93d2c5ca1be077d21fd761a",
"Requirements": [
"R",
"RCurl",
"checkmate",
"glue",
"htmltools",
"lubridate",
"magrittr",
"shiny",
"shinyGovstyle",
"shinyjs",
"stringr",
"styler"
],
"Hash": "5d235ed45e2b4c8a6892f157c3117b04"
"Hash": "9967c01468b897c3da0530f2688fd5f6"
},
"diffobj": {
"Package": "diffobj",
Expand Down Expand Up @@ -986,6 +987,19 @@
],
"Hash": "b8552d117e1b808b09a832f589b79035"
},
"lubridate": {
"Package": "lubridate",
"Version": "1.9.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"generics",
"methods",
"timechange"
],
"Hash": "680ad542fbcf801442c83a6ac5a2126c"
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.3",
Expand Down Expand Up @@ -1482,7 +1496,7 @@
},
"shiny": {
"Package": "shiny",
"Version": "1.9.1",
"Version": "1.10.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand Down Expand Up @@ -1511,7 +1525,7 @@
"withr",
"xtable"
],
"Hash": "6a293995a66e12c48d13aa1f957d09c7"
"Hash": "4b4477baa9a939c5577e5ddb4bf01f28"
},
"shinyGovstyle": {
"Package": "shinyGovstyle",
Expand Down Expand Up @@ -1820,6 +1834,17 @@
],
"Hash": "829f27b9c4919c16b593794a6344d6c0"
},
"timechange": {
"Package": "timechange",
"Version": "0.3.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cpp11"
],
"Hash": "c5f3c201b931cd6474d17d8700ccb1c8"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.54",
Expand Down
9 changes: 6 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1504,9 +1504,10 @@ server <- function(input, output, session) {
# as.Date(attendance_date) + 38

# paste0("Data was last updated on 2024-11-07 and is next expected to be updated on 2024-11-21. The latest full week of data for this breakdown was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on 2024-08-08. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on 2025-01-09. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
})

output$update_dates2 <- renderText({
Expand All @@ -1529,9 +1530,10 @@ server <- function(input, output, session) {
# as.Date(attendance_date) + 38

# paste0("Data was last updated on 2024-11-07 and is next expected to be updated on 2024-11-21. The latest full week of data for this breakdown was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on 2024-08-08. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on 2025-01-09. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
})


Expand All @@ -1554,9 +1556,10 @@ server <- function(input, output, session) {
# as.Date(attendance_date) + 38

# paste0("Data was last updated on 2024-11-07 and is next expected to be updated on 2024-11-21. The latest full week of data for this breakdown was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on ", next_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on ", last_update_date, ". The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
# paste0("Data was last updated on 2024-08-08. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
paste0("Data was last updated on ", last_update_date, " and is next expected to be updated on 2025-01-09. The latest full week of data was the week commencing ", most_recent_fullweek_date, ".")
})


Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/UI_tests/001.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"ts_choice": "latestweeks"
},
"output": {
"daily_schools_count": "20,699 schools provided information on the latest full day of data, i.e. 2024-11-22",
"headline_update_date": "Data was last updated on 2024-12-05.",
"homepage_update_dates": "Data was last updated on 2024-12-05 and is next expected to be updated on 2024-12-19. The latest full week of data was the week commencing 2024-11-18."
"daily_schools_count": "20,754 schools provided information on the latest full day of data, i.e. 2024-12-06",
"headline_update_date": "Data was last updated on 2024-12-19.",
"homepage_update_dates": "Data was last updated on 2024-12-19 and is next expected to be updated on 2025-01-09. The latest full week of data was the week commencing 2024-12-02."
}
}
Binary file modified tests/testthat/_snaps/UI_tests/001_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 37 additions & 37 deletions tests/testthat/_snaps/UI_tests/002.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"automargin": true,
"title": "Date",
"tickvals": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"zeroline": true,
"zerolinewidth": 2,
Expand Down Expand Up @@ -107,18 +107,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
5.4545213828530299,
6.04247807642954,
5.1930911159677002,
5.3869841773920202,
6.7041565394155196
6.0604555657966701,
5.53973817554182,
5.3650021633073202,
5.5774299868237902,
6.6001033560993596
],
"line": {
"color": "#12436D"
Expand Down Expand Up @@ -151,18 +151,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
4.2893135589562199,
4.4448737580918003,
4.0282845963313996,
4.2433596665407096,
5.1972555284992401
4.6968495759020303,
4.3826951814084802,
4.1836512538617701,
4.3375301221204898,
5.0325498768929
],
"line": {
"color": "#28A197"
Expand Down Expand Up @@ -195,18 +195,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
1.16520782389681,
1.59760431833774,
1.1648065196363,
1.1436245108513099,
1.5069010109162799
1.36360598989464,
1.15704299413334,
1.1813509094455601,
1.2398998647032999,
1.56755347920646
],
"line": {
"color": "#F46A25"
Expand Down Expand Up @@ -349,9 +349,9 @@
}
]
},
"headline_bullet_title_nat": "Headline figures for the latest week - 2024-11-18 to 2024-11-22: primary state-funded school attendance at national level",
"headline_bullet_title_nat": "Headline figures for the latest week - 2024-12-02 to 2024-12-06: primary state-funded school attendance at national level",
"weekly_absence_rate_nat": "• 5.8% of sessions were recorded as absence",
"weekly_attendance_rate_nat": "• 94.2% of sessions were recorded as attending",
"weekly_illness_rate_nat": "• 3.7% of sessions were recorded as illness"
"weekly_illness_rate_nat": "• 3.8% of sessions were recorded as illness"
}
}
Binary file modified tests/testthat/_snaps/UI_tests/002_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 39 additions & 39 deletions tests/testthat/_snaps/UI_tests/003.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"automargin": true,
"title": "Date",
"tickvals": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"zeroline": true,
"zerolinewidth": 2,
Expand Down Expand Up @@ -107,18 +107,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
7.6391345131069404,
8.6867678688695804,
7.9474269866366098,
8.1369497771917896,
9.5280698023351498
8.6239539512600505,
8.4995650497769208,
8.4986421456394599,
8.75973625356675,
9.9550220338940196
],
"line": {
"color": "#12436D"
Expand Down Expand Up @@ -151,18 +151,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
4.9502942956015703,
5.4913976788694399,
5.1015103604097201,
5.2433284689809501,
6.0742602768008203
5.6037590642943496,
5.5871699185140598,
5.5372618581474704,
5.6681062183491404,
6.3718532489564597
],
"line": {
"color": "#28A197"
Expand Down Expand Up @@ -195,18 +195,18 @@
"mode": "markers+lines",
"type": "scatter",
"x": [
"2024-11-18",
"2024-11-19",
"2024-11-20",
"2024-11-21",
"2024-11-22"
"2024-12-02",
"2024-12-03",
"2024-12-04",
"2024-12-05",
"2024-12-06"
],
"y": [
2.6888402175053701,
3.1953701900001401,
2.8459166262268898,
2.89362130821084,
3.45380952553433
3.0201948869656898,
2.9123951312628602,
2.9613802874919899,
3.0916300352175998,
3.58316878493756
],
"line": {
"color": "#F46A25"
Expand Down Expand Up @@ -349,9 +349,9 @@
}
]
},
"headline_bullet_title_nat": "Headline figures for the latest week - 2024-11-18 to 2024-11-22: secondary state-funded school attendance at national level",
"weekly_absence_rate_nat": "• 8.4% of sessions were recorded as absence",
"weekly_attendance_rate_nat": "• 91.6% of sessions were recorded as attending",
"weekly_illness_rate_nat": "• 4% of sessions were recorded as illness"
"headline_bullet_title_nat": "Headline figures for the latest week - 2024-12-02 to 2024-12-06: secondary state-funded school attendance at national level",
"weekly_absence_rate_nat": "• 8.9% of sessions were recorded as absence",
"weekly_attendance_rate_nat": "• 91.1% of sessions were recorded as attending",
"weekly_illness_rate_nat": "• 4.3% of sessions were recorded as illness"
}
}
Binary file modified tests/testthat/_snaps/UI_tests/003_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0bd636b

Please sign in to comment.