Skip to content

ktalpay/CarbonOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CI

🌍 CarbonOps — AI/ML Ops–Ready Carbon Emission Automation Toolkit

Open-source sustainability engine for carbon-intensity data, automated CO₂e calculations, DevOps carbon-aware scheduling, and ML-ready datasets.

CarbonOps is a modular sustainability toolkit that automates and standardizes carbon-emission workflows using officially published datasets from DEFRA, IPCC, and global GHG reporting standards.

It provides:

  • Dataset ingestion & normalization (CarbonFactor-Parser)
  • REST API for CO₂e calculations & factor lookup (CarbonFactor-API)
  • CLI + DevOps automation workflows (CarbonOps Toolkit)
  • HuggingFace datasets + notebooks + examples
  • ML-Ops–friendly data pipelines for future model training

Status: pre-alpha (v0.0.1) — API and internal structure may evolve.


🔥 Why CarbonOps?

Modern organizations face major challenges:

  • Manual or inconsistent carbon reporting
  • Scattered datasets and Excel-based workflows
  • Limited reproducibility
  • Lack of automation
  • No ML-driven estimation or validation

CarbonOps standardizes the entire pipeline.

Input example

{
  "activity": "diesel",
  "value": 50,
  "unit": "liter"
}

Output example

{
  "co2e": 134.5,
  "factor": 2.69,
  "source": "DEFRA 2023",
  "scope": 1
}

✔ Reproducible
✔ Machine-readable
✔ API-ready
✔ ML-Ops compatible


🏗 Architecture

                +----------------------+
                |  DEFRA / IPCC / GHGP |
                |    Raw Datasets      |
                +----------+-----------+
                           |
                           v
                 CarbonFactor-Parser
               (Dataset ingestion layer)
                           |
                           v
                 Normalized Carbon Factors
                           |
                           v
                   CarbonFactor-API
               (REST API & computation)
                           |
                           v
                     CarbonOps Toolkit
       CLI • Workflows • DevOps Carbon-Aware Scheduling
                           |
                           v
               Applications • CI/CD • ML Pipelines

Each module is fully open-source and independently installable, but designed to work together as an integrated sustainability engine.


📦 Project Modules

1) CarbonFactor-Parser

Dataset ingestion & normalization engine
🔗 https://github.com/ktalpay/CarbonFactor-Parser

2) CarbonFactor-API

REST API exposing standardized emission factors & CO₂e calculations
🔗 https://github.com/ktalpay/CarbonFactor-API

3) CarbonOps Toolkit (this repo)

CLI + automation workflows + carbon-aware DevOps utilities
🔗 https://github.com/ktalpay/CarbonOps


🚀 Quickstart

git clone https://github.com/ktalpay/CarbonOps.git
cd CarbonOps
pip install -e .
carbonops version

🧮 Example Usage (Python)

from carbonops import CarbonOpsClient

client = CarbonOpsClient("https://api.carbonops.io")

result = client.calculate(
    activity="diesel",
    value=50,
    unit="liter"
)

print(result)

🛠 Installation

CLI

pip install carbonops
carbonops calculate diesel 50 liter

API Client

pip install carbonops-api

Docker

docker run carbonops/api:latest

📘 HuggingFace Resources

Dataset

https://huggingface.co/datasets/ktalpay/carbonops-datasets

Notebooks

https://huggingface.co/ktalpay/carbonops-notebooks

Model / Assistant

https://huggingface.co/ktalpay/carbonops-assistant


📊 Dataset Structure

Column Description
category Fuel / transport / process / energy
activity Specific activity name
unit Unit of measurement (L, kWh, km, kg…)
factor Emission factor (CO₂e)
source Dataset origin (DEFRA/IPCC year)
scope Scope 1 / 2 / 3 classification

Load via HuggingFace

from datasets import load_dataset
ds = load_dataset("ktalpay/carbonops-datasets")

📘 Notebooks Included

  • Emission calculation demo
  • Dataset exploration
  • API integration demo
  • ML model prototype (future)

🔮 Roadmap

v0.0.1 (current)

Repo bootstrap + basic CLI

v0.0.2

Carbon-intensity adapters + simple scheduler

v0.0.3

GitHub Action + per-repo CO₂e reporting

v0.1.0

First pilot + documentation site

v2.0 (future)

ML-assisted estimators (missing-value inference)

v3.0 (future)

Carbon-aware CI/CD
Kubernetes carbon scheduling


🤝 Contributing

Issues and PRs welcome.
See CONTRIBUTING.md.


🧾 License

MIT — see LICENSE.


👤 Maintainer

Kürşat Alpay
Senior .NET & AI/ML Ops Engineer
Founder @ FutureOps → https://futureops.co.uk
GitHub: https://github.com/ktalpay
LinkedIn: https://linkedin.com/in/kursat-alpay

About

Carbon-aware DevOps toolkit (schedule CI/CD by carbon windows)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages