geopandas.tools.
geocode
Geocode a set of strings and get a GeoDataFrame of the resulting points.
Specifies geocoding service to use. If none is provided, will use ‘geocodefarm’ with a rate limit applied (see the geocodefarm terms of service at: https://geocode.farm/geocoding/free-api-documentation/ ).
Either the string name used by geopy (as specified in geopy.geocoders.SERVICE_TO_GEOCODER) or a geopy Geocoder instance (e.g., geopy.geocoders.GeocodeFarm) may be used.
Some providers require additional arguments such as access keys See each geocoder’s specific parameters in geopy.geocoders
Notes
Ensure proper use of the results by consulting the Terms of Service for your provider.
Geocoding requires geopy. Install it using ‘pip install geopy’. See also https://github.com/geopy/geopy
Examples
>>> df = geocode(['boston, ma', '1600 pennsylvania ave. washington, dc']) >>> df address \ 0 Boston, MA, USA 1 1600 Pennsylvania Avenue Northwest, President'... geometry 0 POINT (-71.0597732 42.3584308) 1 POINT (-77.0365305 38.8977332)