Skip to content

Instantly share code, notes, and snippets.

@edsu
Created February 27, 2013 03:35
Show Gist options
  • Save edsu/5044808 to your computer and use it in GitHub Desktop.
Save edsu/5044808 to your computer and use it in GitHub Desktop.
>>> from jobs.models import FreebaseEntity
>>> f = FreebaseEntity()
>>> f.freebase_id = '/en/20901'
>>> geo = f.freebase_values('/location/location/geolocation')[0]
>>> geo.get_value('/location/geocode/latitude').value
39.0204
>>> geo.get_value('/location/geocode/longitude').value
-77.0115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment