Summary
plot_frequencies_time_series() assumes that CI-related variables (event_frequency_ci_low, event_frequency_ci_upp) are present in the
input dataset and accesses them without validation.
Problem
In the advanced frequency functions, confidence interval variables are only added when ci_method is not None. Since ci_method=None is a valid and supported parameter value, datasets can legitimately be created without CI fields.
When such a dataset is passed to plot_frequencies_time_series(), the function raises a KeyError due to unconditional access of
missing variables.
Impact
This results in an unexpected runtime failure for a valid input configuration, reducing robustness in the plotting layer.
Suggested Direction
The plotting function could either:
- Gracefully handle datasets without CI variables (e.g., omit error bars), or
- Explicitly validate their presence and raise a clearer error message.