Skip to content

Carbon Snapshot - Interactive Emissions Dashboard

A web dashboard, written entirely in Python, that lets anyone explore who emits how much, and from which activity: pick countries, years, sectors or subsectors, or simply click the map, the treemap or a bar, and every chart, figure and table updates together.

Team project Python Dash Plotly Data visualisation Carbon accounting

Context: team project for the coding module of the MBA in Technology Management at TUHH / NIT Hamburg · Presented: 5 July 2025, as Carbon Snapshot: Emissions Dashboard · Data: the open Climate TRACE emissions inventory, country level · Delivered: a working Dash application and a 23-slide technical walkthrough of its code.

155,476emission records combined into one table
252countries and territories
9 · 58sectors and subsectors, from power to rice cultivation
2015-2024ten years of emissions, in billion tonnes of CO₂e
4 + 3linked filters, plus three charts that filter when clicked
1callback that keeps every chart, figure and table in sync

The question

Emissions data is public, but it sits in dozens of separate files, one per sector, with hundreds of thousands of rows. Which countries and activities matter most, and how is that changing? A spreadsheet cannot answer that interactively.

What we built

A single-page web app: four filters, three summary figures, a world map, a sector treemap, a top-emitters bar chart, a trend line and a detailed table, all driven by the same filtered data.

How it works

pandas loads and cleans the data once and keeps it in memory. Plotly Express draws the charts, Dash Bootstrap Components lays out the page, and Dash callbacks connect every click to the charts.

What it shows

Global emissions rose from 55.8 to 62.2 billion tonnes of CO₂e between 2015 and 2024, about 11.5%, with one dip in 2020. Power is the largest sector, and electricity generation alone is the biggest single source.

The Carbon Emissions Dashboard: a title and Reset All Filters button, four filter dropdowns for country, year, sector and subsector, three summary cards showing 590.475 billion tons of CO2e in total, 252 countries and 2.343 billion tons per country on average, then a world choropleth map and a sector and subsector treemap.
The full view, no filters: 590 billion tonnes of CO₂e over ten years, a world map coloured by emissions, and a treemap from sector down to subsector.
ElementWhat it showsHow you interact
Four filtersCountry, year, sector, subsectorMulti-select dropdowns; empty means “all”
Summary cardsTotal emissions, number of countries, average per countryRecalculated on every change
World mapTotal emissions per country, as a choroplethClick a country to add or remove it from the filter
TreemapEmissions by sector, then subsector, sized by volumeClick a sector to filter by it
Top emittersThe ten largest emitters for the current selectionClick a bar to toggle that country; selected countries turn red
Trend lineEmissions over time: global, one country, or one line per selected countryFollows the country filter
Data tableEvery matching record, largest first, ten rows a pageScrolls and pages; updates with the filters
ResetClears every selection at onceOne button
  1. Prepare the data. Climate TRACE publishes one file per sector at country level. The team combined them into one table of country, year, sector, subsector and emissions in billion tonnes of CO₂e, then loaded it with pandas, dropped the incomplete year 2025 and the duplicate raw emissions column, and built the option lists for the four filters.

  2. Lay out the page. Dash Bootstrap Components gave a responsive grid written in Python: a header row with the title and the reset button, a row of four filter cards, three summary cards, two rows of two charts, and a full-width table, all in the clean FLATLY theme with one central colour scheme.

  3. Draw the charts. Plotly Express produced the choropleth map, the treemap, the bar chart and the line chart in a few lines each, with hover details, titles and colour scales set once.

  4. Make the charts clickable. Small callbacks read where the user clicked on the map, a bar or the treemap, and add or remove that country or sector in the matching dropdown, so the charts themselves become filters.

  5. Keep everything in sync. One main callback listens to all four filters and the reset button, filters the data once, recalculates the three figures, redraws all four charts and refreshes the table, returning everything together.

  6. Explain it. The team presented the app and walked through its code, slide by slide, from the imports to the callbacks.

Climate TRACE filesone per sector
→
pandascombine, clean, cache
→
Filters and clicksdropdowns, map, bars, treemap
→
One callbackfilter once, recompute
→
Dashboardfigures, 4 charts, table
Every interaction runs through the same path, so the figures, charts and table can never disagree.

The team compared three ways to build a data app in Python before choosing one.

OptionWhat it offersWhy not (or why)
Flask aloneFull control of a web serverEvery page needs hand-written HTML, CSS and JavaScript
StreamlitThe fastest startLess control over the layout, and simpler interactivity between charts
DashPython for both the interface and the logic, with Plotly charts built inChosen: precise layout control and callbacks that update many charts at once

Still rising

Global emissions grew from 55.8 billion tonnes of CO₂e in 2015 to 62.2 billion in 2024. The only fall came in 2020, about 3% below 2019, and it was more than recovered by 2021.

A few countries dominate

Over the decade, China, the United States, India and Russia together account for more than half of all emissions in the dataset.

Power first

Power is the largest sector, about a quarter of the total, and electricity generation is the single biggest subsector, ahead of road transport.

Diverging paths

India’s emissions rose by about 26% between 2015 and 2024, while Germany’s fell by about 22%: the same dashboard shows growth and decarbonisation side by side.

ComponentTechnology
LanguagePython
Web frameworkDash (by Plotly)
Layout and stylingDash Bootstrap Components, FLATLY theme
ChartsPlotly Express: choropleth, treemap, bar, line
Data handlingpandas, one cleaned table held in memory
TableDash DataTable with paging and horizontal scroll
Data sourceClimate TRACE, country-level emissions by sector
SkillWhere it shows
Python for analyticsLoading, cleaning and aggregating 155,476 records with pandas
Data visualisationChoosing the right chart for each question: where (map), what (treemap), who (bars), when (trend)
Interactive app designLinked filters, clickable charts and a single source of truth for every view
Event-driven programmingDash callbacks with multiple outputs, guarded clicks and selection toggling
Carbon accounting literacyWorking in CO₂-equivalent across sectors, subsectors and countries
Technical communicationA slide-by-slide code walkthrough for a non-specialist audience
TeamworkBuilt and presented as a team, merging work from several notebooks into one app

Good dashboards start from questions, not charts. Each visual here answers one: where emissions come from, what activities cause them, who the largest emitters are, and how that is changing. The most useful design decision was technical but simple: every filter and every click goes through one update function, so the figures, charts and table always describe exactly the same data. And the project was a reminder that coding, for a manager, is less about syntax than about turning a large, scattered dataset into something people can explore on their own.

Python Dash Plotly Express pandas Dash Bootstrap Components Climate TRACE Data visualisation Carbon accounting Team project