Skip to content

Commit 2921126

Browse files
authored
Merge pull request #1968 from ocefpaf/fix_crs_deprecation
Fix crs deprecation in geopandas
2 parents 6757906 + 16bcc5c commit 2921126

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_folium.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_choropleth_geopandas_numeric(self):
271271
geo_data = json.load(f)
272272

273273
geo_data_frame = gpd.GeoDataFrame.from_features(geo_data["features"])
274-
geo_data_frame.crs = {"init": "epsg:4326"}
274+
geo_data_frame = geo_data_frame.set_crs("epsg: 4326")
275275
fill_color = "BuPu"
276276
key_on = "feature.id"
277277

@@ -302,7 +302,7 @@ def test_choropleth_geopandas_mixed(self):
302302
geo_data = json.load(f)
303303

304304
geo_data_frame = gpd.GeoDataFrame.from_features(geo_data["features"])
305-
geo_data_frame.crs = {"init": "epsg:4326"}
305+
geo_data_frame = geo_data_frame.set_crs("epsg: 4326")
306306
data = pd.DataFrame(
307307
{
308308
"idx": {"0": 0, "1": "1", "2": 2, "3": 3, "4": 4, "5": 5},
@@ -348,7 +348,7 @@ def test_choropleth_geopandas_str(self):
348348
geo_data = json.load(f)
349349

350350
geo_data_frame = gpd.GeoDataFrame.from_features(geo_data["features"])
351-
geo_data_frame.crs = {"init": "epsg:4326"}
351+
geo_data_frame = geo_data_frame.set_crs("epsg: 4326")
352352
data = pd.DataFrame(
353353
{
354354
"idx": {"0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5"},

0 commit comments

Comments
 (0)