Skip to content

Commit

Permalink
Fixes carbon metrics data fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
biwano committed Sep 13, 2023
1 parent 0ab1d0a commit 90d72c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/apps/services/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def all(self, _df):
all = polygon
all = all.merge(eth, how="outer", left_on="date_polygon", right_on="date_eth")
all = all.merge(celo, how="outer", left_on="date_polygon", right_on="date_celo")
all["date"] = all.date_polygon.combine_first(all.date_eth).combine_first(all.date_celo)
all = all.rename(columns={
"total_klima_retirements_polygon": "total_klima_retirements",
"date_polygon": "date"
Expand All @@ -47,6 +48,7 @@ def all(self, _df):
"total_retirements_eth",
"total_retirements_celo"
])
all = all.fillna(0)
return all

@final_cached_command()
Expand Down

0 comments on commit 90d72c2

Please sign in to comment.