Add selection feature for "Latest [..] periods" based on the Actual CC
As Frederik,
I want to select (manually or by default) and see the last [..] time periods available for the whole selected data,
So that I have a more concise preview table that is always up to date with latest available data even when accessing the view at a later point in time.
Functional specifications
-
Add a new alternative option to select the " Last [..] periods
" with mouse-over popup text "Latest available [e.g. 5] time periods within the other filter criteria
". The DE should use the time range within the dynamic data availability to calculate the appropriate start period taking into account the current time range selection. The calculation is as follow:-
X =
selected last [X] periods -
A =
dynamic data availability end period obtained without time period selection (or if that is not available then the actual data availability end period) -
B =
dynamic data availability start period obtained without time period selection (or if that is not available then the actual data availability start period) - If
A-X+1 > B
then start period submitted to NSI= A-X+1
- Else start period submitted to NSI
= B
- No end period must be sent to NSI
This option must be configurable as generic default in the DE, as well as for specific dataflows through a new config setting
lastNPeriods
inconfigs/<tenant>/data-explorer/settings.json
:"period": { "lastNPeriods": 5 }
and an annotation
LASTNPERIODS
:<common:Annotation> <common:AnnotationTitle>LASTNPERIODS=5</common:AnnotationTitle> <common:AnnotationType>DEFAULT</common:AnnotationType> </common:Annotation>
-
Behavior: the configuration in settings.json
is the default behavior applied to all dataflows for a given DE instance. If for the same instance, a dataflow contains the LASTNPERIODS
annotation, then its value overrides the default config. for this particular dataflow.
Example of a dataflow with the LASTNPERIODS
annotation:
-
structures OECD.GOV-DF_GOV_CORE_RESULTS-2.0-all-_With_LastNPeriods_annotation.xml
-
data OECD.GOV-DF_GOV_CORE_RESULTS-2.0-data.csv
If start_period and end_period are defined in the DEFAULT annotation and LASTNPERIODS is also defined as DEFAULT annotation of the dataflow or DSD, the LASTNPERIODS annotation should be used for the default view of the dataflow/DSD, the start_period and end_period default values are then ignored.
-
In the current " Last [..] periods
" feature, replace "periods
" by "time series values
" with mouse-over popup text "Latest available [e.g. 5] values per time series within the other filter criteria
".
Existing localisation can be directly updated as required.
-
In the Applied filters
, the previous feature will show the text "Last [..] time series values
" and the new feature will show the text "Last [..] periods
".
-
Superseding rules
- The 'Last X Periods' supersedes the 'Start Period' and 'End Period' settings, unless those are defined 'closer' to the dataflow (e.g., when 'Last X Periods' is defined in the DE conf. and the 'Start Period' or 'End Period' is defined in the dataflow annotation, or when when 'Last X Periods' is defined in the DSD annotation and the 'Start Period' or 'End Period' is defined in the dataflow annotation.
- The superseding is to be reflected in the DE display: Whenever 'Last X Periods' is applied then 'Start Period' and 'End Period' are to be set to "----" and greyed/inactivated.
- If 'Last X Periods' and 'Last X Time Series Values' are not applied then set X = "--".
- Whenever X = "--" then grey/inactivate the radio buttons and labels for 'Last X Periods' and 'Last X Time Series Values'.
-
Scope of the tenant config parameter "hasLastNObservations"
The config parameter define per space in the tenants.json file concerned only the Last N time series values.
The Last N periods is an filter option available in DE whatever the tenant config parameter "hasLastNObservations" is set to true or false.
If hasLastNObservations is set to false, then the "Last N Periods" option will be proprosed without radio button and the text will be center-aligned with the text box used to fill the number of end periods.
Design
New points:
- when we insert a new value in lastN => periods is selected by default
- when periods is applied: enable start/end
- if periods is applied and we change start-period (and|or) end-period , last n periods to be removed.
Data files with (start-period,end-period and lastNPeriods) annotation dataflow level: structure file data files
------------ ORIGINAL REQUEST --------->
We compare here the behavior of “s elect latest data” in version 7 with the behavior of “LASTNOBSERVATIONS” in version 8.In Version 7, we selected the last “13 months” by default.
For the dimension “Area”, we selected both “Belgium” and “Euro Area”:
And the resulting table is:
- Only data for “Belgium” is displayed because there is not any data for “Euro area” for the last 13 months (calculated from 2022-08).
In version 8, we use the annotation “LASTNOBSERVATIONS” to display the last “13 periods”. We have the following resulting table:
- In version 8, we have a different behavior as in version 7 even if the data available is the same one. We can notice in the picture above data covering more than 13 periods (here 26 in total) is in fact displayed within the table: 13 periods for “each different series”. For "Belgium" series, the 13 periods start from 2021-08 till 2022-08 while for “Euro Area” series data is displaying from 2018-06 till 2019-06, so also covering 13 periods. We do not especially find this table “clear”.
****Request: is it possible to have a similar functionality as in version 7? Data from only the last N periods would be displayed: in our example, only data of the last 13 periods calculated from the last period is shown: from 2021-08 till 2022-08. ****
- Remark: in fact, to have the same resulting table as in version 7, LASTNOBSERVATIONS annotation must be used together with TIME_PERIOD_START/TIME_PERIOD_END. o In our example, if we use a TIME_PERIOD_START > 2019-06, the table looks like in version 7 :
- But this obligation to define a TIME PERIOD during which the last N observations must only be shown is not really “suitable” in our case. Indeed, in our default view, we automatically load new data every month for each new and future period (2022-09, 2022-10…). Our default view evolves therefore through time. It means the period during which the last N observations must be shown should also “slide” to the newly added periods: always 13 periods to display but calculated from the last added period. How can we do that if TIME_PERIOD_START will not be updated each time data concerning a new period is uploaded?