Photo by Maxim Tolchinskiy on Unsplash
Greenhouse gas emissions attributable to products—from food to sneakers to appliances—make up more than 75% of global emissions. -The Carbon Catalogue
Our data, which is publicly availably on nature.com, contains product carbon footprints (PCFs) for various companies. PCFs are the greenhouse gas emissions attributable to a given product, measured in CO2 (carbon dioxide equivalent).
This data is stored in a PostgreSQL database containing one table, prouduct_emissions, which looks at PCFs by product as well as the stage of production these emissions occured in. Here's a snapshot of what product_emissions contains in each column:
product_emissions
product_emissions| field | data_type |
|---|---|
| id | VARCHAR |
| year | INT |
| product_name | VARCHAR |
| company | VARCHAR |
| country | VARCHAR |
| industry_group | VARCHAR |
| weight_kg | NUMERIC |
| carbon_footprint_pcf | NUMERIC |
| upstream_percent_total_pcf | VARCHAR |
| operations_percent_total_pcf | VARCHAR |
| downstream_percent_total_pcf | VARCHAR |
You'll use this data to examine the carbon footprint of each industry in the dataset!
SELECT industry_group, COUNT(*) AS count_industry, ROUND(SUM(carbon_footprint_pcf), 1) AS total_industry_footprint
FROM product_emissions
WHERE year = 2017
GROUP BY industry_group
ORDER BY total_industry_footprint DESC;Here I wrote a query that answers the question: Which industry produces the most carbon emissions? The specifics of my task included only producing data from the year 2017 and rounding the totals to the first decimal place.
After writing a succesful query, I chose a bar chart for my visualization because each category on the x-axis is a qualitative grouping. The bar chart allows for easy identification of which industry produces the most carbon emissions. In 2017, this was the Materials industry.