Improve efficiency of local exceedance intensitry/impact and local return periods functions by ValentinGebhart · Pull Request #1012 · CLIMADA-project/climada_python
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best way is to do gdf, title, columns = hazard.local_exceedance_intensity() and u_plot.plot_from_gdf(gdf, title, columns). Then you can just change the plot options by repeating the second step, without recalculating the gdf. The plot_rp_intensity is just a wrapper around these two functions, which is why I asked if we want to keep it in the first place.
One way of not repeating the calculation here if one calls the function plot_rp_intensity twice would be to save the local exceedance gdf as an attribute of the Hazard object, but I don't think we want to do that?