lets_plot.geo_data.geocode_cities

lets_plot.geo_data.geocode_cities(names=None) lets_plot.geo_data.geocoder.NamesGeocoder

Create a NamesGeocoder object for cities. Allow to refine ambiguous request with where() method, with a scope that limits area of geocoding or with parents.

Parameters
namesstr or list

Names of objects to be geocoded.

Returns
NamesGeocoder

Geocoder object specification.

Examples

1from IPython.display import display
2from lets_plot import *
3from lets_plot.geo_data import *
4LetsPlot.setup_html()
5cities = geocode_cities(['York', 'Jersey'])\
6         .where(name='Jersey', scope='New Jersey').get_boundaries()
7display(cities)
8ggplot() + geom_map(aes(fill='found name'), data=cities, color='white')
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).
city found name geometry
0 York New York MULTIPOLYGON (((-73.75654 40.61069, -73.75534 ...
1 Jersey Jersey City POLYGON ((-74.06605 40.66697, -74.07772 40.672...