title: OSMnx Creating and Saving Shapefiles
body: <p>I'm brand new (as of a week ago) to the OSMnx package and a semester into learning Python / GIS, so feel free to assume shocking ignorance on my part.</p>
  <p>My overall goal is to learn more about how to implement OSMnx to get OpenStreetMap (OSM) data on the city level. My secondary to create a bit of Python code that extracts OSM data that I can use as boundary data for Kernel Density Estimates in urban areas.</p>
  <p>My first goal is to get a polygon shapefile of Amherst, MA and save it to my computer.</p>
  <pre><code>tag_bound = {&quot;boundary&quot;:&quot;administrative&quot;,&quot;admin_level&quot;:7,&quot;area&quot;:True}
  amherst_bound = ox.geometries.geometries_from_place(place_name,tag_bound, which_result=None, buffer_dist=None)
  
  type(amherst_bound)
  
  
  # Check to make sure it looks reasonable by plotting it. See https://geoffboeing.com/2016/11/osmnx-python-street-networks/
  ox.project_gdf(amherst_bound).plot()
  _ = amherst_bound.axis('off')
  
  # Save the file
  amherst_bound.save_gdf_shapefile(filename= r&quot;C:\Users\afhal\Dropbox\Arboriculture\PythonGIS\finalproject\testshape.shp&quot;)
  
  </code></pre>
  <p>Two parts of the code have an error:</p>
  <blockquote>
  <ol>
  <li>Plotting Attribute Error</li>
  </ol>
  <p>AttributeError                            Traceback (most recent call
  last)  in ()
  29 type(amherst_bound)
  30 ox.project_gdf(amherst_bound).plot()
  ---&gt; 31 _ = amherst_bound.axis('off')
  32
  33 amherst_bound.save_gdf_shapefile(filename= r&quot;C:\Users\afhal\Dropbox\Arboriculture\PythonGIS\finalproject\testshape.shp&quot;)</p>
  <p>C:\Users\afhal.conda\envs\OpenStreetMap\lib\site-packages\pandas\core\generic.py
  in <strong>getattr</strong>(self, name)    5137             if
  self._info_axis._can_hold_identifiers_and_holds_name(name):    5138<br />
  return self[name]
  -&gt; 5139             return object.<strong>getattribute</strong>(self, name)    5140     5141     def <strong>setattr</strong>(self, name: str, value) -&gt; None:</p>
  <p>AttributeError: 'GeoDataFrame' object has no attribute 'axis'</p>
  </blockquote>
  <p>(Still produces this, which looks weird: <img src="https://i.stack.imgur.com/31iDT.png" alt="enter image description here" />)</p>
  <ol start="2">
  <li>Saving Attribute Error</li>
  </ol>
  <blockquote>
  <p>AttributeError   Traceback (most recent call last)
   in ()
  31 #_ = amherst_bound.axis('off')
  32
  ---&gt; 33 amherst_bound.save_gdf_shapefile(filename= r&quot;C:\Users\afhal\Dropbox\Arboriculture\PythonGIS\finalproject\testshape.shp&quot;)
  34
  35</p>
  <p>C:\Users\afhal.conda\envs\OpenStreetMap\lib\site-packages\pandas\core\generic.py
  in <strong>getattr</strong>(self, name)    5137             if
  self._info_axis._can_hold_identifiers_and_holds_name(name):    5138<br />
  return self[name]
  -&gt; 5139             return object.<strong>getattribute</strong>(self, name)    5140     5141     def <strong>setattr</strong>(self, name: str, value) -&gt; None:</p>
  <p>AttributeError: 'GeoDataFrame' object has no attribute
  'save_gdf_shapefile'</p>
  </blockquote>
  <p>I keep seeing people using DiGraphs instead of gdb (<a href="https://stackoverflow.com/questions/61080236/osmnx-creating-custom-queries-with-alternative-infrastructures">OSMnx: Creating Custom Queries with Alternative Infrastructures</a> and <a href="https://stackoverflow.com/questions/55183433/geopandas-and-osmnx-plotting-on-map">GeoPandas and OSMnx- plotting on map</a>), but I'm not sure why that would be preferred.</p>
  <p>Where am I going wrong with my plotting and saving?</p>