Skip to content

Commit

Permalink
remove occupancy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
han16nah committed May 5, 2024
1 parent c510de6 commit 522ed6d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions co2calculator/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def calc_co2_businesstrip(
distance: Kilometer = None,
size: Size = None,
fuel_type: CarFuel | BusFuel | TrainFuel = None,
occupancy: int = None,
seating: FlightClass | FerryClass = None,
passengers: int = None,
roundtrip: bool = False,
Expand All @@ -137,7 +136,6 @@ def calc_co2_businesstrip(
:param fuel_type: Fuel type of the vehicle
[average, cng, diesel, electric, gasoline, hybrid, hydrogen, plug-in_hybrid]
- only used for car, bus and train
:param occupancy: Occupancy of the vehicle in % [20, 50, 80, 100] - only used for bus
:param seating: seating class ["average", "Economy class", "Premium economy class", "Business class", "First class"]
- only used for plane
:param passengers: Number of passengers in the vehicle (including the participant), number from 1 to 9
Expand All @@ -147,7 +145,6 @@ def calc_co2_businesstrip(
:type distance: Kilometer
:type size: str
:type fuel_type: str
:type occupancy: int
:type seating: str
:type passengers: int
:type roundtrip: bool
Expand Down Expand Up @@ -211,7 +208,6 @@ def calc_co2_commuting(
weekly_distance: Kilometer,
size: Size = None,
fuel_type: BusFuel | CarFuel | TrainFuel = None,
occupancy: int = None,
passengers: int = None,
) -> Kilogram:
"""Calculate co2 emissions for commuting per mode of transport
Expand All @@ -220,13 +216,11 @@ def calc_co2_commuting(
:param weekly_distance: distance in km per week
:param size: size of car or bus if applicable: [small, medium, large, average]
:param fuel_type: fuel type of car, bus or train if applicable
:param occupancy: occupancy [%], if applicable/known (only for bus): [20, 50, 80, 100]
:param passengers: number of passengers, if applicable (only for car)
:type transportation_mode: str
:type weekly_distance: Kilometer
:type size: str
:type fuel_type: str
:type occupancy: int
:type passengers: int
:return: total weekly emissions for the respective mode of transport
:rtype: Kilogram
Expand Down
3 changes: 0 additions & 3 deletions co2calculator/data_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ def _search_factors(self, parameters, emission_category):
# Select table for emission category
candidates = self.databases[emission_category]
for k, v in parameters.items():
# TODO: shortterm hack to make it work until occupancy is removed from emission factors
if not isinstance(v, int):
v = str(v.value)
if v is None or k not in candidates.columns:
continue
new_candidates = candidates[candidates[k] == v]
Expand Down

0 comments on commit 522ed6d

Please sign in to comment.