PHPackages                             bzfvrto/carbonize - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bzfvrto/carbonize

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bzfvrto/carbonize
=================

PHP package for carbon footprint calculation

v0.0.2(2y ago)14MITPHPPHP ^8.1

Since May 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bzfvrto/Carbonize)[ Packagist](https://packagist.org/packages/bzfvrto/carbonize)[ Docs](https://github.com/bzfvrto/Carbonize)[ RSS](/packages/bzfvrto-carbonize/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Carbonize carbon footprint made easy for transport.
===================================================

[](#carbonize-carbon-footprint-made-easy-for-transport)

[![Latest Version on Packagist](https://camo.githubusercontent.com/442caca9b170f979ce20265a0b8ca86a20e2c7439948a4bbbfb4a36ef03f3245/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627a667672746f2f636172626f6e697a652e737667)](https://packagist.org/packages/bzfvrto/carbonize)[![Tests](https://github.com/bzfvrto/Carbonize/actions/workflows/tests.yml/badge.svg)](https://github.com/bzfvrto/Carbonize/actions/workflows/tests.yml)[![Static Analysis](https://github.com/bzfvrto/Carbonize/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/bzfvrto/Carbonize/actions/workflows/static-analysis.yml)[![Code Climate maintainability](https://camo.githubusercontent.com/5ccb6d94b957c8b74fdd329697a8b3066b30539b262abdc1bb008a9c41e1df02/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f627a667672746f2f436172626f6e697a65)](https://camo.githubusercontent.com/5ccb6d94b957c8b74fdd329697a8b3066b30539b262abdc1bb008a9c41e1df02/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f627a667672746f2f436172626f6e697a65)

### Some words about me.

[](#some-words-about-me)

> *This is my first package.*
> I have made it, primarily to have feedback on my code. I love to code since several years, but i have never publish open-source package. I'm not profesionnal developper but i'm looking for a school next year.

Description
-----------

[](#description)

Carbonize aims to provide simple and clear API to build carbon footprint easily for private vehicles and delivery companies. My goal is to make it compilent with the french law.

At this time, only base formula is implemented, it is the most generic and it does not allow fine calculation of emission.
Source of emission come from the [ADEME Base Empreinte](https://base-empreinte.ademe.fr).

> This package is a Work in progress. Breaking changes may occur.

I have take some help and inspiration from :

- [Geotools](https://github.com/thephpleague/geotools)
- [Spatie php skeleton](https://github.com/spatie/package-skeleton-php)
- [Nuno Maduro Skeleton-php](https://github.com/nunomaduro/skeleton-php)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require bzfvrto/carbonize
```

Usage
-----

[](#usage)

```
$distance = new Distance(
        from: new Point(1, 2),
        to: new Point(4, 5)
    );

$distance
    ->setSteps([new Point(1,3), new Point(2, 4)])
    ->calculate();
    // output (float) distance in meters: 516972.895251

$vehicle = new Vehicle(
        combustible: Combustible::B7,
        consumptionAvgInLiterFor100Km: 7.5,
        location: Country::FRANCE
    );

$vehicle->emission()->getCO2EquivalentInGramsPerKm();
    // output (float) C02e in grammes per km: 232.5

(new Carbonize(
    vehicle: $vehicle,
    distance: $distance))->formatedResult();
    // output (string): 120196.198 gramme of CO2 emited for 516.97 km
```

Roadmap
-------

[](#roadmap)

**What you can expect in the coming months:**

- **Formula 2**: Used when the vehicle carry many packages or people and it's fuel consumption is known for current transport service
- **Formula 3**: Used when the fuel consumption of the vehicle is unknown for current transport service and if there is only one package or people inside
- **Formula 4**: Used when vehicle carry many package or people and it's fuel consumption is unknown for current transport service
- Laravel package
- More country and Greenhouse gas provider
- More combustible type

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Basile Favretto](https://github.com/bzfvrto)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1084d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb6f42109262a31658af7ed06f9a6d781623e88cecdbc719c0c63347cbc38d17?d=identicon)[Bazil](/maintainers/Bazil)

---

Top Contributors

[![bzfvrto](https://avatars.githubusercontent.com/u/29015226?v=4)](https://github.com/bzfvrto "bzfvrto (47 commits)")

---

Tags

carbon-emissionscarbon-footprintphpcarbon-footprint

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bzfvrto-carbonize/health.svg)

```
[![Health](https://phpackages.com/badges/bzfvrto-carbonize/health.svg)](https://phpackages.com/packages/bzfvrto-carbonize)
```

###  Alternatives

[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6233.4M58](/packages/phpcsstandards-phpcsutils)[thenextweb/passgenerator

A Laravel package to create Apple Wallet (old Passbook) compatible tickets.

297435.6k](/packages/thenextweb-passgenerator)[theseer/autoload

A tool and library to generate autoload code.

393193.5k7](/packages/theseer-autoload)[ramytalal/label-printer

An implementation of the Brother label printer API.

6641.8k](/packages/ramytalal-label-printer)[gillesgoetsch/acf-smart-button

A simple, clean and lean ACF Field for internal and external links.

7625.5k](/packages/gillesgoetsch-acf-smart-button)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
