torv72 / torv-reports-v4

1 stars 0 forks source link

Seasonal filter for OM testing #9

Closed z3tt closed 4 months ago

z3tt commented 5 months ago

It would be great to be able to filter the data shown in the trendline visualizations and the heatmap table by seasons, .e.g. to only show spring which makes more sense for comparison. As there is only one measurement event per season, change the labels from months to seasons.

Seasons are defined as spring (Mar 1 to May 31), summer (Jun 1 to Aug 31), and autumn (Sep 1 to Nov 30). There is no testing in winter but we may add this option anyway just to have it if needed for some reason.

Note that the executive summary also needs to reflect this filter in the stats and should name the season used.

These changes only apply to the OM testing section, no filtering for all others!

z3tt commented 4 months ago

generate_report() gains a new argument .om_seasons which can be specified as:

The filtering is implemented within the OM calculation step (om-calculations.R) and directly applied to the general OM data object all_om_data to ensure that the same data is used across all OM sections and to avoid code repetitions.