Skip to content

Conversation

sarah-hlsn
Copy link
Collaborator

@sarah-hlsn sarah-hlsn commented Sep 25, 2025

This PR updates the Impact Calculation tutorial

Changes proposed in this PR:

  • updated & fixed errors in code
  • removed visualisation section at the end (the basic visualisations for impacts are covered throughout the tutorial; if we want to retain information on fancier plots I would suggest moving that to a dedicated tutorial, rather than weighing this one down)
  • added a section about centroid assignment
  • light edits to the text for clarity

Note: I had to rerun a lot of parts of this notebook due to code changes througout.

PR Author Checklist

PR Reviewer Checklist

@sarah-hlsn sarah-hlsn marked this pull request as ready for review September 25, 2025 13:50
@emanuel-schmid
Copy link
Collaborator

This is not 100% correct, I'd say. 🧐

Exposures are geopandas dataframes with at least columns ‘latitude’, ‘longitude’ and ‘value’ of exposures. They are either defined as a series of (latitude/longitude) points or as a raster of (latitude/longitude) points. Fundamentally, this changes nothing for the impact computations. Note that for larger number of points, consider using a raster which might be more efficient (computationally). For a low number of points, avoid using a raster if this adds a lot of exposures values equal to 0.

Rather an Exposures contains a GeoDataFrame. And this one doesn't have any 'latitude'/'longitude' columns anymore.

@sarah-hlsn
Copy link
Collaborator Author

Thanks for catching that @emanuel-schmid! I'll edit accordingly.

@peanutfun
Copy link
Member

@sarah-hlsn Not to worry. The test fails because since the v6.1 release, CLIMADA does not support Python 3.10 anymore. But the pipeline still tries to build an environment based on 3.10, so it's expected to fail. The error occurs now because develop was merged into this branch after the release.

@sarah-hlsn
Copy link
Collaborator Author

Great, thanks for checking @peanutfun !

Copy link
Collaborator

@NicolasColombi NicolasColombi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sarah, the PR looks good to me!

Copy link
Collaborator

@spjuhel spjuhel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I thought this review was submitted already a long time ago.

Most important is the comment on the intensities/impact values in the plot.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "assingning" typo
  • Probably unrelated to the tutorial, but I wonder why are the hazard intensities/impacts so different for the "User defined point exposure and Tropical Cyclone hazard". The intensities look wrong, actually.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

I'm really curious/concerned with the intensities being between 0 and 1 in the point exposure example. This does not look to be related to your changes, but something is wrong somewhere. If you can briefly investigate, that would be wonderful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants