highRES-model / highRES-Europe-WF

https://highres-europe-wf.readthedocs.io/en/latest/
MIT License
0 stars 2 forks source link

[Bug] Update sjoins in new gpd version #57

Open OskarVagero opened 1 day ago

OskarVagero commented 1 day ago

With newer versions of geopandas, the "op" parameter of the sjoins function has been deprecated and replaced by the "predicate" parameter (https://geopandas.org/en/stable/docs/reference/api/geopandas.sjoin.html) . Anyone with a newer version of geopandas will run into errors of not being able to run the workflow on a nuts2 resolution as a result of this.

A simple fix should be to just replace "op" with "predicate" in the build_hydro notebook. Thanks to @guillerval for identifying the fix.

@James-Price Could you just verify that this change still works with your workflow? Seeing as you have not had the same issue, I would guess you are running an older version of geopandas.