lets_plot.geo_data.NamesGeocoder

class lets_plot.geo_data.NamesGeocoder(level: Optional[Union[str, lets_plot.geo_data.gis.request.LevelKind]] = None, request: Optional[Union[str, List[str], pandas.core.series.Series]] = None)

Do not use this class explicitly.

Instead you should construct its objects with special functions: geocode(), geocode_cities(), geocode_counties(), geocode_states(), geocode_countries(), reverse_geocode().

__init__(level: Optional[Union[str, lets_plot.geo_data.gis.request.LevelKind]] = None, request: Optional[Union[str, List[str], pandas.core.series.Series]] = None)

Initialize self.

scope(scope) lets_plot.geo_data.geocoder.NamesGeocoder

Limit area of interest to resolve an ambiguity.

Parameters

scope (str or Geocoder) – Area of interest. If it is of str type then it should be the geo-object name. If it is of Geocoder type then it must contain only one object.

Returns

Geocoder object specification.

Return type

NamesGeocoder

Examples

1from IPython.display import display
2from lets_plot import *
3from lets_plot.geo_data import *
4LetsPlot.setup_html()
5scope = geocode_states('Kentucky')
6city = geocode_cities('Franklin').scope(scope).get_boundaries()
7display(city)
8ggplot() + geom_map(data=city) + ggtitle('Franklin, Kentucky')
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).