Skip to content

Commit 22e0644

Browse files
committed
fix examples/KML.ipynb because Recent versions of geopandas import fiona dynamically, and gpd.io.file.fiona is initially None.
1 parent 1e48a1f commit 22e0644

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

examples/KML.ipynb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"outputs": [],
1717
"source": [
1818
"from ipyleaflet import Map, GeoData\n",
19-
"import geopandas as gpd"
19+
"import geopandas as gpd\n",
20+
"import fiona"
2021
]
2122
},
2223
{
@@ -29,7 +30,7 @@
2930
"\n",
3031
"m = Map(center=[41.8781, -87.6298], zoom=4)\n",
3132
"\n",
32-
"gpd.io.file.fiona.drvsupport.supported_drivers[\"KML\"] = \"rw\"\n",
33+
"fiona.drvsupport.supported_drivers[\"KML\"] = \"rw\"\n",
3334
"us_states = gpd.read_file(\"data/us-states.kml\", driver=\"KML\")\n",
3435
"\n",
3536
"geo_data = GeoData(\n",
@@ -47,11 +48,18 @@
4748
"m.add(geo_data)\n",
4849
"m"
4950
]
51+
},
52+
{
53+
"cell_type": "code",
54+
"execution_count": null,
55+
"metadata": {},
56+
"outputs": [],
57+
"source": []
5058
}
5159
],
5260
"metadata": {
5361
"kernelspec": {
54-
"display_name": "Python 3",
62+
"display_name": "Python 3 (ipykernel)",
5563
"language": "python",
5664
"name": "python3"
5765
},
@@ -65,7 +73,7 @@
6573
"name": "python",
6674
"nbconvert_exporter": "python",
6775
"pygments_lexer": "ipython3",
68-
"version": "3.7.6"
76+
"version": "3.11.3"
6977
}
7078
},
7179
"nbformat": 4,

0 commit comments

Comments
 (0)