geopy

Geocoding library for Python.

https://github.com/geopy/geopy

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 132 committers (2.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

geocoder geocoding python

Keywords from Contributors

templates apps views closember geoparquet pallets optimizing-compiler tensor wsgi werkzeug
Last synced: 6 months ago · JSON representation

Repository

Geocoding library for Python.

Basic Info
Statistics
  • Stars: 4,636
  • Watchers: 87
  • Forks: 660
  • Open Issues: 47
  • Releases: 37
Topics
geocoder geocoding python
Created almost 16 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Authors

README.rst

geopy
=====

.. image:: https://img.shields.io/pypi/v/geopy.svg?style=flat-square
    :target: https://pypi.python.org/pypi/geopy/
    :alt: Latest Version

.. image:: https://img.shields.io/github/actions/workflow/status/geopy/geopy/ci.yml?branch=master&style=flat-square
    :target: https://github.com/geopy/geopy/actions/workflows/ci.yml?query=branch%3Amaster
    :alt: Build Status

.. image:: https://img.shields.io/github/license/geopy/geopy.svg?style=flat-square
    :target: https://pypi.python.org/pypi/geopy/
    :alt: 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 `OpenStreetMap Nominatim`_,
`Google Geocoding API (V3)`_, and many other geocoding services.
The full list is available on the `Geocoders doc section`_.
Geocoder classes are located in `geopy.geocoders`_.

.. _OpenStreetMap Nominatim: https://nominatim.org
.. _Google Geocoding API (V3): https://developers.google.com/maps/documentation/geocoding/
.. _Geocoders doc section: https://geopy.readthedocs.io/en/latest/#geocoders
.. _geopy.geocoders: https://github.com/geopy/geopy/tree/master/geopy/geocoders

geopy is tested against CPython (versions 3.7, 3.8, 3.9, 3.10, 3.11, 3.12)
and PyPy3. geopy 1.x line also supported CPython 2.7, 3.4 and PyPy2.

© geopy contributors 2006-2018 (see AUTHORS) under the `MIT
License `__.

Installation
------------

Install using `pip `__ with:

::

    pip install geopy

Or, `download a wheel or source archive from
PyPI `__.

Geocoding
---------

To geolocate a query to an address and coordinates:

.. code:: pycon

    >>> from geopy.geocoders import Nominatim
    >>> geolocator = Nominatim(user_agent="specify_your_app_name_here")
    >>> location = geolocator.geocode("175 5th Avenue NYC")
    >>> print(location.address)
    Flatiron Building, 175, 5th Avenue, Flatiron, New York, NYC, New York, ...
    >>> print((location.latitude, location.longitude))
    (40.7410861, -73.9896297241625)
    >>> print(location.raw)
    {'place_id': '9167009604', 'type': 'attraction', ...}

To find the address corresponding to a set of coordinates:

.. code:: pycon

    >>> from geopy.geocoders import Nominatim
    >>> geolocator = Nominatim(user_agent="specify_your_app_name_here")
    >>> location = geolocator.reverse("52.509669, 13.376294")
    >>> print(location.address)
    Potsdamer Platz, Mitte, Berlin, 10117, Deutschland, European Union
    >>> print((location.latitude, location.longitude))
    (52.5094982, 13.3765983)
    >>> print(location.raw)
    {'place_id': '654513', 'osm_type': 'node', ...}

Measuring Distance
------------------

Geopy can calculate geodesic distance between two points using the
`geodesic distance
`_ or the
`great-circle distance
`_,
with a default of the geodesic distance available as the function
`geopy.distance.distance`.

Here's an example usage of the geodesic distance, taking pair
of :code:`(lat, lon)` tuples:

.. code:: pycon

    >>> from geopy.distance import geodesic
    >>> newport_ri = (41.49008, -71.312796)
    >>> cleveland_oh = (41.499498, -81.695391)
    >>> print(geodesic(newport_ri, cleveland_oh).miles)
    538.390445368

Using great-circle distance, also taking pair of :code:`(lat, lon)` tuples:

.. code:: pycon

    >>> from geopy.distance import great_circle
    >>> newport_ri = (41.49008, -71.312796)
    >>> cleveland_oh = (41.499498, -81.695391)
    >>> print(great_circle(newport_ri, cleveland_oh).miles)
    536.997990696

Documentation
-------------

More documentation and examples can be found at
`Read the Docs `__.

Owner

  • Name: geopy
  • Login: geopy
  • Kind: organization

GitHub Events

Total
  • Issues event: 6
  • Watch event: 231
  • Issue comment event: 10
  • Pull request event: 8
  • Fork event: 29
Last Year
  • Issues event: 6
  • Watch event: 231
  • Issue comment event: 10
  • Pull request event: 8
  • Fork event: 29

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,086
  • Total Committers: 132
  • Avg Commits per committer: 8.227
  • Development Distribution Score (DDS): 0.494
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Kostya Esmukov k****a@e****u 550
ijl u****i@g****m 243
mike.tigas@gmail.com m****s@g****m@5****2 36
exogen e****n@5****2 22
Mike Tigas m****e@t****s 13
gary.bernhardt g****t@5****2 11
mike.tigas m****s@5****2 11
Pedro Rodrigues m****u@g****m 7
Jose Martin j****o@g****m 7
Mariana Georgieva m****a@v****m 5
Joel Natividad j****d@o****m 5
Afonso Queiros a****s@d****m 5
Jonathan Batchelor j****b@t****t 5
Michal Migurski m****e@t****m 5
Thomas t****r@y****r 5
svalee t****r@g****m 5
Charles Karney c****s@k****m 4
ironfroggy@gmail.com i****y@g****m@5****2 4
Mike Taves m****s@g****m 3
mtmail m****l@g****t 3
crccheck c@c****m 3
Pratheek Rebala p****a@g****m 3
Eric Palakovich Carr c****c@g****m 3
James Maddox j****x@g****m 3
Mateusz Konieczny m****z@g****m 3
Jordan Bouvier j****r@g****m 3
Martin s****s@p****t 3
galela g****n@w****m 2
ironfroggy i****y@5****2 2
dutko.adam d****m@5****2 2
and 102 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 84
  • Total pull requests: 57
  • Average time to close issues: 4 months
  • Average time to close pull requests: 5 months
  • Total issue authors: 70
  • Total pull request authors: 40
  • Average comments per issue: 2.56
  • Average comments per pull request: 0.6
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 7
  • Average time to close issues: about 12 hours
  • Average time to close pull requests: 2 minutes
  • Issue authors: 6
  • Pull request authors: 4
  • Average comments per issue: 0.83
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • KostyaEsmukov (7)
  • dvzrv (4)
  • matkoniecz (4)
  • duckontheweb (2)
  • xmedeko (2)
  • aioneersTL (1)
  • orangejulius (1)
  • rbeucher (1)
  • mihainipomici (1)
  • liki1017 (1)
  • samthiriot (1)
  • garrydoherty84 (1)
  • aleborba (1)
  • danjampro (1)
  • gaelsimon (1)
Pull Request Authors
  • KostyaEsmukov (8)
  • AVSISP (4)
  • dennisstritzke (3)
  • EwoutH (3)
  • brzdev (2)
  • sebastian-leonte (2)
  • cgroschupp (2)
  • kytta (2)
  • Juinjer (2)
  • gaelsimon (2)
  • mtmail (2)
  • eumiro (2)
  • saidtezel (2)
  • orangejulius (1)
  • samthiriot (1)
Top Labels
Issue Labels
help wanted (4) new geocoder (4) has open PR (4)
Pull Request Labels

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 7,997,522 last-month
  • Total docker downloads: 763,445,110
  • Total dependent packages: 308
    (may contain duplicates)
  • Total dependent repositories: 12,821
    (may contain duplicates)
  • Total versions: 79
  • Total maintainers: 3
pypi.org: geopy

Python Geocoding Toolbox

  • Versions: 60
  • Dependent Packages: 289
  • Dependent Repositories: 12,613
  • Downloads: 7,997,522 Last month
  • Docker Downloads: 763,445,110
Rankings
Dependent repos count: 0.1%
Docker downloads count: 0.1%
Dependent packages count: 0.1%
Downloads: 0.1%
Average: 0.6%
Stargazers count: 1.1%
Forks count: 1.9%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: geopy
  • Versions: 17
  • Dependent Packages: 18
  • Dependent Repositories: 208
Rankings
Dependent repos count: 2.3%
Dependent packages count: 3.5%
Average: 4.5%
Stargazers count: 5.7%
Forks count: 6.5%
Last synced: 6 months ago
spack.io: py-geopy

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

  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 2.4%
Forks count: 3.6%
Average: 8.5%
Dependent packages count: 28.1%
Maintainers (1)
Last synced: 6 months ago
anaconda.org: geopy

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 OpenStreetMap Nominatim, Google Geocoding API (V3), and many other geocoding services. The full list is available on the Geocoders doc section. Geocoder classes are located in geopy.geocoders.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 51.6%
Average: 54.1%
Dependent repos count: 56.7%
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite