Moving quarter reference period (DE) problems, in the charting functionality
Recently a function was implemented that allows the use of moving quarters reference period (DE) in dotstatsuite.
Currently, this function allows the program to interpret a TIME_PERIOD with the following format a TIME_PERIOD with the format date-period (for example: 2016-01-01/P3M) as a moving quarter reference period (DE) label.
This functionality works correctly for the tables.
However, a bug was evidenced when trying to graph the table with the tools offered by tools provided by dotstatsuite itself (DE).
The error consists of that the TIME_PERIOD variable is not correctly labelled on the x-axis of the graphs when using moving quarters reference period (DE).
Specifically, the value is not assigned to its corresponding moving quarters , but is instead assigned to a assigned to a specific month. As we have observed, the value is assigned to the month prior to the starting month of the moving quarter.
In order to better understand the problem, we show as an example the table "Tasa de desocupación nacional y regional, según sexo", which can be found at the following link:
SISCC .Stat Data Explorer • Tasa de desocupación nacional y regional, según sexo (ine.gob.cl)
The moving quarter reference period (DE) shown in the following image are:
TIME_PERIOD | Etiqueta | Valor |
2022-01-01/P3M | Ene – mar 2022 | 7,8 |
2022-02-01/P3M | Feb – abr 2022 | 7,7 |
2022-03-01/P3M | Mar – may 2022 | 7,8 |
2022-04-01/P3M | Abr – jun 2022 | 7,8 |
2022-05-01/P3M | May – jul 2022 | 7,9 |
2022-06-01/P3M | Jun – ago 2022 | 7,9 |
2022-07-01/P3M | Jul – sep 2022 | 8,0 |
2022-08-01/P3M | Ago – oct 2022 | 8,0 |
However, when the above table is plotted, the moving quarter reference period (DE) label is not observed on the X-axis.
Instead, a label corresponding to a month is observed. The month that is represented is the month before the initial month of the TIME_PERIOD.
For example, the value 7.75, which corresponds to the moving quarter Feb - Apr 2022 (2022-02-01/P3M), appears in the graph as 2022-Jan.