Transport makes up nearly 10% of all greenhouse gas emissions across the Indo-Pacific. But that percentage is very different for countries across the region.
viewof selectedCities = Inputs.search(allData, {
required: false,
columns: ["name"],
datalist: allData.map(x => x.name).sort(),
placeholder: "Search for a country",
format: n => n + " countr" + (n == 1 ? "y" : "ies")
})
viewof selectedView = Inputs.radio(
new Map([
["Total emissions", "gross_"],
["Emissions per person", "percapita_"]
]), {
value: "gross_"
})
selectedData = selectedCities.length == 1 ?
allData.filter(d => selectedCities.map(x => x.name).includes(d.name)) :
allData.filter(d => d.name == "Indo-Pacific region")
emissionsAll = selectedData[0][selectedView + "All emissions"]
emissionsTransport = selectedData[0][selectedView + "All transport emissions"]
// put headline figures into an array for the pie chart
pieChartData = [
{
name: "Transport: " + d3.format(".1%")(emissionsTransport / emissionsAll),
value: emissionsTransport
},
{
name: "Other sectors",
value: emissionsAll - emissionsTransport,
}
]
selectedCities.length == 1 ? md`## ${selectedCities[0].name.toUpperCase()}` :
selectedCities.length == 0 ? md`## INDO-PACIFIC REGION` :
md``
chartSuffix = selectedView == "gross_" ? "t" : "t p.p."
selectedData.length == 1 ? PieChart(pieChartData, {
name: d => d.name,
value: d => d.value,
width: 200,
height: 160,
innerRadius: 20,
outerRadius: 40, // defaults 0.5 * min(width, height)
// TODO - make this work with `tonnesOrKilos`
format: ".2s",
suffix: chartSuffix,
colors: ["#333333", "lightgrey"]
}) : null
selectedFigures = aq
.from(selectedData)
.select(aq.not("iso2", "iso3", "name"))
.fold(aq.all())
.params({ selectedView: selectedView })
.filter(d => op.startswith(d.key, selectedView))
.filter(d => !op.match(d.key, /_All/))
.derive({
frac: d => d.value / op.sum(d.value),
key: d => op.split(d.key, "_")[1]
})
.objects()
tonnesOrKilos = d =>
d > 1 ?
d3.format(".2s")(d) + "t" :
d3.format(".2s")(d * 1000000) + "g"
barChartVertical = Plot.plot({
marks: [
Plot.barY(selectedFigures, {
y: "value",
fill: "key",
}),
Plot.text(selectedFigures, Plot.dodgeX("right", Plot.stackY({
y: "value",
text: "key",
fill: "key",
stroke: "white",
strokeWidth: 4,
textAnchor: "start",
fontWeight: "bold"
}))),
Plot.tip(selectedFigures, Plot.pointerY(Plot.stackY({
y: "value",
fill: "key",
channels: {
"Subsector": "key",
"Percent": "frac"
},
format: {
"Percent": d => d3.format(".1%")(d),
"y": tonnesOrKilos,
"fill": null
}
})))
],
y: {
label: selectedView == "gross_" ? "Emissions" : "Emissions per person",
// TODO - switch to kg for smaller figures
tickFormat: tonnesOrKilos,
},
marginLeft: 50,
marginRight: 180,
style: {
fontFamily: "Roboto Condensed",
fontSize: 16
},
width: 300,
height: 400
})
micro = require("[email protected]")
micro.init({
awaitOpenAnimation: true,
awaitCloseAnimation: true
});
This map, as well as the analysis that underpins it, is available under a Creative Commons Attribution 4.0 licence.
Please acknowledge 360info and our data sources when you use them.
Copy and paste the following code:
<div style="aspect-ratio: 4 / 3; width: 100%; min-height: 680px; max-height: 680px">
<iframe
allow="fullscreen; clipboard-write self https://transport.360visuals.org"
allowfullscreen="true"
src="https://transport.360visuals.org/transport-emissions-ap"
title="Interactive: Transport emissions in the Indo-Pacific"
style="width:100%; height:100%; position: relative; top: 0; left: 0; border:none; background-color: white;" scrolling="no"></iframe>
</div>
This content is subject to 360info’s Terms of Use.
Visit the GitHub repository to:
The data for this graphic comes from Climate Trace, which independently tracks greenhouse gas emissions globally.
The graphic depicts how a country’s transport-related emissions compare to its overall greenhouse gas emissions, and how transport-related emissions break down into domestic and international aviation and shipping, as well as road and rail transport. You can see these in gross terms or in “per capita” terms (emissions per person), which allows for comparisons between larger and smaller countries.
The emissions are measured in units of tonnes of CO2 equivalent. The “equivalent” part is designed to account for other greenhouse gases by comparing the effect they would have on the climate over 100 years to that of carbon dioxide.
Note: In the pie chart, “mt” means millitonnes, or kilograms, not megatonnes (1 million tonnes).