data = Object.assign(
await splitgraph`SELECT country_of_import AS key, sum(COALESCE(commodity_deforestation, 0)) AS value
FROM "trase/supply-chains"."supply-chains"
WHERE scale = 'SUBNATIONAL'
AND country_of_production = 'INDONESIA'
AND commodity = 'PALM OIL'
AND year = '2015'
AND economic_bloc = 'EUROPEAN UNION'
GROUP BY country_of_import
ORDER BY value DESC`.then(res =>
res.map(d => ({ ...d, key: titleCase(d.key) }))
),
{ x: "Palm oil deforestation risk" }
)