Skip to content

Commit

Permalink
Added offsets to CorrectLevel1Registrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
djgroen committed Nov 13, 2023
1 parent d4d5daf commit 53aba7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flee/datamanager/handle_refugee_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def correctLevel1Registrations(self, name: str, date: str) -> float:
if int(ref_table[i][0]) == int(days):
# then scale all previous entries by ref_table[i][1]/ref_table[i-1][1]
if i > 0:
first_level_2_value = ref_table[i, 1]
last_level_1_value = ref_table[i - 1, 1]
first_level_2_value = ref_table[i, 1] + self.offsets.get(name, 0)
last_level_1_value = ref_table[i - 1, 1] + self.offsets.get(name, 0)
# print(days, i, ref_table[0:i,1])
ref_table[0:i, 1] *= first_level_2_value / last_level_1_value
# print(first_level_2_value, last_level_1_value, ref_table[0:i,1])
Expand Down

0 comments on commit 53aba7b

Please sign in to comment.