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 1 commit
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
25 changes: 25 additions & 0 deletions co2calculator/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,38 @@
import iso3166
import pandas as pd

from dataclasses import dataclass

KWH_TO_TJ = 277777.77777778

DF_AIRPORTS = pd.read_csv(
"https://davidmegginson.github.io/ourairports-data/airports.csv"
)


@dataclass
class BudgetOnePointFiveDegrees:
"""
Dataclass for budget for 1.5 degrees scenario

"""

budget_per_person: float = 34.0
budget_per_person_and_year: float = 1.4
budget_per_person_and_year_long: float = 0.0038


@dataclass
class BudgetTwoDegrees:
"""
Dataclass for budget for 2 degrees scenario
"""

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