lets_plot.geo_data.geocode_countries

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

Create a NamesGeocoder object for countries. Allow to refine ambiguous request with where() method.

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()
5countries = geocode_countries(['Germany', 'Poland']).inc_res().get_boundaries()
6display(countries)
7ggplot() + geom_map(aes(fill='found name'), data=countries, color='white')
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).
country found name geometry
0 Germany Germany MULTIPOLYGON (((7.47070 49.15297, 7.47070 49.1...
1 Poland Poland MULTIPOLYGON (((22.89551 49.03787, 22.89551 49...