Closed zross closed 3 years ago
I'm not clear on what you mean by "is only meant to affect the length base indicators". If the user filters based on min record, then the Data table is filtered and this affects all the plots. This is how it works with the current application and the re-write. How do you want it to work?
This is correct. but now that I am thinking more about this, let's make it simpler for the user and remove the min records data slider completely. We can add a hard filter on the data that is use to draw Size Proportion. So for the plot_size_proportion.R function, could you add another filter to achieve at least 100 counts per species per month. This is the minimum number of counts required to say something meaningful about this indicator.
OK. Here is what I did (you can click on the commit directly above to see this):
But questions:
@zross great! may answers to the last two points:
1) Correct, the filter should select only those species that have at least 100 records per month. So yes, we need include an aggregation in the plot_size_proportions function. The filter may look something like this...
.data <- .data %>% dplyr::filter(species %in% sel_species) %>% dplyr::filter(!is.na(count)) %>% dplyr::group_by(year month) %>% dplyr::filter(sum(count) >= 100)) %>% droplevels()
2) Correct, the filter also applies to the size structure plot.
In #6 you mention:
This is fine, but does it affect the data being shown on the Data tab? So basically I'm confirming: