# from some place name, create a GeoDataFrame containing the geometry of the place
city = ox.gdf_from_place('Walnut Creek, California, USA')
# project the geometry to the appropriate UTM zone (calculated automatically) then plot it
city = ox.project_gdf(city)
fig, ax = ox.plot_shape(city)
# define a list of place names
place_names = ['Berkeley, California, USA',
'Oakland, California, USA',
'Piedmont, California, USA',
'Emeryville, California, USA',
'Alameda, Alameda County, CA, USA']
# create a GeoDataFrame with rows for each place in the list
east_bay = ox.gdf_from_places(place_names, gdf_name='east_bay_cities')
east_bay
-122.368679
POLYGON ((-122.3686792 37.8695716, -122.366813...
Berkeley, Alameda County, California, United S...
-122.114672
37.885368
37.632226
-122.355881
POLYGON ((-122.3558809 37.835727, -122.3301568...
Oakland, Alameda County, California, United St...
-122.210148
37.833026
37.812276
-122.249374
POLYGON ((-122.2493739 37.823649, -122.2491229...
Piedmont, Alameda County, California, United S...
-122.276012
37.849973
37.827075
-122.330157
POLYGON ((-122.3301568 37.841078, -122.3243159...
Emeryville, Alameda County, California, United...
-122.223859
37.800628
37.707621
-122.340281
POLYGON ((-122.3402809 37.800628, -122.3351599...
Alameda, Alameda County, California, United St...
# project the geometry to the appropriate UTM zone then plot it
east_bay = ox.project_gdf(east_bay)
fig, ax = ox.plot_shape(east_bay)
# pass in buffer_dist in meters
city_buffered = ox.gdf_from_place('Walnut Creek, California, USA', buffer_dist=250)
fig, ax = ox.plot_shape(city_buffered)