Skip to content

Commit

Permalink
smoothly change geo filters and fish family filters with no errors (a…
Browse files Browse the repository at this point in the history
…side from issue #10)
  • Loading branch information
ibidyouadu committed Aug 12, 2021
1 parent 00e773a commit 1b7f977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 5 additions & 4 deletions R/mod_side_display.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ sidebarDisplayServer <- function(id, rv){
),
pickerInput(ns('sel_family'),
'Fish family',
choices = get_display_choices(rv$sel_country, rv$data_full),
selected = get_display_choices(rv$sel_country, rv$data_full),
choices = get_display_choices(rv$sel_maa, rv$data_full),
selected = get_display_choices(rv$sel_maa, rv$data_full),
options = list(
`actions-box` = TRUE,
`selected-text-format` = "count > 3"
Expand Down Expand Up @@ -89,8 +89,9 @@ sidebarDisplayServer <- function(id, rv){
observeEvent(rv$sel_maa, {
updatePickerInput(
session,
ns('sel_family'),
choices = get_display_choices(rv$sel_maa, rv$data_full)
'sel_family',
choices = get_display_choices(rv$sel_maa, rv$data_full),
selected = get_display_choices(rv$sel_maa, rv$data_full)
)
})

Expand Down
3 changes: 0 additions & 3 deletions R/mod_side_geography.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ sidebarGeoServer <- function(id, rv){
rv$sel_maa <- input$sel_maa
rv$data_filtered <- rv$data_full %>%
dplyr::filter(ma_name %in% input$sel_maa)
# country == input$sel_country,
# level1_name %in% input$sel_subnational,
# level2_name %in% input$sel_local,
rv$data_aggreg <- get_biomass(rv$data_filtered, 'biomass_kg_ha')
rv$data_map <- get_biomass_loc(rv$data_aggreg)
# rv$data_map <- aggregate(cbind(lat, lon) ~
Expand Down

0 comments on commit 1b7f977

Please sign in to comment.