lets_plot.geo_data.geocode_counties¶
- lets_plot.geo_data.geocode_counties(names=None) lets_plot.geo_data.geocoder.NamesGeocoder ¶
Create a NamesGeocoder object for counties. 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() 5counties = geocode_counties().scope('NY').get_boundaries(9) 6display(counties.head()) 7ggplot() + geom_map(data=counties) + ggtitle('New York State Counties')
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).
county found name geometry 0 Erie County Erie County MULTIPOLYGON (((-78.66760 42.48830, -78.67035 ... 1 Niagara County Niagara County MULTIPOLYGON (((-78.57971 43.08694, -78.58246 ... 2 Orleans County Orleans County MULTIPOLYGON (((-78.03040 43.36712, -78.02765 ... 3 Genesee County Genesee County MULTIPOLYGON (((-78.46436 43.12905, -78.46436 ... 4 Cattaraugus County Cattaraugus County MULTIPOLYGON (((-78.51105 42.52677, -78.50830 ...