Rare-Technology / FMA_Dashboard

Fisheries Management Assessment Tool
https://portal.rare.org/en/tools-and-data/fma/
MIT License
0 stars 1 forks source link

Filtering to counts > 100 means few have plots #35

Closed zross closed 3 years ago

zross commented 3 years ago

@abelvaldivia I've added the count > 100 per month code to the plot_size_proportions.R and plot_size_structure.R plot code. See below. This seems to be working except it means that few plots show up since few species meet the requirement.

  .data <- .data %>%
    dplyr::filter(species %in% sel_species) %>%
    dplyr::group_by(yearmonth) %>% 
    dplyr::filter(sum(count, na.rm = TRUE) > 100) %>% 
    dplyr::ungroup() %>% 
    droplevels()
abelvaldivia commented 3 years ago

Yes, that is correct, and that is what we need. Unfortunately, that means we need to add something like this "Not enough data available for this plot" for those species with no enough data. Alternatively, we can use this selection to update the Family/Species dropdown menu ..... but I think this is more complicated.

zross commented 3 years ago

I've added the "There was not enough data to create the plot", it's there now so I'll close this.