Skip to content

Commit

Permalink
Merge pull request #72 from gboeing/1.6.0
Browse files Browse the repository at this point in the history
version bump to 1.6.0
  • Loading branch information
gboeing authored Jul 28, 2023
2 parents 20baf98 + e6aa59c commit fef107d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
cache-downloads: true
cache-environment: true
environment-file: tests/environment-tests.yml
environment-file: environment.yml
post-cleanup: none

- name: Lint notebooks
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ channels:
- conda-forge
dependencies:
- jupyterlab
- osmnx=1.5.1
- osmnx=1.6.0
- pillow
- pre-commit
- python=3.11.*
- python-igraph
23 changes: 8 additions & 15 deletions notebooks/03-graph-place-queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,18 @@
"metadata": {},
"outputs": [],
"source": [
"# you can also buffer the place boundaries (0.5 km in this example)\n",
"gdf = ox.geocode_to_gdf(\"Piedmont, California, USA\", buffer_dist=500)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# you can get multiple places in a single query\n",
"# you can get multiple countries in a single query\n",
"gdf = ox.geocode_to_gdf([\"United Kingdom\", \"Ireland\"])\n",
"\n",
"# or optionally buffer them\n",
"# or multiple cities\n",
"places = [\n",
" \"Berkeley, California, USA\",\n",
" \"Oakland, California, USA\",\n",
" \"Piedmont, California, USA\",\n",
" \"Emeryville, California, USA\",\n",
" \"Alameda, Alameda County, CA, USA\",\n",
"]\n",
"gdf = ox.geocode_to_gdf(places, buffer_dist=500)"
"gdf = ox.geocode_to_gdf(places)"
]
},
{
Expand Down Expand Up @@ -246,8 +236,11 @@
"metadata": {},
"outputs": [],
"source": [
"# you can also get a network with a buffer distance (meters) around the place\n",
"G = ox.graph_from_place(\"Piedmont, California, USA\", network_type=\"walk\", buffer_dist=200)"
"# or get the walking network within a 500 meter buffer of piedmont\n",
"polygon = ox.geocode_to_gdf(\"Piedmont, California, USA\").loc[0, \"geometry\"]\n",
"poly_proj, crs_proj = ox.projection.project_geometry(polygon)\n",
"polygon, _ = ox.projection.project_geometry(poly_proj.buffer(500), crs=crs_proj, to_latlong=True)\n",
"G = ox.graph_from_polygon(polygon, network_type=\"walk\")"
]
},
{
Expand Down
10 changes: 0 additions & 10 deletions tests/environment-tests.yml

This file was deleted.

0 comments on commit fef107d

Please sign in to comment.