Skip to content

Commit

Permalink
Dev stat neigh (#23)
Browse files Browse the repository at this point in the history
* Chore: Move region dev scripts to own folder in dev

* Chore: Creating and starting dev workshop script for Stat neigh page

* Data: Updated Data dict for 0 dps

* Fix: Adding base family font specification to general_theme() for shinyapps io

* Fix: Use css to apply font to ggiraph plot

* Fix: Trying Arimo font loaded using gdtools

* Fix: Adding gfonts to renv

* Fix: Removed gdfonts method to get Arial in plots, using css

* Chore: Setting up the stat neigh page workshop script

* Chore: Remove merged gdtools method

* Chore: Updating support tab with feedback form and ading css to stop unecessary x-scroll appearing

* Chore: Logic to recreate static version of Stat Neigh page in dev workshop script

* Chore: Using stat_n_la to create areas for SN

* Chore: Adding Years_num calculation to global bds metrics

* Fix: Changing tooltip to use Years descriptor rather than years_num

* Chore: Updating LA workshop to use Years_num from global

* Chore: Using get_years in vlines function

* Tests: Updated LA screenshot tests

* Chore: Using Years_num from global in LA dev app and mod

* Chore: Updating regional and stat neigh workshop with Years_num from global

* Fix: Removing legacy measure col pull in get diff fn

* Chore: Updating Statistical neighbour LA numbers to -, convert LA number to chr in global

* Style: Formatting layout of stat neigh workshop script

* Feat: Added focus and multi-choice plot to stat neigh dev workshop

* Chore: Remove left padding in full screen app for more main panel space

* Tests: Updating LA screenshot tests
  • Loading branch information
JT-39 authored Oct 1, 2024
1 parent 3997ffe commit 4907aa9
Show file tree
Hide file tree
Showing 13 changed files with 1,664 additions and 1,364 deletions.
9 changes: 4 additions & 5 deletions 02_dev/la_level_page/la_dev_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,18 @@ server_dev <- function(input, output, session) {
dplyr::filter(`LA and Regions` %in% la_sns) |>
dplyr::summarise(
values_num = mean(values_num, na.rm = TRUE),
.by = c("Years")
.by = c("Years", "Years_num")
) |>
dplyr::mutate(
"LA Number" = NA,
"LA Number" = "-",
"LA and Regions" = "Statistical Neighbours",
.before = "Years"
)

# LA levels long
la_filtered_bds |>
dplyr::filter(`LA and Regions` %notin% c(la_sns)) |>
dplyr::select(`LA Number`, `LA and Regions`, Years, values_num) |>
dplyr::select(`LA Number`, `LA and Regions`, Years, Years_num, values_num) |>
dplyr::bind_rows(sn_avg) |>
dplyr::mutate(
`LA and Regions` = factor(
Expand All @@ -214,8 +214,7 @@ server_dev <- function(input, output, session) {
input$la_input, la_region_ldn_clean,
"Statistical Neighbours", "England"
)
),
Years_num = as.numeric(substr(Years, start = 1, stop = 4))
)
)
})

Expand Down
9 changes: 4 additions & 5 deletions 02_dev/la_level_page/la_page_features_workshop.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ sn_avg <- la_filtered_bds |>
dplyr::filter(`LA and Regions` %in% la_sns) |>
dplyr::summarise(
values_num = mean(values_num, na.rm = TRUE),
.by = c("Years")
.by = c("Years", "Years_num")
) |>
dplyr::mutate(
"LA Number" = NA,
"LA Number" = "-",
"LA and Regions" = "Statistical Neighbours",
.before = "Years"
)

# LA levels long
la_long <- la_filtered_bds |>
dplyr::filter(`LA and Regions` %notin% c(la_sns)) |>
dplyr::select(`LA Number`, `LA and Regions`, Years, values_num, Values) |>
dplyr::select(`LA Number`, `LA and Regions`, Years, Years_num, values_num, Values) |>
dplyr::bind_rows(sn_avg) |>
dplyr::mutate(
`LA and Regions` = factor(
Expand All @@ -73,8 +73,7 @@ la_long <- la_filtered_bds |>
selected_la, la_region_ldn_clean,
"Statistical Neighbours", "England"
)
),
Years_num = as.numeric(substr(Years, start = 1, stop = 4))
)
)

# Difference between last two years
Expand Down
Loading

0 comments on commit 4907aa9

Please sign in to comment.