-
Notifications
You must be signed in to change notification settings - Fork 21
Description
When filling forecasts for reports we create a new, expected datetime index for the forecast and use it to fill forecasts. This index uses the Report' parameter's start and end with the forecasts interval length and labeling convention. The code defining this index can be found here:
full_dt_index = pd.date_range( |
This works well when the forecasts timestamps are aligned with the expected index e.g. both the expected index and forecast index align on the hour every hour (00:00, 01:00, 02:00,...). It is common to add or subtract a small amount of time from the report start/end parameters to indicate the inclusion of the data point at start/end based on the labeling convention of the data e.g. a report for 1 hour interval ending labelled forecasts may start at 00:01 to exclude data for 00:00 which would contain data for 23:01-00:00.
However, when combined with our current forecast fill logic, the produced expected datetime index becomes offset from the expected index, e.g. (00:01, 01:01, 02:01,..) instead of (01:00, 02:00,...) and drops all data in an hour aligned forecast.
I think the expected behavior here should be to find the start of the forecast time index and extend it appropriately to within the start/end of the report, accounting for the forecast labeling convention, and use that to reindex the forecast and fill missing values from there.