Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
rsconnect
data/sql_export*
data/export*
data/enrolment*
data/enrolment*
.positai
5 changes: 4 additions & 1 deletion R/dashboard_panels.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ homepage_panel <- function() {
column(
12,
h1("Pupil attendance and absence in schools in England"),
textOutput("source_version_release")
div(
class = "govuk-body-s govuk-!-margin-bottom-4",
textOutput("source_version_release")
)
),

## Left panel -------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions R/gov_colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# https://meyerweb.com/eric/tools/color-blend/#FFBF47:B10E1E:3:hex gov red to yellow

map_gov_colours <- c(
"#FFBF47",
"#EC933D",
"#D86733",
"#C53A28",
"#B10E1E"
"#fecc5c",
"#fd8d3c",
"#f03b20",
"#bd0026",
"#800026"
)

# Test the palette
Expand Down
28 changes: 10 additions & 18 deletions R/line_formatters.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ headline_bullet <- function(
comparator_name <- paste(
"the",
region_la_lookup |>
filter(la_name == la_name_in) |>
pull(region_name)
dplyr::filter(la_name == la_name_in) |>
dplyr::pull(region_name)
) |>
stringr::str_replace("the London", "London")
} else if (geographic_level == "Regional") {
Expand All @@ -26,30 +26,22 @@ headline_bullet <- function(
area_string <- ""
comparator_level <- NULL
}

paste(
paste0(
value |>
as.numeric() |>
dfeR::round_five_up(dp = 1),
"%"
),
render_percents(value),
"of",
subject,
"were recorded as",
statistic_name,
area_string,
ifelse(
!is.null(comparator_level),
if (!is.null(comparator_level)) {
paste0(
"(compared to ",
comparator_value |>
as.numeric() |>
dfeR::round_five_up(dp = 1),
"% of sessions in ",
comparator_name,
")"
),
render_percents(comparator_value),
" of sessions in ", comparator_name, ")"
)
} else {
""
)
}
)
}
11 changes: 3 additions & 8 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
render_percents <- function(values) {
dfeR::round_five_up(
as.numeric(
values
),
dp = 1
sprintf(
"%.2f%%",
dfeR::round_five_up(as.numeric(values), dp = 2)
) |>
paste0(
"%"
) |>
stringr::str_replace("NA%", "x")
}
495 changes: 0 additions & 495 deletions data/EES_aut_data.csv

This file was deleted.

139,841 changes: 90,425 additions & 49,416 deletions data/EES_daily_data.csv

Large diffs are not rendered by default.

495 changes: 0 additions & 495 deletions data/EES_spr_data.csv

This file was deleted.

495 changes: 0 additions & 495 deletions data/EES_sum_data.csv

This file was deleted.

9,885 changes: 0 additions & 9,885 deletions data/EES_weekly_data.csv

This file was deleted.

Loading
Loading