solution_070b.py

#!/usr/bin/python3
# ====================================================================
# OSMNX - geocoding / geolocation
# from: pygis.io/docs/d_access_osm.html
# --------------------------------------------------------------------
# pip install osmnx
# ====================================================================

# import osmnx
import osmnx as ox
import geopandas as gpd

#place_name = 'Edgewood Washington, DC, USA'
#place_name = 'Altadena, CA, USA'   # FAILED

place_name = 'Pasadena, CA, USA'

# Get place boundary related to the place name as a geodataframe

area = ox.geocode_to_gdf(place_name)

print()
print(f'area type {type(area)}')

print(area)