Skip to content

Commit

Permalink
Removing old LA's from outcome 2
Browse files Browse the repository at this point in the history
  • Loading branch information
yauemily committed Mar 14, 2024
1 parent 151ba8d commit f5f6b18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/read_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,10 @@ read_cin_referral_data <- function(file = "data/c1_children_in_need_referrals_an
read_outcome2 <- function(file = "data/la_children_who_ceased_during_the_year.csv") {
read_data <- read.csv(file)
# Call remove old la data function to remove the old
final_filtered_data <- remove_old_la_data(read_data)
# final_filtered_data <- remove_old_la_data(read_data)
las_to_remove <- c("Poole", "Bournemouth", "Northamptonshire")

final_filtered_data <- read_data %>% filter(new_la_code != "E10000009", !la_name %in% las_to_remove)
ceased_cla_data <- final_filtered_data %>%
mutate(geo_breakdown = case_when(
geographic_level == "National" ~ "National", # NA_character_,
Expand Down
2 changes: 1 addition & 1 deletion server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ server <- function(input, output, session) {
observeEvent(eventExpr = {
input$select_geography_o2
}, {
choices <- sort(unique(ceased_cla_data[ceased_cla_data$geographic_level == input$select_geography_o2, "geo_breakdown"]), decreasing = FALSE)
choices <- sort(unique(ceased_cla_data[(ceased_cla_data$geographic_level == input$select_geography_o2 & ceased_cla_data$time_period == max(ceased_cla_data$time_period)), "geo_breakdown"]), decreasing = FALSE)

updateSelectizeInput(
session = session,
Expand Down

0 comments on commit f5f6b18

Please sign in to comment.