Open nk027 opened 4 years ago
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.
"c079" "c014" "c109"
1 57 154 256 272 273 276 277
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.
x / rowSums(x)
NA
rowSums(x)==0
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
.