Skip to content

Commit

Permalink
fix for 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed May 17, 2024
1 parent 1d05673 commit 0061c45
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
18 changes: 17 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion notebooks/00-osmnx-features-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions notebooks/01-overview-osmnx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
},
Expand Down Expand Up @@ -484,7 +484,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
8 changes: 5 additions & 3 deletions notebooks/04-simplify-graph-consolidate-nodes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
},
Expand Down Expand Up @@ -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)"
]
},
Expand Down Expand Up @@ -233,7 +235,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0061c45

Please sign in to comment.