# Project export: CARBONLE

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2025
- Tagline: "Tradle for Carbon Emissions"
- Devpost: https://devpost.com/software/carbonle
- GitHub: https://github.com/bdok23/treehacks2025/
- Demo: https://carbonle.vercel.app/
- Video: https://www.youtube.com/embed/jAe8fjvOHSc?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 2 GitHub contributor(s) — shanemion (15 commits), bdok23 (2 commits)

## Devpost submission (written by the team)

### Inspiration

A member of our team had been exposed to new sustainable farming methods during his internship last summer in Singapore. He rallied his teammates behind this newfound inspiration, and once we saw the Stanford Ecopreneurship challenge, we knew we had to make this! We wanted to gamify learning about the world's carbon emissions, to spread knowledge about the topic and encourage better mindfulness!

### What it does

CARBONLE is a geographical Wordle-like guessing game where you have up to 6 guesses to identify the 'target country'. Our application leverages real-world carbon emissions data and displays them with Treemaps (like the square graphs that Stock changes are displayed on!). How It Works: A random target country is chosen at the start. Enter your guesses in the input field. Each guess reveals hints about distance and accuracy, guiding you closer to the target. Treemaps are displayed for both the target country (showing sector-based emissions) and your most recent guess (to compare sector emissions). If you run out of guesses or guess the country correctly, a final result screen appears. After the game ends, an OpenAI-based summary is displayed with environmental information about the target country.

### How we built it

We took many steps to complete this application. We built our frontend from scratch using create-react-app, utilizing graph libraries like Rechart and API libraries like OpenAI. We built and gathered our own datasets. We wrote scripts that utilized APIs and data wrangling methods to obtain Sector and Sub-Sector Carbon Emission data per country. The APIs we used were from Climate Trace and Climate Watch.

### Challenges we ran into

We had two main challenges. The first main challenge was wrangling the data into a usable format for our Rechart Treemaps due to a lack of proper API documentations and limited API endpoints to obtain data. Our second challenge was facing the limitations of the Rechart Treemap library, amongst other alternatives. Each Treemap library faced coloring and border issues when it came to nesting Treemaps within a hierarchical Treemap. Thus, we adapted and overcame these obstacles through clever API endpoint scraping concatenation and clever paired UI displays of Treemaps.

### Accomplishments we're proud of

We strongly believe that the datasets that we created throughout this hackathon project are the most accurate and comprehensive carbon emission datasets; we believe we have improved the holistic-ness and usability of the Climate Trace dataset specifically. We also all learned a lot about climate and sustainability throughout this project, and we all feel better educated!

### What we learned

China is a HUGEEE contributor to carbon emissions! We also learned that there are some countries out there with negative carbon emissions based on their LUCF (Land use change, and forestry). We also learned that creating a gamified version of a climate game genuinely increases our desires to learn more about this topic even beyond the scope of this hackathon.

### What's next

We spent hours trying to fix the colors on our Treemaps for sub-sectors. We definitely want to finally find a solution to this, so that we can display a more clear Sub-Sector UI. We would also like to add more fields so that users can filter between different types of emissions!

## README (from the GitHub repository)

# treehacks2025

## Detected evidence (automated analysis)

