Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for v1.9.2 in prep for v2 #84

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates for 1.9.2
gboeing committed Apr 3, 2024
commit 4b46d7715567bbc50888e204748fcc464914c2ff
4 changes: 2 additions & 2 deletions notebooks/01-overview-osmnx.ipynb
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@
"source": [
"# get the boundary polygon for manhattan, project it, and plot it\n",
"city = ox.geocode_to_gdf(\"Manhattan, New York, USA\")\n",
"city_proj = ox.project_gdf(city)\n",
"city_proj = ox.projection.project_gdf(city)\n",
"ax = city_proj.plot(fc=\"gray\", ec=\"none\")\n",
"_ = ax.axis(\"off\")"
]
@@ -88,7 +88,7 @@
"]\n",
"east_bay = ox.geocode_to_gdf(place_names)\n",
"east_bay.to_file(\"./data/east_bay.gpkg\", driver=\"GPKG\")\n",
"east_bay = ox.project_gdf(east_bay)\n",
"east_bay = ox.projection.project_gdf(east_bay)\n",
"ax = east_bay.plot(fc=\"gray\", ec=\"none\")\n",
"_ = ax.axis(\"off\")"
]
10 changes: 5 additions & 5 deletions notebooks/03-graph-place-queries.ipynb
Original file line number Diff line number Diff line change
@@ -121,8 +121,8 @@
")\n",
"\n",
"# the city is a very small part of the county\n",
"alameda1 = ox.project_gdf(alameda1)\n",
"alameda2 = ox.project_gdf(alameda2)\n",
"alameda1 = ox.projection.project_gdf(alameda1)\n",
"alameda2 = ox.projection.project_gdf(alameda2)\n",
"alameda2.area.iloc[0] / alameda1.area.iloc[0]"
]
},
@@ -173,7 +173,7 @@
"source": [
"# you can pass multiple queries with mixed types (dicts and strings)\n",
"mx_gt_tx = ox.geocode_to_gdf([{\"country\": \"Mexico\"}, \"Guatemala\", {\"state\": \"Texas\"}])\n",
"mx_gt_tx = ox.project_gdf(mx_gt_tx)\n",
"mx_gt_tx = ox.projection.project_gdf(mx_gt_tx)\n",
"ax = mx_gt_tx.plot(fc=\"gray\", ec=\"w\")\n",
"_ = ax.axis(\"off\")"
]
@@ -192,7 +192,7 @@
"outputs": [],
"source": [
"france = ox.geocode_to_gdf(\"France\")\n",
"france = ox.project_gdf(france)\n",
"france = ox.projection.project_gdf(france)\n",
"ax = france.plot(fc=\"gray\", ec=\"none\")\n",
"_ = ax.axis(\"off\")"
]
@@ -203,7 +203,7 @@
"metadata": {},
"outputs": [],
"source": [
"france = ox.project_gdf(ox.geocode_to_gdf(\"R1403916\", by_osmid=True))\n",
"france = ox.projection.project_gdf(ox.geocode_to_gdf(\"R1403916\", by_osmid=True))\n",
"ax = france.plot(fc=\"gray\", ec=\"none\")\n",
"_ = ax.axis(\"off\")"
]
2 changes: 1 addition & 1 deletion notebooks/06-stats-indicators-centrality.ipynb
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@
"# get the street network for a place, and its area in square meters\n",
"place = \"Piedmont, California, USA\"\n",
"gdf = ox.geocode_to_gdf(place)\n",
"area = ox.project_gdf(gdf).unary_union.area\n",
"area = ox.projection.project_gdf(gdf).unary_union.area\n",
"G = ox.graph_from_place(place, network_type=\"drive\")"
]
},
2 changes: 1 addition & 1 deletion notebooks/10-building-footprints.ipynb
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@
"outputs": [],
"source": [
"gdf = ox.features_from_place(\"Piedmont, California, USA\", tags)\n",
"gdf_proj = ox.project_gdf(gdf)\n",
"gdf_proj = ox.projection.project_gdf(gdf)\n",
"fp = f\"./{img_folder}/piedmont_bldgs.{extension}\"\n",
"fig, ax = ox.plot_footprints(gdf_proj, filepath=fp, dpi=400, save=True, show=False, close=True)\n",
"Image(fp, height=size, width=size)"