Closed nk027 closed 4 years ago
The column is now constructed as:
cbs[, balancing := na_sum(total_supply, -stock_addition, -exports, -food, -feed, -seed, -losses, -processing, -other)]
This means negatives are in there. Positive values (after rebalancing) of it are moved to other columns: https://github.com/nk027/fabio/blob/034815a73ab1a13140a1032e1c1a36b1c7ad5298/R/2_build_cbs.R#L210
See also #33 and #32.
We currently balance the CBS via the balance column - formerly it was computed as
total_supply - uses
wheretotal_supply < uses
. Then we allocate the remainder of total_supply.I'll recode
balance = total_supply - uses
and allocate positive values as before. Negative values will remain for now.