fineprint-global/fabio

Can't calculate supply shares

Opened this issue · 2 comments

nk027 commented

It's not always possible to calculate "the percentage of total supply of each commodity supplied by each country", since the aggregated totals are not really invertible.
See also https://github.com/martinbruckner/fabio/blob/13108760d86926906e7956630cf38fa8c7147e36/R/fabio_2d_Trade_linking_USE.R#L64

Anecdotally the following commodities are problematic: "c079" "c014" "c109", as well as the following areas: 1 57 154 256 272 273 276 277.

nk027 commented

Same goes for the transformation matrices.

Of course x / rowSums(x) will give NA where rowSums(x)==0.
In my view, that's not a problem. We don't need supply shares if a good is not used in a country at all.