Skip to content

Commit 815ae21

Browse files
geo pandas upgrade (#1084)
* un-restrict pandas and geopandas max version * fix deprecation failure * avoid failure by inaccuracy (requires root cause investigation before PR is merged) * update changelog
1 parent 1d266b6 commit 815ae21

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,29 @@ Code freeze date: YYYY-MM-DD
1010

1111
### Dependency Changes
1212

13+
Added:
14+
15+
- `fiona` >=1.10
16+
17+
Updated:
18+
19+
- `geopandas` >=0.14,<1.0 → >=0.14
20+
- `pandas` >=2.1,<2.2 → >=2.1
21+
1322
Removed:
1423

1524
- `pandas-datareader`
16-
- `intensity_thres` of `Hazard`, `StormEurope`, and `TropCyclones` object [#1065](https://github.com/CLIMADA-project/climada_python/pull/1065)
17-
- Deprecated method `climada.hazard.trop_cyclone.trop_cyclone.TropCyclone.set_from_tracks` [#1065](https://github.com/CLIMADA-project/climada_python/pull/1065)
1825

1926
### Added
27+
2028
- Added optional parameter to `geo_im_from_array`, `plot_from_gdf`, `plot_rp_imp`, `plot_rp_intensity`,
2129
`plot_intensity`, `plot_fraction`, `_event_plot` to mask plotting when regions are too far from data points [#1047](https://github.com/CLIMADA-project/climada_python/pull/1047). To recreate previous plots (no masking), the parameter can be set to None.
2230
- Added instructions to install Climada petals on Euler cluster in `doc.guide.Guide_Euler.ipynb` [#1029](https://github.com/CLIMADA-project/climada_python/pull/1029)
2331

2432
- `ImpactFunc` and `ImpactFuncSet` now support equality comparisons via `==` [#1027](https://github.com/CLIMADA-project/climada_python/pull/1027)
2533

2634
### Changed
35+
2736
- Changed the default mask_distance in `util.plot.geo_im_from_array` to 0.03 to avoid white gaps in gridded hazard data with comparably low resolution (>80 centroids per axis) [#1073](https://github.com/CLIMADA-project/climada_python/pull/1073)
2837
- Increased speed of `util.plot.add_shapes` by avoiding for loops, substantially speeding up `Hazard.plot_intensity` and other functions. [#1073](https://github.com/CLIMADA-project/climada_python/pull/1073)
2938
- `Hazard.local_exceedance_intensity`, `Hazard.local_return_period` and `Impact.local_exceedance_impact`, `Impact.local_return_period`, using the `climada.util.interpolation` module: New default (no binning), binning on decimals, and faster implementation [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)
@@ -41,6 +50,8 @@ Removed:
4150
### Removed
4251

4352
- `climada.util.interpolation.round_to_sig_digits` [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)
53+
- `intensity_thres` of `Hazard`, `StormEurope`, and `TropCyclones` object [#1065](https://github.com/CLIMADA-project/climada_python/pull/1065)
54+
- Deprecated method `climada.hazard.trop_cyclone.trop_cyclone.TropCyclone.set_from_tracks` [#1065](https://github.com/CLIMADA-project/climada_python/pull/1065)
4455

4556
## 6.0.1
4657

climada/engine/impact_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def clean_emdat_df(
774774
df_data["Start Day"] = np.array(day_list, dtype="int")
775775
df_data["Start Year"] = np.array(year_list, dtype="int")
776776
for var in ["Disaster Subtype", "Disaster Type", "Country"]:
777-
df_data[VARNAMES_EMDAT[target_version][var]].fillna("None", inplace=True)
777+
df_data.fillna({VARNAMES_EMDAT[target_version][var]: "None"}, inplace=True)
778778

779779
# (3) Filter by countries, year range, and disaster type
780780
# (3.1) Countries:

requirements/env_climada.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ dependencies:
99
- contextily>=1.6
1010
- dask>=2025.2
1111
- eccodes>=2.40
12+
- fiona>=1.10
1213
- gdal>=3.10
13-
- geopandas>=0.14,<1.0 # geopandas 1.0 does not depend on fiona anymore, hence fiona would need to be added as dependency
14+
- geopandas>=0.14
1415
- h5py>=3.12
1516
- haversine>=2.9
1617
- matplotlib-base>=3.10
@@ -19,7 +20,7 @@ dependencies:
1920
- numexpr>=2.10
2021
- openpyxl>=3.1
2122
- osm-flex>=1.1
22-
- pandas>=2.1,<2.2 # 2.2 is not compatible with the default pytables=3.7 and yields a very high deprecation warning number through geopandas
23+
- pandas>=2.1
2324
- pathos>=0.3
2425
- pint>=0.24
2526
- pip

0 commit comments

Comments
 (0)