Skip to content

Commit

Permalink
fix epu.py module error
Browse files Browse the repository at this point in the history
  • Loading branch information
ccxzhang committed Jan 26, 2024
1 parent 36eb57f commit bf289c0
Show file tree
Hide file tree
Showing 15 changed files with 671 additions and 671 deletions.
138 changes: 69 additions & 69 deletions outputs/text/fiji/epu/fiji_epu.csv

Large diffs are not rendered by default.

Binary file added outputs/text/fiji/epu/fiji_epu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
208 changes: 104 additions & 104 deletions outputs/text/pacific/epu/pacific_epu.csv

Large diffs are not rendered by default.

Binary file added outputs/text/pacific/epu/pacific_epu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
200 changes: 100 additions & 100 deletions outputs/text/papua_new_guinea/epu/papua_new_guinea_epu.csv

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 98 additions & 98 deletions outputs/text/samoa/epu/samoa_epu.csv

Large diffs are not rendered by default.

Binary file added outputs/text/samoa/epu/samoa_epu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 102 additions & 102 deletions outputs/text/solomon_islands/epu/solomon_islands_epu.csv

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
178 changes: 89 additions & 89 deletions outputs/text/tonga/epu/tonga_epu.csv

Large diffs are not rendered by default.

Binary file added outputs/text/tonga/epu/tonga_epu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
216 changes: 108 additions & 108 deletions outputs/text/vanuatu/epu/vanuatu_epu.csv

Large diffs are not rendered by default.

Binary file added outputs/text/vanuatu/epu/vanuatu_epu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/text/epu.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,6 @@ def calculate_epu_score(self):
for name, col in zip(["weighted", "unweighted"],
["z_score_weighted", "z_score_unweighted"]):
scaling_factor = 100 / \
(self.epu_stats[self.epu_stats.date < self.cutoff][col].std())
(self.epu_stats[self.epu_stats.date < self.cutoff][col].mean())
self.epu_stats[f"epu_{name}"] = scaling_factor * \
self.epu_stats[col]

0 comments on commit bf289c0

Please sign in to comment.