ProjectDrawdown / solutions

The mission of Project Drawdown is to help the world reach “Drawdown”— the point in the future when levels of greenhouse gases in the atmosphere stop climbing and start to steadily decline, thereby stopping catastrophic climate change — as quickly, safely, and equitably as possible.
https://www.drawdown.org/
Other
211 stars 91 forks source link

smartglass solution #512

Closed sutjin closed 2 years ago

sutjin commented 2 years ago

Deep test showing error but only on less than 10% of the rows for Unit Adoption Calculations

denised commented 2 years ago

I took a look at this one, because Smartglass didn't use to have an error. I figured out what was different. It is a minor, somewhat inconsequential issue, but for the purpose of (a) keeping the tests passing and (b) learning a bit more about how to deal with weirdness in the code, I'm going to push it back to you and let you fix it.

The Unit Adoption table that is kicking up errors is simply a restatement of the TAM. The errors are only in column two, which is to say, the OECD region. Looking at the TAM page in Excel, it becomes clear that the same data is in the World table and in the OECD table --- this is strange ,but comments in the source names lead you to a different tab that explains what they are doing. (Still a questionable approach, IMO, but that is a different discussion.) If you look at the Unit Adoption Table in the Excel, you see that the World column and the OECD column have exactly the same output values. Hence they are being calculated in the same way. The python code is clearly not doing the same calculation -- the question is why, and how can it be fixed. It turns out this is not something that the extractor currently even looks for, but it is in bright red on the TAM configuration sheet. You can override the TAM configuration values to do the right thing.

sutjin commented 2 years ago

@denised - noted, I will remove the additional scenario and review that problem