worldbank / blackmarblepy

Georeferenced Rasters and Statistics of Nightlights from NASA Black Marble
https://worldbank.github.io/blackmarblepy/
Mozilla Public License 2.0
32 stars 7 forks source link

Using gadm install by default geopandas 0.9.0 #58

Closed TokyAxel closed 9 months ago

TokyAxel commented 9 months ago

Description

Hi, i get this error : AttributeError: 'GeoSeries' object has no attribute 'iteritems' when i run the code below see in the documentation of blackmarblepy.

Reproducibility

from gadm import GADMDownloader
from blackmarble.extract import bm_extract from blackmarble.raster import bm_raster

gdf = GADMDownloader(version="4.0").get_shape_data_by_country_name( country_name="GHA", ad_level=1 ) r_202110 = bm_raster(gdf, product_id="VNP46A4", date_range="2023-01-01", bearer="token")

Possible Fix

When I install gadm, it installs geopandas==0.9.0 by default which is the source of the error, but when I re-install geopandas==0.10.2, it solves the issue.

I don't know if we can mention this in the documentation if you confirm that as an issue.

g4brielvs commented 9 months ago

@TokyAxel Thank you so much for reporting this issue! The gadm dependency is only necessary for the examples, so I'll opt to removing it altogether.