Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add budget constants #188

Merged
merged 3 commits into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions co2calculator/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@
import iso3166
from co2calculator.data_handlers import Airports

from dataclasses import dataclass

KWH_TO_TJ = 277777.77777778


@dataclass
class BudgetOnePointFiveDegrees:
"""
Dataclass for budget for 1.5 degrees scenario
All values are in tons
Source for budget values: https://www.ipcc.ch/report/ar6/wg1/downloads/report/IPCC_AR6_WGI_SPM_final.pdf#page=33, Table SPM.2
Remaining carbon budget calculated using an equal-per-capita allocation
"""

total_carbon_budget: float = 300_000_000_000
budget_per_person: float = 34.0
budget_per_person_and_year: float = 1.4
budget_per_person_and_year_long: float = 1.1


@dataclass
class BudgetTwoDegrees:
"""
Dataclass for budget for 2 degrees scenario
All values are in tons
Source for budget values: https://www.ipcc.ch/report/ar6/wg1/downloads/report/IPCC_AR6_WGI_SPM_final.pdf#page=33, Table SPM.2
Remaining carbon budget calculated using an equal-per-capita allocation
"""

total_carbon_budget: float = 900_000_000_000
budget_per_person: float = 101.9
budget_per_person_and_year: float = 4.1
budget_per_person_and_year_long: float = 3.4


class HeatingFuel(enum.Enum):
"""Enum for heating fuel types"""
Expand Down
Loading