Skip to content

Commit

Permalink
Updated CLA rate data to not include old Dorset, Poole, Bournemouth a…
Browse files Browse the repository at this point in the history
…nd Northamptonshire
  • Loading branch information
PATERSON authored and PATERSON committed Mar 22, 2024
1 parent 6f212cd commit 286fbec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
8 changes: 4 additions & 4 deletions R/outcome2_page.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ outcome2_tab <- function() {
column(
width = 6,
value_box(
title = "Percentage of children who cease being looked after due to moving into Special Guardianship Order (SGO)",
title = "Percentage of children who cease being looked after due to Special Guardianship Order (SGO)",
value = htmlOutput("SGO_headline_txt")
)
),
column(
width = 6,
value_box(
title = "Percentage of children who cease being looked after due to moving into Residence order or Child Arrangement Order (CAO)",
title = "Percentage of children who cease being looked after due to Residence order or Child Arrangement Order (CAO)",
value = htmlOutput("CAO_headline_txt")
)
),
Expand All @@ -133,7 +133,7 @@ outcome2_tab <- function() {
),
accordion(
accordion_panel(
"Percentage of children who cease being looked after due to moving into Special Guardianship Order (SGO)",
"Percentage of children who cease being looked after due to Special Guardianship Order (SGO)",
gov_row(
h2("Special Guardianship Order (SGO)"),
# p("Unlocking family networks and kinship carers can be a key source of support where families are experiencing challenges.
Expand Down Expand Up @@ -193,7 +193,7 @@ The graph represents data from 2023."),
)
),
accordion_panel(
"Percentage of children who cease being looked after due to moving into Care Arrangement Order (CAO)",
"Percentage of children who cease being looked after due to child Arrangement Order (CAO)",
gov_row(
h2("Residence order or Child Arrangement Order (CAO)"),
p("Unlocking family networks and kinship carers can be a key source of support where families are experiencing challenges.
Expand Down
20 changes: 15 additions & 5 deletions R/read_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ read_workforce_data <- function(file = "data/csww_indicators_2017_to_2023.csv")
geographic_level == "Local authority" ~ la_name
)) %>%
select(
geographic_level, geo_breakdown, turnover_rate_fte, time_period, "time_period", "turnover_rate_fte", "absence_rate_fte",
geographic_level, geo_breakdown, country_code, region_code, new_la_code, turnover_rate_fte, time_period, "time_period", "turnover_rate_fte", "absence_rate_fte",
"agency_rate_fte", "agency_cover_rate_fte", "vacancy_rate_fte", "vacancy_agency_cover_rate_fte",
"turnover_rate_headcount", "agency_rate_headcount", "caseload_fte"
) %>%
# removing old Dorset
filter(new_la_code != "E10000009") %>%
distinct()

workforce_data <- convert_perc_cols_to_numeric(workforce_data)
Expand Down Expand Up @@ -168,7 +170,9 @@ read_workforce_eth_data <- function(file = "data/csww_role_by_characteristics_in
geographic_level, geo_breakdown, country_code, region_code, new_la_code, time_period,
"time_period", "geographic_level", "region_name", "role", breakdown_topic, breakdown,
inpost_FTE, inpost_FTE_percentage, inpost_headcount, inpost_headcount_percentage
)
) %>%
# removing old Dorset
filter(new_la_code != "E10000009")

workforce_ethnicity_data$new_la_code[workforce_ethnicity_data$new_la_code == ""] <- NA
workforce_ethnicity_data$region_code[workforce_ethnicity_data$region_code == ""] <- NA
Expand Down Expand Up @@ -196,7 +200,9 @@ read_workforce_eth_seniority_data <- function(file = "data/csww_role_by_characte
"time_period", "geographic_level", "region_name", "role", breakdown_topic, breakdown,
inpost_FTE, inpost_FTE_percentage, inpost_headcount, inpost_headcount_percentage
) %>%
filter(breakdown_topic == "Ethnicity major")
filter(breakdown_topic == "Ethnicity major") %>%
# removing old Dorset
filter(new_la_code != "E10000009")

workforce_ethnicity_seniority_data$new_la_code[workforce_ethnicity_seniority_data$new_la_code == ""] <- NA
workforce_ethnicity_seniority_data$region_code[workforce_ethnicity_seniority_data$region_code == ""] <- NA
Expand Down Expand Up @@ -441,7 +447,9 @@ read_cla_rate_data <- function(file = "data/cla_number_and_rate_per_10k_children
rate_per_10000 == "x" ~ NA,
TRUE ~ as.numeric(rate_per_10000)
)) %>%
filter(!is.na(rate_per_10000)) %>%
# filter(!is.na(rate_per_10000)) %>%
# removing old Dorset, Poole, Bournemouth, Northamptonshire
filter(!(new_la_code %in% c("E10000009", "E10000021", "E06000028", "E06000029"))) %>%
select(geographic_level, geo_breakdown, time_period, region_code, region_name, new_la_code, la_name, population_count, population_estimate, number, rate_per_10000) %>%
distinct()

Expand All @@ -463,7 +471,9 @@ read_cla_placement_data <- function(file = "data/la_children_who_started_to_be_l
percentage == "x" ~ NA,
TRUE ~ as.numeric(percentage)
)) %>%
filter(!is.na(percentage)) %>%
# filter(!is.na(percentage)) %>%
# removing old Dorset, Poole, Bournemouth, Northamptonshire
filter(!(new_la_code %in% c("E10000009", "E10000021", "E06000028", "E06000029"))) %>%
select(geographic_level, geo_breakdown, time_period, region_code, region_name, new_la_code, la_name, cla_group, characteristic, number, percentage) %>%
distinct()

Expand Down

0 comments on commit 286fbec

Please sign in to comment.