From 0061c4501ef970fb9f2850f03e642f65b0c2b1b9 Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Fri, 17 May 2024 15:51:13 -0700 Subject: [PATCH] fix for 2.0 --- environment.yml | 18 +++++++++++++++++- notebooks/00-osmnx-features-demo.ipynb | 2 +- notebooks/01-overview-osmnx.ipynb | 4 ++-- .../04-simplify-graph-consolidate-nodes.ipynb | 8 +++++--- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/environment.yml b/environment.yml index 42113b7..45314b7 100644 --- a/environment.yml +++ b/environment.yml @@ -1,13 +1,29 @@ name: osmnx-examples channels: - conda-forge + dependencies: + # OSMnx required/optional dependencies + - gdal + - geopandas + - matplotlib + - networkx + - numpy + - pandas + - rasterio + - requests + - scipy + - scikit-learn + - shapely + + # other packages needed for CI or running examples - jupyterlab - - osmnx - pillow - pre-commit - python=3.12.* - python-igraph + + # install OSMnx beta via pip - pip - pip: - osmnx==2.0.0b0 diff --git a/notebooks/00-osmnx-features-demo.ipynb b/notebooks/00-osmnx-features-demo.ipynb index b9358f9..a4e91c7 100644 --- a/notebooks/00-osmnx-features-demo.ipynb +++ b/notebooks/00-osmnx-features-demo.ipynb @@ -454,7 +454,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/notebooks/01-overview-osmnx.ipynb b/notebooks/01-overview-osmnx.ipynb index b1c0de6..571353a 100644 --- a/notebooks/01-overview-osmnx.ipynb +++ b/notebooks/01-overview-osmnx.ipynb @@ -344,7 +344,7 @@ "outputs": [], "source": [ "# turn off strict mode and see what nodes we'd remove, in yellow\n", - "nc = [\"r\" if ox.simplification._is_endpoint(G, node, None) else \"y\" for node in G.nodes()]\n", + "nc = [\"r\" if ox.simplification._is_endpoint(G, node, None, None) else \"y\" for node in G.nodes()]\n", "fig, ax = ox.plot_graph(G, node_color=nc)" ] }, @@ -484,7 +484,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/notebooks/04-simplify-graph-consolidate-nodes.ipynb b/notebooks/04-simplify-graph-consolidate-nodes.ipynb index 6ef55bb..6dd5362 100644 --- a/notebooks/04-simplify-graph-consolidate-nodes.ipynb +++ b/notebooks/04-simplify-graph-consolidate-nodes.ipynb @@ -149,7 +149,7 @@ "outputs": [], "source": [ "# show which nodes we'd remove if we simplify it (yellow)\n", - "nc = [\"r\" if ox.simplification._is_endpoint(G, node, None) else \"y\" for node in G.nodes()]\n", + "nc = [\"r\" if ox.simplification._is_endpoint(G, node, None, None) else \"y\" for node in G.nodes()]\n", "fig, ax = ox.plot_graph(G, node_color=nc)" ] }, @@ -182,7 +182,9 @@ "outputs": [], "source": [ "# turn off strict mode and see what nodes we'd remove\n", - "nc = [\"r\" if ox.simplification._is_endpoint(G, node, [\"osmid\"]) else \"y\" for node in G.nodes()]\n", + "nc = [\n", + " \"r\" if ox.simplification._is_endpoint(G, node, [\"osmid\"], None) else \"y\" for node in G.nodes()\n", + "]\n", "fig, ax = ox.plot_graph(G, node_color=nc)" ] }, @@ -233,7 +235,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.3" } }, "nbformat": 4,