From 22e0644802058bd0ed39a6c92ce9b7019f8c9efe Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Fri, 27 Oct 2023 14:07:56 -0700 Subject: [PATCH] fix examples/KML.ipynb because Recent versions of geopandas import fiona dynamically, and gpd.io.file.fiona is initially None. --- examples/KML.ipynb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/KML.ipynb b/examples/KML.ipynb index 63764b5c9..a1e07a0c5 100644 --- a/examples/KML.ipynb +++ b/examples/KML.ipynb @@ -16,7 +16,8 @@ "outputs": [], "source": [ "from ipyleaflet import Map, GeoData\n", - "import geopandas as gpd" + "import geopandas as gpd\n", + "import fiona" ] }, { @@ -29,7 +30,7 @@ "\n", "m = Map(center=[41.8781, -87.6298], zoom=4)\n", "\n", - "gpd.io.file.fiona.drvsupport.supported_drivers[\"KML\"] = \"rw\"\n", + "fiona.drvsupport.supported_drivers[\"KML\"] = \"rw\"\n", "us_states = gpd.read_file(\"data/us-states.kml\", driver=\"KML\")\n", "\n", "geo_data = GeoData(\n", @@ -47,11 +48,18 @@ "m.add(geo_data)\n", "m" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -65,7 +73,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.11.3" } }, "nbformat": 4,