2DegreesInvesting / tiltIndicator

Indicators for the TILT project
https://2degreesinvesting.github.io/tiltIndicator/
GNU General Public License v3.0
1 stars 1 forks source link

At company level perserve unmatched products via 6 benchmarks #729

Closed maurolepore closed 4 months ago

maurolepore commented 4 months ago

Merges into #639

This PR adds into the same value the NAs due to missing benchmarks and the NAs due to unmatched products. This way we account for both types of NAs with the same 6-benchmarks we already have.

reprex: https://bit.ly/tiltIndicator-729

@Tilmon I requested your review to touch base with you on my progress. But I'm still now ready to merge because I want to add more tests and refactoring.

--

TODO (myself)


TODO

EXCEPTIONS

Tilmon commented 4 months ago

Hi @maurolepore, I reviewed the reprex and have two comments:

https://github.com/2DegreesInvesting/tiltIndicator/pull/639#issuecomment-1953045737

This changes the general structure of the output. Before each level of grouped_by mapped to the same number of levels of risk_category -- originally 3 ("high", "medium", and "low") and now 4 ("high", "medium", "low", NA). Now in the new output 6 of the 7 levels of grouped_by map to 4 levels of risk_category ("high", "medium", "low", NA) whereas a 7th level of grouped_by ("not_matched") maps to only one level of risk_category (NA).

tt04. Hence, I suggest we stick to the solution (https://gist.github.com/maurolepore/657d59fff496889e99cddf724d673a92) for now, if you can confirm my presumption articulated in the question under bullet "OK". And then we can discuss whether / how to fix the inconsistency outlined in "BAD" with @AnneSchoenauer next week.

Thanks for your efforts to make me understand the problems! Let me know what you think!

maurolepore commented 4 months ago

tt02. On company-level the value {where} risk_category {is} NA {and} grouped_by is "all" tells us how many results are unmatched? ... I.e., the NA share for {"all"} indicates the share of unmatched products?

Correct. I agree with your interpretation.

tt04. I suggest we stick to the solution (https://gist.github.com/maurolepore/657d59fff496889e99cddf724d673a92) for now, if you can confirm my presumption articulated in the question under bullet "OK" {tt02}.

Great. Soon I'll merge what we currently have. Then open new issues to work on what's missing.