import requests


def getLatLon(location):
    """
    Uses the "Google-style geocoder" API at datasciencetoolkit.org to return the latitude and longitude for a location
    """
    if not isinstance(location, str):
        raise ValueError
    url = 'http://www.datasciencetoolkit.org/maps/api/geocode/json?sensor=false&address='
    response = requests.get(url+location)
    location = response.json()['results'][0]['geometry']['location']
    return (location['lat'], location['lng'])