geocode

class lovelyrita.geocode.Geocoder(geocodes=None, api_url='https://maps.googleapis.com/maps/api/geocode/', api_key='')[source]

Bases: object

Methods

geocode(address) Pull data from Google Maps API
geocode(address)[source]

Pull data from Google Maps API

Parameters:address : str
class lovelyrita.geocode.PostGISGeocoder(host='172.17.0.3', port='5432', database='postgres', user='postgres', password='mysecretpassword')[source]

Bases: object

Methods

geocode(address) Get the latitude and longitude of an address
geocode(address)[source]

Get the latitude and longitude of an address

Parameters:

address : str

Returns:

A dictionary containing keys latitude, longitude, street_number, street_name, street_type, and

rating (a numeric value indicating how uncertain the geocoding is)

lovelyrita.geocode.geocode_citations(citations, rating=10, geocoder=None)[source]

Geocode a DataFrame of citations