gpw13 / billionaiRe

Calculate the WHO Triple Billions
https://gpw13.github.io/billionaiRe/
GNU General Public License v3.0
7 stars 4 forks source link

fh is not transformed properly #35

Closed ElliottMess closed 2 years ago

ElliottMess commented 2 years ago

fh is not inverted by transform_uhc_data when it should be. This has no impact on calculations as calculate_uhc_billion inverts it before use.

For clarity in the code, the indicator should be inverted in transform_uhc_billion and calculate_uhc_billion should be modified.

ElliottMess commented 2 years ago

While investigating this issue, it was found that the absence of transformation of fh produced inacurate results since the introduction of the function to billionaire.

Indeed the calculation of UHC contribution to the billion work on transformed value. As fh was not transformed properly, the contribution were reversed. This had no impact on the dashboard as the fh contributions are not displayed and that the uhc_sm indicator was always calculated correctly.

pull requet #42 fixes the problem. Waiting for the integration of #38 and #40 to integrate into main.

ElliottMess commented 2 years ago

Solved by #42