Giter Site home page Giter Site logo

geopy's Introduction

geopy

© GeoPy Project and individual contributors, MIT License

geopy is a Python client for several popular geocoding web services.

geopy makes it easy for Python developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other data sources.

geopy includes geocoder classes for the Google Geocoding API (V3), the Yahoo! geocoder, geocoder.us, Bing Maps API, and several more Geocoder API services. The various geocoder classes are located in geopy.geocoders.

Notes

Installation

Using pip:

pip install geopy

Or, manually: Download the tarball from PyPI, unzip, and execute this in the same directory:

python setup.py install

Basic Geocoding

Examples

Using the GoogleV3 geocoder:

>>> from geopy import geocoders
>>> g = geocoders.GoogleV3()
>>> place, (lat, lng) = g.geocode("10900 Euclid Ave in Cleveland")
>>> print "%s: %.5f, %.5f" % (place, lat, lng)
10900 Euclid Ave, Cleveland, OH 44106, USA: 41.50489, -81.61027

Using the Yahoo! BOSS Geo PlaceFinder (requires a consumer key and secret):

>>> from geopy import geocoders
>>> y = geocoders.YahooPlaceFinder('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET')
>>> place, (lat, lng) = y.geocode_one("Thames Street, Newport, RI")
>>> print "%s: %.5f, %.5f" % (place, lat, lng)
Thames St, Newport, RI 02840, United States: 41.48327, -71.31461

More documentation and examples can be found on the old Google Code documentation site.

geopy's People

Contributors

davea avatar feanil avatar gregorynicholas avatar groovecoder avatar jbouvier avatar jhmaddox avatar mtigas avatar philipkimmey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.