Analyzing Industry Carbon Emissions
  • AI Chat
  • Code
  • Report
  • Spinner

    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

    fielddata_type
    idVARCHAR
    yearINT
    product_nameVARCHAR
    companyVARCHAR
    countryVARCHAR
    industry_groupVARCHAR
    weight_kgNUMERIC
    carbon_footprint_pcfNUMERIC
    upstream_percent_total_pcfVARCHAR
    operations_percent_total_pcfVARCHAR
    downstream_percent_total_pcfVARCHAR

    You'll use this data to examine the carbon footprint of each industry in the dataset!

    Unknown integration
    DataFrameavailable as
    df
    variable
    -- Start coding here... 
    SELECT *
    FROM product_emissions;
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df2
    variable
    select distinct year from product_emissions
    order by year desc;
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df1
    variable
    select industry_group,
    count(*) as count_industry,
    round(sum(carbon_footprint_pcf),1) as total_industry_footprint
    from product_emissions
    group by industry_group, year
    having year = 2017
    order by sum(carbon_footprint_pcf) desc;
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.