Skip to content

Commit

Permalink
Merge branch 'main' into fix/merge-conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
elvbom authored Jun 3, 2024
2 parents 7dfba32 + 985046b commit f6e67a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/issues/emissions/emission_data_calculations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=invalid-name
# -*- coding: utf-8 -*-

import datetime
Expand Down Expand Up @@ -66,7 +67,6 @@ def deduct_cement(df, cement_deduction):

return df_cem


def calculate_municipality_budgets(df, last_year_in_range, current_year, budget_year):
"""
Calculates the budget for each municipality based on emission data.
Expand Down Expand Up @@ -101,7 +101,8 @@ def calculate_municipality_budgets(df, last_year_in_range, current_year, budget_
temp = []
if approximated_years_since_budget:
for i in range(len(df)):
# Get index in approximated historical series for the year from which emissions need to be subtracted
# Get index in approximated historical series for
# the year from which emissions need to be subtracted
approximated_years = list(df.iloc[i]['approximatedHistorical'].keys())
start_subtract_year_idx = approximated_years.index(approximated_years_since_budget[0])
# Get approximated values and years since budget
Expand Down Expand Up @@ -161,7 +162,6 @@ def calculate_paris_path(df, last_year_in_range, current_year, budget_year):

return df


def calculate_historical_change_percent(df, last_year_in_range):
"""
Calculate the historical average emission level change based on SMHI data from 2015 onwards.
Expand Down

0 comments on commit f6e67a2

Please sign in to comment.