Natixar / natixar-frontend

The static front end of the Natixar SaaS platform
0 stars 5 forks source link

Incorrect Units in Total Emissions Stacked Area Chart #38

Closed lepeuvedic-natixar closed 3 months ago

lepeuvedic-natixar commented 5 months ago

Problem: The Total Emissions Stacked Area Chart is a continuous curve. Total Emissions as a function of time should be rising continuously given that the data set models a roughly stable consumption of natural gas. Instead the curve is stable and reflects instantaneous consumption: what is shown is the rate of emission (correct according to the requirements).

The problem is simple: it is impossible to tell what the emissions are without guessing using this chart.

Steps to Reproduce:

  1. Enter Dashboard
  2. Look at Total Emissions Chart, and try to compute emissions over a given period. You will have to integrate the curve along a portion of the X axis corresponding to the given period, and the result will be in time units (unspecified) times kgCO2eq, which is not what you expect (you expect an amount of emissions in kgCO2eq for the period). This means that the Y axis is incorrectly labelled in mass of emissions when it actually shows mass of emissions per unit of time. The unit of time is important, because it tells the user in what unit the time axis figures must be converted before carrying out the integration.

Desired Behavior: What was specified for this chart is the Emission Rate, which is the amount of GHG Emissions per unit of time. The chosen unit of time is always 1 year, so the unit is kg/t/kt/Mt/Gt CO2eq/year , where the prefix is automatically chosen based on the range of the Y-axis.

Note that this is a very long and complex unit, and the current (non standard) display where each tick is labelled with a full unit is unsightly at best. Handling irregular mass units is difficult, though. I suggest labelling the whole axis with a title "mass CO2eq/year" and keeping the kg/t/kt/Mt/Gt suffixes at the axis tick labels.

The selected convention is designed to avoid Y-axis scale changes as the detail is increased with smaller and smaller time steps. This is unlike the bar chart, which clearly shows absolute values for specific periods. In the bar chart, chosing a smaller time scale will result in roughly proportionally smaller amounts of emissions and a reduction of the Y axis range.

lepeuvedic commented 3 months ago

Postponing this one, which is tagged "bug", implies that the stacked are chart (the middle one in the dashboard), will have to be removed temporarily. It is not acceptable to display wrong data, and this chart as it is now cannot be interpreted at all.