Skip to content

Commit

Permalink
updates for 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Apr 3, 2024
1 parent 8519b41 commit 4b46d77
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions notebooks/01-overview-osmnx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\")"
]
Expand All @@ -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\")"
]
Expand Down
10 changes: 5 additions & 5 deletions notebooks/03-graph-place-queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
]
},
Expand Down Expand Up @@ -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\")"
]
Expand All @@ -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\")"
]
Expand All @@ -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\")"
]
Expand Down
2 changes: 1 addition & 1 deletion notebooks/06-stats-indicators-centrality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\")"
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/10-building-footprints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit 4b46d77

Please sign in to comment.