Indexed codebase: 29 recognized source files, 120 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- OpenAI (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- Node.js (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (49 of 49)

```
carbon-tradle/backend/archive/a.csv
carbon-tradle/backend/archive/clean.py
carbon-tradle/backend/archive/emission_data_all.json
carbon-tradle/backend/archive/emission_data.json
carbon-tradle/backend/archive/filtered_emission_data_all.json
carbon-tradle/backend/archive/filtered_emission_data.json
carbon-tradle/backend/archive/scrape.py
carbon-tradle/backend/archive/tree.py
carbon-tradle/backend/archive/tree2.py
carbon-tradle/backend/archive/treemap_data_flourinated_csv.json
carbon-tradle/backend/archive/treemap_data.json
carbon-tradle/backend/fact_and_tip_backend.py
carbon-tradle/backend/file_hierarchical.json
carbon-tradle/backend/gross_emissions.json
carbon-tradle/backend/hint_backend.py
carbon-tradle/backend/net_emissions.json
carbon-tradle/backend/process.py
carbon-tradle/backend/retrievedata.py
carbon-tradle/backend/simplified_emissions.json
carbon-tradle/backend/subsector_breakdown.json
carbon-tradle/backend/to_tree.py
carbon-tradle/frontend/.env
carbon-tradle/frontend/.gitignore
carbon-tradle/frontend/package.json
carbon-tradle/frontend/public/data/coordinates.csv
carbon-tradle/frontend/public/data/emissions.csv
carbon-tradle/frontend/public/data/file_hierarchical.json
carbon-tradle/frontend/public/index.html
carbon-tradle/frontend/public/manifest.json
carbon-tradle/frontend/public/robots.txt
carbon-tradle/frontend/README.md
carbon-tradle/frontend/src/App.css
carbon-tradle/frontend/src/App.js
carbon-tradle/frontend/src/App.test.js
carbon-tradle/frontend/src/components/CarbonTreemap.js
carbon-tradle/frontend/src/components/CarbonTreemapD3.js
carbon-tradle/frontend/src/components/CarbonTreemapNest.js
carbon-tradle/frontend/src/components/CarbonTreemapNest2.js
carbon-tradle/frontend/src/components/CarbonTreemapSectors.js
carbon-tradle/frontend/src/components/GuessForm.js
carbon-tradle/frontend/src/components/openai.js
carbon-tradle/frontend/src/components/Treemap.js
carbon-tradle/frontend/src/index.css
carbon-tradle/frontend/src/index.js
carbon-tradle/frontend/src/pages/Home.js
carbon-tradle/frontend/src/reportWebVitals.js
carbon-tradle/frontend/src/setupTests.js
carbon-tradle/frontend/src/utils/distanceUtils.js
README.md
```

### Dependencies

- carbon-tradle/frontend/package.json: @testing-library/dom@^10.4.0, @testing-library/jest-dom@^6.6.3, @testing-library/react@^16.2.0, @testing-library/user-event@^13.5.0, d3@^7.9.0, openai@^4.85.1, papaparse@^5.5.2, react@18.2.0, react-dom@18.2.0, react-scripts@5.0.1, recharts@2.15.0, web-vitals@^2.1.4

### Recent commits (newest first)

- d3
- package pls
- Fix: Added missing papaparse dependency
- mario pull this one
- workingggg
- updated selectable countries
- functional
- frontend
- Merge branch 'main' of github.com:bdok23/treehacks2025
- mario data scrape
- backend update
- significant UI update
- working now
- fuk this hsit
- little react parse error in carbontreemap.js
- initial setup
- Initial commit

## Key source files (fetched from GitHub, selected and truncated for size)

### carbon-tradle/frontend/package.json

```
{
  "name": "carbon-tradle",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/dom": "^10.4.0",
    "@testing-library/jest-dom": "^6.6.3",
    "@testing-library/react": "^16.2.0",
    "@testing-library/user-event": "^13.5.0",
    "d3": "^7.9.0",
    "openai": "^4.85.1",
    "papaparse": "^5.5.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-scripts": "5.0.1",
    "recharts": "2.15.0",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

```

### carbon-tradle/frontend/src/index.js

```javascript


import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';


const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

```

### carbon-tradle/frontend/src/App.js

```javascript
import React from 'react';
import './App.css';
import Home from './pages/Home';
import logo from './assets/CARBONLE_logo.png'; // Ensure the correct path

function App() {
  return (
    <div className="App" style={{ backgroundColor: '#F1F3E9', minHeight: '100vh' }}>
      <header className="App-header" style={{ backgroundColor: '#262A2E', padding: '1rem', textAlign: 'center' }}>
        <img 
          src={logo} 
          alt="CarbonLE Logo" 
          style={{ maxWidth: '400px', height: 'auto' }} 
        />
      </header>
      <main>
        <Home />
      </main>
    </div>
  );
}

export default App;
```

### carbon-tradle/backend/hint_backend.py

```python
from flask import Flask, request, jsonify
from openai import OpenAI
import os

app = Flask(__name__)

# Initialize the client with your API key
client = OpenAI(api_key=os.getenv('OPENAI_API_KEY'))

# Define your system prompt (developer message in this new interface)
SYSTEM_PROMPT = """
You are a helpful hint generator for a geography-based game focused on greenhouse gas emissions.
When a user makes a guess for a country, provide a concise hint related to greenhouse gas emissions that helps them get closer to the actual target country without revealing the answer directly.
Focus on aspects like emissions sources, comparisons to the guessed country, or climate-related policies of the target country.
Avoid giving away the answer directly. Keep hints brief and helpful. Do not ever give the actual country name in the hint.
"""

@app.route('/get_hint', methods=['POST'])
def get_hint():
    data = request.get_json()
    guess = data.get('guess')
    country = data.get('country')
    
    if not guess or not country:
        return jsonify({"error": "Both 'guess' and 'country' are required."}), 400

    # Prepare messages using the new roles (using "developer" for system instructions)
    messages = [
        {"role": "developer", "content": SYSTEM_PROMPT},
        {"role": "user", "content": f"My guess is '{guess}' and the correct country is '{country}'. Can you provide a hint to help me get closer to the correct answer?"}
    ]

    try:
        # Create a completion using the new client interface.
        completion = client.chat.completions.create(
            model="o3-mini",  # Change to your desired model if needed.
            messages=messages,
        )

        # Access the content attribute directly
        suggestion = completion.choices[0].message.content
        return jsonify({"suggestion": suggestion})
    except Exception as e:
        return jsonify({"error": str(e)}), 500

if __name__ == '__main__':
    app.run(debug=True)

```

### carbon-tradle/backend/fact_and_tip_backend.py

```python
from flask import Flask, request, jsonify
from openai import OpenAI
import os

app = Flask(__name__)

# Initialize the client with your API key.
client = OpenAI(api_key=os.getenv('OPENAI_API_KEY'))

# Endpoint to get a fun fact about a given sub-sector
@app.route('/get_fun_fact', methods=['POST'])
def get_fun_fact():
    data = request.get_json()
    subsector = data.get('subsector')
    
    if not subsector:
        return jsonify({'error': "Parameter 'subsector' is required."}), 400

    messages = [
        {"role": "developer", "content": "You are a knowledgeable environmental educator."},
        {"role": "user", "content": f"Share a fun fact about the '{subsector}' sub-sector, particularly in the context of carbon emissions or environmental impact."}
    ]

    try:
        completion = client.chat.completions.create(
            model="o3-mini",  
            messages=messages,
        )
        fun_fact = completion.choices[0].message.content
        return jsonify({'fun_fact': fun_fact})
    except Exception as e:
        return jsonify({'error': str(e)}), 500

# Endpoint to get an emissions tip for a country based on sub-sector and emissions info
@app.route('/get_emission_tip', methods=['POST'])
def get_emission_tip():
    data = request.get_json()
    country = data.get('country')
    subsector = data.get('subsector')
    emissions_info = data.get('emissions_info')  # This could be any context data you have.

    if not country or not subsector or not emissions_info:
        return jsonify({'error': "Parameters 'country', 'subsector', and 'emissions_info' are required."}), 400

    messages = [
        {"role": "developer", "content": "You are an expert in environmental policy and sustainability. Your goal is to provide actionable advice."},
        {"role": "user", "content": (
            f"Country: {country}\n"
            f"Sub-sector: {subsector}\n"
            f"Emissions Data: {emissions_info}\n\n"
            "Based on this information, provide a relevant and very short practical tip to a regular person that they can do in their daily life to help reduce waste, emissions, and greenhouse gases."
        )}
    ]

    try:
        completion = client.chat.completions.create(
            model="o3-mini", 
            messages=messages,
        )
        tip = completion.choices[0].message.content
        return jsonify({'tip': tip})
    except Exception as e:
        return jsonify({'error': str(e)}), 500

if __name__ == '__main__':
    app.run(debug=True)

```

### carbon-tradle/backend/to_tree.py

```python
import json

def build_tree(data):
    """
    Transforms the raw emissions data (keyed by country code)
    into a hierarchical tree structure.

    Input structure (example):
    {
      "CHN": {
        "fossil-fuel-operations": {
          "coal-mining": 1291081091.9735577,
          "oil-and-gas-production": 166726322.66137594,
          "other-fossil-fuel-operations": 0.0,
          "oil-and-gas-refining": 170802982.80131853,
          "oil-and-gas-transport": 51974139.8795168,
          "sectorTotal": 1680584537.315769
        },
        ... other sectors ...
      },
      "CIV": { ... }
    }

    Output structure:
    {
      "CHN": {
         "name": "CHN",
         "children": [
            {
              "name": "fossil-fuel-operations",
              "value": 1680584537.315769,
              "children": [
                {"name": "coal-mining", "value": 1291081091.9735577},
                {"name": "oil-and-gas-production", "value": 166726322.66137594},
                ...
              ]
            },
            ... other sectors ...
         ]
      },
      "CIV": { ... }
    }
    """
    new_data = {}
    for country, sectors in data.items():
        # Create a root node for the country
        country_tree = {"name": country, "children": []}
        for sector, sub_dict in sectors.items():
            # Build a list of sub-sector nodes
            children = [
                {"name": sub_sector, "value": value}
                for sub_sector, value in sub_dict.items()
                if sub_sector != "sectorTotal"
            ]
            # Create the sector node with its total and children.
            sector_node = {
                "name": sector,
                "value": sub_dict.get("sectorTotal", 0),
                "children": children
            }
            country_tree["children"].append(sector_node)
        new_data[country] = country_tree
    return new_data

if __name__ == "__main__":
    # Adjust these filenames as needed.
    # input_filename = "file.json"               # Your raw emissions JSON file.
    input_filename = "subsector_breakdown.json"
    output_filename = "file_hierarchical.json"   # The output file with hierarchical data.

    # Load the raw JSON data.
    with open(input_filename, "r") as infile:
        raw_data = json.load(infile)
    print("Raw data loaded.")

    # Build the hierarchical tree.
    hierarchical_data = build_tree(raw_data)
    print("Hierarchical tree constructed.")

    # Write out the new JSON.
    with open(output_filename, "w") as outfile:
        json.dump(hierarchical_data, outfile, indent=2)
    print(f"Transformed data written to {output_filename}.")

```

### carbon-tradle/backend/process.py

```python
#!/usr/bin/env python3

import json
import math
from collections import defaultdict

# Input file containing a list of records:
# [
#   {
#     "country": "USA",
#     "sector": "power",
#     "subsector": "electricity-generation",
#     "emissions": 1234.56
#   },
#   ...
# ]
INPUT_FILE = "simplified_emissions.json"

# Output files
NET_OUTPUT         = "net_emissions.json"
GROSS_OUTPUT       = "gross_emissions.json"
BREAKDOWN_OUTPUT   = "subsector_breakdown.json"

def load_simplified_emissions(filename):
    """
    Loads the simplified_emissions.json (a list of records).
    Each record typically has:
      {
        "country": <string>,
        "sector": <string>,
        "subsector": <string>,
        "emissions": <float>
      }
    """
    with open(filename, "r", encoding="utf-8") as f:
        data = json.load(f)
    return data

def calculate_net_emissions(data):
    """
    Returns a dict of net emissions by country.
    Net = sum of all emissions (including negative).
    Example result: { "USA": 123456.78, "DEU": -9999.0, ... }
    """
    net_by_country = defaultdict(float)
    for record in data:
        country = record.get("country", "N/A")
        emissions = record.get("emissions", 0.0)
        net_by_country[country] += emissions
    return dict(net_by_country)

def calculate_gross_emissions(data):
    """
    Returns a dict of gross emissions by country.
    Gross = sum of only positive emissions, ignoring negative or zero values.
    Example result: { "USA": 200000.0, "DEU": 50000.0, ... }
    """
    gross_by_country = defaultdict(float)
    for record in data:
        country = record.get("country", "N/A")
        emissions = record.get("emissions", 0.0)
        if emissions > 0:
            gross_by_country[country] += emissions
    return dict(gross_by_country)

def build_subsector_breakdown(data):
    """
    Returns a nested dict:
      {
        "USA": {
          "power": {
            "electricity-generation": 1234.56,
            "heat-plants": 789.12,
            "sectorTotal": 2023.68
          },
          "transportation": {
            "domestic-aviation": 456.78,
            "road-transportation": 321.0,
            "sectorTotal": 777.78
          }
        },
        "DEU": {
          ...
        }
      }

    In other words, for each country and each sector, we store a dict of
    { subsectorName => emissions }, plus a "sectorTotal" key.
    Summing the individual subsectors (excluding "sectorTotal") yields the net
    emissions for that sector.
    """
    # Nested structure: breakdown[country][sector][subsector] -> float
    breakdown = defaultdict(lambda: defaultdict(lambda: defaultdict(float)))

    # 1) Fill the nested dict
    for record in data:
        country   = record.get("country", "N/A")
        sector    = record.get("sector", "unknown")
        subsector = record.get("subsector", "unknown")
        emissions = record.get("emissions", 0.0)

        breakdown[country][sector][subsector] += emissions

    # 2) Convert into the final format, adding "sectorTotal"
    final_dict = {}
    for country_code, sector_dict in breakdown.items():
        final_dict[country_code] = {}
        for sector_name, subsectors_dict in sector_dict.items():
            # Compute total
            sector_total = sum(subsectors_dict.values())
            # Convert the inner defaultdict to a normal dict
            normal_sub_dict = dict(subsectors_dict)
            # Add the total
            normal_sub_dict["sectorTotal"] = sector_total
            # Assign
            final_dict[country_code][sector_name] = normal_sub_dict

    return final_dict

def save_json(data, filename):
    """ Utility to save data (dict or list) as pretty-printed JSON. """
    with open(filename, "w", encoding="utf-8") as f:
        json.dump(data, f, indent=2)

if __name__ == "__main__":
    # 1) Load the data
    records = load_simplified_emissions(INPUT_FILE)

    # 2) Net emissions by country
    net_emissions = calculate_net_emissions(records)
    save_json(net_emissions, NET_OUTPUT)
    print(f"Saved net emissions to '{NET_OUTPUT}'")

    # 3) Gross emissions by country
    gross_emissions = calculate_gross_emissions(records)
    save_json(gross_emissions, GROSS_OUTPUT)
    print(f"Saved gross emissions to '{GROSS_OUTPUT}'")

    # 4) Subsector breakdown
    subsector_data = build_subsector_breakdown(records)
    save_json(subsector_data, BREAKDOWN_OUTPUT)
    print(f"Saved subsector breakdown to '{BREAKDOWN_OUTPUT}'")

```

### carbon-tradle/backend/retrievedata.py

```python
#!/usr/bin/env python3

import requests
import json
import math

# =============================================================================
# 1. DEFINITIONS
# =============================================================================

# Your new parent mapping dictionary
#!/usr/bin/env python3

# 1) TOP-LEVEL SECTORS
ALL_SECTORS = [
    "fluorinated-gases",
    "waste",
    "transportation",
    "fossil-fuel-operations",
    "agriculture",
    "power",
    "forestry-and-land-use",
    "buildings",
    "manufacturing",
    "mineral-extraction"
]

# 2) ALL SUBSECTORS
ALL_SUBSECTORS = [
    "aluminum",
    "bauxite-mining",
    "biological-treatment-of-solid-waste-and-biogenic",
    "cement",
    "chemicals",
    "coal-mining",
    "copper-mining",
    "cropland-fires",
    "crop-residues",
    "domestic-aviation",
    "domestic-shipping",
    "domestic-shipping-ship",
    "domestic-wastewater-treatment-and-discharge",
    "electricity-generation",
    "enteric-fermentation-cattle-operation",
    "enteric-fermentation-cattle-pasture",
    "enteric-fermentation-other",
    "fluorinated-gases",
    "food-beverage-tobacco",
    "forest-land-clearing",
    "forest-land-degradation",
    "forest-land-fires",
    "glass",
    "heat-plants",
    "incineration-and-open-burning-of-waste",
    "industrial-wastewater-treatment-and-discharge",
    "international-aviation",
    "international-shipping",
    "international-shipping-ship",
    "iron-and-steel",
    "iron-mining",
    "lime",
    "manure-applied-to-soils",
    "manure-left-on-pasture-cattle",
    "manure-management-cattle-operation",
    "manure-management-other",
    "net-forest-land",
    "net-shrubgrass",
    "net-wetland",
    "non-residential-onsite-fuel-usage",
    "oil-and-gas-production",
    "oil-and-gas-refining",
    "oil-and-gas-transport",
    "other-agricultural-soil-emissions",
    "other-chemicals",
    "other-energy-use",
    "other-fossil-fuel-operations",
    "other-manufacturing",
    "other-metals",
    "other-mining-quarrying",
    "other-onsite-fuel-usage",
    "other-transport",
    "petrochemical-steam-cracking",
    "pulp-and-paper",
    "railways",
    "removals",
    "residential-onsite-fuel-usage",
    "rice-cultivation",
    "road-transportation",
    "road-transportation-road-segment",
    "rock-quarrying",
    "sand-quarrying",
    "shrubgrass-fires",
    "soil-organic-carbon",
    "solid-fuel-transformation",
    "solid-waste-disposal",
    "synthetic-fertilizer-application",
    "textiles-leather-apparel",
    "water-reservoirs",
    "wetland-fires",
    "wood-and-wood-products"
]

# 3) PARENT MAPPING: SUBSECTOR -> ONE OF THE TEN SECTORS
PARENT_MAPPING = {
    # manufacturing
    "aluminum": "manufacturing",
    "cement": "manufacturing",
    "chemicals": "manufacturing",
    "food-beverage-tobacco": "manufacturing",
    "glass": "manufacturing",
    "iron-and-steel": "manufacturing",
    "other-chemicals": "manufacturing",
    "other-energy-use": "manufacturing",
    "other-manufacturing": "manufacturing",
    "other-metals": "manufacturing",
    "petrochemical-steam-cracking": "manufacturing",
    "pulp-and-paper": "manufacturing",
    "textiles-leather-apparel": "manufacturing",

    # mineral-extraction
    "bauxite-mining": "mineral-extraction",
    "copper-mining": "mineral-extraction",
    "iron-mining": "mineral-extraction",
    "lime": "mineral-extraction",
    "other-mining-quarrying": "mineral-extraction",
    "rock-quarrying": "mineral-extraction",
    "sand-quarrying": "mineral-extraction",

    # power
    "electricity-generation": "power",
    "heat-plants": "power",
    "solid-fuel-transformation": "power",

    # transportation
    "domestic-aviation": "transportation",
    "domestic-shipping": "transportation",
    "domestic-shipping-ship": "transportation",
    "international-aviation": "transportation",
    "international-shipping": "transportation",
    "international-shipping-ship": "transportation",
    "other-transport": "transportation",
    "railways": "transportation",
    "road-transportation": "transportation",
    "road-transportation-road-segment": "transportation",

    # fossil-fuel-operations
    "coal-mining": "fossil-fuel-operations",
    "oil-and-gas-production": "fossil-fuel-operations",
    "oil-and-gas-refining": "fossil-fuel-operations",
    "oil-and-gas-transport": "fossil-fuel-operations",
    "other-fossil-fuel-operations": "fossil-fuel-operations",

    # agriculture
    "cropland-fires": "agriculture",
    "crop-residues": "agriculture",
    "enteric-fermentation-cattle-operation": "agriculture",
    "enteric-fermentation-cattle-pasture": "agriculture",
    "enteric-fermentation-other": "agriculture",
    "manure-applied-to-soils": "agriculture",
    "manure-left-on-pasture-cattle": "agriculture",
    "manure-management-cattle-operation": "agriculture",
    "manure-management-other": "agriculture",
    "other-agricultural-soil-emissions": "agriculture",
    "rice-cultivation": "agriculture",
    "synthetic-fertilizer-application": "agriculture",

    # forestry-and-land-use
    "forest-land-clearing": "forestry-and-land-use",
    "forest-land-degradation": "forestry-and-land-use",
    "forest-land-fires": "forestry-and-land-use",
    "net-forest-land": "forestry-and-land-use",
    "net-shrubgrass": "forestry-and-land-use",
    "net-wetland": "forestry-and-land-use",
    "removals": "forestry-and-land-use",
    "shrubgrass-fires": "forestry-and-land-use",
    "soil-organic-carbon": "forestry-and-land-use",
    "water-reservoirs": "forestry-and-land-use",
    "wetland-fires": "forestry-and-land-use",
    "wood-and-wood-products": "forestry-and-land-use",

    # buildings
    "non-residential-onsite-fuel-usage": "buildings",
    "other-onsite-fuel-usage": "buildings",
    "residential-onsite-fuel-usage": "buildings",

    # waste
    "biological-treatment-of-solid-waste-and-biogenic": "waste",
    "domestic-wastewater-treatment-and-discharge": "waste",
   
[truncated — 6821 more characters]
```

### carbon-tradle/frontend/src/App.css

```css
.App {
  text-align: center;
  font-family: sans-serif;
}

.App-header {
  background-color: #282c34;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

```

### carbon-tradle/frontend/src/setupTests.js

```javascript
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

```

[18 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]