brightwind-dev/brightwind

[freq_table] Use coverage threshold input also for basic method

BiancaMorandi opened this issue · 1 comments

As discussed in #298 we want to be able to filter out months based on data coverage not only when applying a seasonal adjustment (as done for #334 ) but also when using the basic method. Note that this must not be a breaking change, so default coverage threshold should be set to a value that for basic method will give same results as current method.

As part of this issue we should also update freq_table to use a standard function for checking coverage and raising warnings or errors describing method used for filtering months based on coverage. This function was already generated as part of #298 .

When var_series and direction_series coverage is not the same as for example below, the monthly coverage used for filtering was based only on the var_series and not direction_series. This bug has been fixed now and the minimum coverage between var_series and direction_series is now used.

graph, result_seas = bw.freq_table(var_series, direction_series['2017-07-01':'2017-08-01'], seasonal_adjustment=True, return_data=True)