Skip to content

Commit

Permalink
Merge pull request #722 from PyPSA/carbon-management
Browse files Browse the repository at this point in the history
Carbon management
  • Loading branch information
fneum authored Aug 14, 2023
2 parents 1a60dcb + fc64649 commit d7554bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/build_sequestration_potentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def allocate_sequestration_potential(
overlay["share"] = area(overlay) / overlay["area_sqkm"]
adjust_cols = overlay.columns.difference({"name", "area_sqkm", "geometry", "share"})
overlay[adjust_cols] = overlay[adjust_cols].multiply(overlay["share"], axis=0)
gdf_regions = overlay.groupby("name").sum()
gdf_regions.drop(["area_sqkm", "share"], axis=1, inplace=True)
return gdf_regions.squeeze()
return overlay.dissolve("name", aggfunc="sum")[attr]


if __name__ == "__main__":
Expand Down

0 comments on commit d7554bc

Please sign in to comment.