Jasmica08 GitHub avatar

carbon-footprint-analyzer

Jasmica08

一个 Streamlit 网页应用,根据用电、出行和饮食估算家庭碳排放,用小型回归模型预测未来 1–10 年影响,并提供基准对比和改进建议。

Stars

19

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

暂无数据

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

这是一个自包含的教育项目,将公认的排放因子与运行时训练的 scikit-learn 模型结合,用户无需外部数据集即可查看当前碳足迹和未来预测。

适合谁使用

  • 希望获得大致碳足迹估算的家庭用户
  • 寻找小型可运行示例的 Python/Streamlit 学习者
  • 需要简单排放基准演示的可持续发展教育者
  • 对在 Web 应用中集成轻量 ML 模型感兴趣的开发者

典型使用场景

  • 估算家庭在用电、车辆出行和饮食习惯方面的碳排放
  • 在电网逐步脱碳的假设下预测未来 1–10 年的个人碳足迹
  • 通过滑块模拟行为变化并比较不同情景
  • 下载纯文本碳足迹报告,供个人或课程作业使用

项目优势

  • 无需下载外部数据集,排放因子使用公开常量
  • 交互式可视化包括饼图分解、基准对比、生态评分和排序建议
  • 趋势模型自包含:运行时用 scikit-learn 在合成数据上训练
  • 包含清晰的本地运行、GitHub 上传和部署说明

使用前须知

  • 排放因子是广泛引用的近似值,并非认证碳核算
  • AI 预测基于运行时生成的合成数据,而非真实历史数据
  • 需要配置 Python 环境并手动启动;仓库中未包含已托管的演示链接

README 快速开始

🌍 Carbon Footprint Analyzer

A Streamlit web app that estimates your household's carbon emissions from electricity usage, vehicle travel, and food habits — then uses a small regression model to project your yearly impact, benchmarks you against national/global averages, and gives a ranked improvement plan.

✨ Features

  • Emission breakdown (pie chart) across electricity / travel / food
  • Benchmark comparison vs. Average Indian, Global Average, Paris Agreement target
  • AI trend projection: a scikit-learn regression model (trained on synthetic data generated at runtime) projects your footprint 1–10 years ahead, factoring in gradual grid decarbonisation
  • Eco Score (A–F grade)
  • Ranked, personalised improvement tips
  • "What-if" simulator — drag sliders to see the impact of behaviour changes
  • Downloadable plain-text report

No external dataset download is required. All emission factors are well-established public constants (see app.py), and the "AI" trend model trains itself on synthetically generated data each time the app starts (see model.py).

🗂️ Project Structure

carbon-footprint-analyzer/
├── app.py              # Streamlit UI + calculations
├── model.py            # Synthetic-data regression model (the "AI" part)
├── requirements.txt    # Python dependencies
├── .gitignore
└── README.md

🖥️ Running it locally in VS Code

Yes — this project runs perfectly in VS Code. Steps:

  1. Install prerequisites

  2. Open the project folder in VS Code File → Open Folder… → select carbon-footprint-analyzer.

  3. Create a virtual environment (open a VS Code terminal: Ctrl+`)

    python -m venv venv
    

    Activate it:

    • Windows: venv\Scripts\activate
    • macOS/Linux: source venv/bin/activate VS Code will usually prompt "Select this environment" — click yes.
  4. Install dependencies

    pip install -r requirements.txt
    
  5. Run the app

    streamlit run app.py
    

    It opens automatically at http://localhost:8501.

⬆️ Uploading this project to GitHub

Checklist of what a project needs before pushing (all already included here): README.md, .gitignore, requirements.txt, and cle

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,390
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
littledivy
精选
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI 与机器学习
1,482