Wrote a payouts NPM package for the notebooks

Said stab is starting to look pretty usable.

I’ve created a new repo GitHub - sourcecred/payouts: Tooling to generate payout data from SourceCred.

Which is published to NPM as @sourcecred/payouts - npm

And I’ve refactored the week2 payouts notebook to use it:

There are some discrepancies between it and the original:

  • In the Fast Payouts table, the “% cred” column was incorrect in the original.
    {name: "% cred", fn: (a) => fastPayout.get(a) / totalFastPayout, format: percentFormat}
    This fastPayout and totalFastPayout represent mana, not cred.
  • In the Slow Payouts table, the “Target total payout” column had a rounding issue.
    The original used Math.round() when displaying and used the sum of unrounded values for the total. The new version uses Math.floor() for each user, and uses the sum of rounded values for the total.
2 Likes

Also, a request to include this repository in our instance.

Thanks @Beanow! I’ll use it for the next canonical grain distribution.