gpw13 / billionaiRe

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

Change scenario_best_of to also compute the scenarios instead of just comparing them #36

Open mjkanji opened 2 years ago

mjkanji commented 2 years ago

It would be great and make our code far less verbose if scenario_best_of would compute the different scenarios alongside comparing them. I'm thinking we could pass in three different lists as arguments:

And it would then compute everything.

@ElliottMess Thoughts?

ElliottMess commented 2 years ago

That sounds like a good improvement indeed to make the code more readable.

The list of data frames might indeed be superfluous as df is an argument to all scenario functions.

This would make the function much more complicated to use for external users though, as passing lists to functions is a bit out of the most common pipeline for tidyverse users. So it would be great to maintain the current usage, if possible.