Skip to content

Conversation

@spjuhel
Copy link
Collaborator

@spjuhel spjuhel commented Apr 2, 2025

Changes proposed in this PR:

Implements RiskTrajectory objects to ease the evaluation of risk / impact in between two points in time.

See the associated discussion here: #1039

A notebook showcasing this new module is available in doc/tutorial/climada_trajectory.ipynb. (It is not a real tutorial yet, but will serve as its basis).

Also note that the future option appraisal module will be based on this.

Remaining TODO s

  • Sort the list of Snapshot by their date when instantiating
  • Add a check that Exposures have the same shape within a risk trajectory.
  • Add a check that group_id are identical for Exposures or handle that case (Handled, different group_id are possible, metric is computed at each date and interpolated in between)
  • Make a decision about risk transfer (possibly after discussion with @chahank, see Integration of risk trajectories within climada #1039 ):
  • Make plots nicer, also cleanup "plot.py" file (no longer needed?)
  • Write extensive guide (see Integration of risk trajectories within climada #1039 )

PR Author Checklist

PR Reviewer Checklist

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@spjuhel
Copy link
Collaborator Author

spjuhel commented Apr 4, 2025

I created a discussion here #1039
I think it is better than an Issue, as we will probably continue this discussion if/when we want to integrate timeseries in the future.

@spjuhel
Copy link
Collaborator Author

spjuhel commented Nov 4, 2025

Can I ask when you plan to continue and finish the review?
The code should be very stable now.

- Adds constants for columns name and other repeatedly used strings
- Adds a reordering df columns function (also fixes column order inconsistencies)
- Changes period AAI from sum to average
- Fixes bugs when group_id not defined (also now returns None instead of empty df
- Adds convenience function in Snapshot for ImpactCalc init
- Now sorts snapshots list by date in base class
- Now allows None for risk_disc_rates
@spjuhel
Copy link
Collaborator Author

spjuhel commented Dec 18, 2025

This pull request has been separated into sub PRs: #1197 #1198 #1199 #1200 #1201

@spjuhel spjuhel closed this Dec 18, 2025
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