Science Score: 13.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
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Keywords from Contributors
Repository
:earth_asia: Python Geocoder
Basic Info
- Host: GitHub
- Owner: DenisCarriere
- License: mit
- Language: Python
- Default Branch: master
- Homepage: http://geocoder.readthedocs.org
- Size: 2.09 MB
Statistics
- Stars: 1,642
- Watchers: 49
- Forks: 290
- Open Issues: 121
- Releases: 6
Metadata Files
README.md
Python Geocoder
Simple and consistent geocoding library written in Python.
Table of content
- Overview
- A glimpse at the API
- Command Line Interface
- Providers
- Installation
- Feedback
- Contribution
- ChangeLog
Overview
Many online providers such as Google & Bing have geocoding services, these providers do not include Python libraries and have different JSON responses between each other.
It can be very difficult sometimes to parse a particular geocoding provider since each one of them have their own JSON schema.
Here is a typical example of retrieving a Lat & Lng from Google using Python, things shouldn't be this hard.
```python
import requests url = 'https://maps.googleapis.com/maps/api/geocode/json' params = {'sensor': 'false', 'address': 'Mountain View, CA'} r = requests.get(url, params=params) results = r.json()['results'] location = results[0]['geometry']['location'] location['lat'], location'lng' ```
Now lets use Geocoder to do the same task
```python
import geocoder g = geocoder.google('Mountain View, CA') g.latlng (37.3860517, -122.0838511) ```
A glimpse at the API
Many properties are available once the geocoder object is created.
Forward
```python
import geocoder g = geocoder.google('Mountain View, CA') g.geojson g.json g.wkt g.osm ```
Multiple queries ('batch' geocoding)
```python
import geocoder g = geocoder.mapquest(['Mountain View, CA', 'Boulder, Co'], method='batch') for result in g: ... print(result.address, result.latlng) ... ('Mountain View', [37.39008, -122.08139]) ('Boulder', [40.015831, -105.27927]) ```
Multiple results
```python
import geocoder g = geocoder.geonames('Mountain View, CA', maxRows=5) print(len(g)) 5 for result in g: ... print(result.address, result.latlng) ... Mountain View ['37.38605', '-122.08385'] Mountain View Elementary School ['34.0271', '-117.59116'] Best Western Plus Mountainview Inn and Suites ['51.79516', '-114.62793'] Best Western Mountainview Inn ['49.3338', '-123.1446'] Mountain View Post Office ['37.393', '-122.07774'] ```
The providers currently supporting multiple results are listed in the table below.
Reverse
```python
g = geocoder.google([45.15, -75.14], method='reverse') g.city g.state g.statelong g.country g.countrylong ```
House Addresses
```python
g = geocoder.google("453 Booth Street, Ottawa ON") g.housenumber g.postal g.street g.street_long ```
IP Addresses
```python
g = geocoder.ip('199.7.157.0') g = geocoder.ip('me') g.latlng g.city ```
Bounding Box
Accessing the JSON & GeoJSON attributes will be different
```python
g = geocoder.google("Ottawa") g.bbox {"northeast": [45.53453, -75.2465979], "southwest": [44.962733, -76.3539158]}
g.geojson['bbox'] [-76.3539158, 44.962733, -75.2465979, 45.53453]
g.southwest [44.962733, -76.3539158] ```
Command Line Interface
bash
$ geocode "Ottawa, ON" >> ottawa.geojson
$ geocode "Ottawa, ON" \
--provide google \
--out geojson \
--method geocode
Providers
| Provider | Optimal | Usage Policy | Multiple results | Reverse | Proximity | Batch | |:-------------------------------|:----------|:--------------------------------|:-----------------|:--------|:----------|:------| | ArcGIS | World | | yes | yes | | | | Baidu | China | API key | | yes | | | | Bing | World | API key | yes | yes | | yes | | CanadaPost | Canada | API key | yes | | | | | FreeGeoIP This API endpoint is deprecated and will stop working on July 1st, 2018. | World | Rate Limit, Policy | | | | | | Gaode | China | API key | | yes | | | | Geocoder.ca (Geolytica) | CA & US | Rate Limit | | | | | | GeocodeFarm | World | Policy | yes | yes | | | | GeoNames | World | Username | yes | | yes | | | GeoOttawa | Ottawa | | yes | | | | | Gisgraphy | World | API key | yes | yes | yes | | | Google | World | Rate Limit, Policy | yes | yes | yes | | | HERE | World | API key | yes | yes | | | | IPInfo | World | Rate Limit, Plans | | | | | | Komoot (OSM powered) | World | | yes | yes | | | | LocationIQ | World | API Key | yes | yes | | | | Mapbox | World | API key | yes | yes | yes | | | MapQuest | World | API key | yes | yes | | yes | | ~~Mapzen~~ | Shutdown | API key | yes | yes | | | | MaxMind | World | | | | | | | OpenCage | World | API key | yes | yes | | | | OpenStreetMap | World | Policy | yes | yes | | | | Tamu | US | API key | | | | | | TGOS | Taiwan | | | | | | | TomTom | World | API key | yes | | | | | USCensus | US | | | yes | | yes | | What3Words | World | API key | | yes | | | | Yahoo | World | | | | | | | Yandex | Russia | | yes | yes | | |
Installation
PyPi Install
To install Geocoder, simply:
bash
$ pip install geocoder
...
GitHub Install
Installing the latest version from Github:
bash
$ git clone https://github.com/DenisCarriere/geocoder
...
$ cd geocoder
$ python setup.py install
...
Snap Install
To install the stable geocoder snap in any of the supported Linux distros:
bash
$ sudo snap install geocoder
...
If you want to help testing the latest changes from the master branch, you can install it from the edge channel:
bash
$ sudo snap install geocoder --edge
...
The installed snap will be updated automatically every time a new version is pushed to the store.
Feedback
Please feel free to give any feedback on this module.
Speak up on Twitter @DenisCarriere and tell me how you use this Python Geocoder. New updates will be pushed to Twitter Hashtags #python.
Contribution
If you find any bugs or any enhancements to recommend please send some of your comments/suggestions to the Github Issues Page.
Some way to contribute, from the most generic to the most detailed:
Documenting
If you are not comfortable with development, you can still contribute with the documentation.
- review the documentation of a specific provider. Most of the time they are lacking details...
- review the parameters for a specific method, compared to what is supported by the provider
- review documentation for command line
If you miss any feature, just create an issue accordingly. Be sure to describe your use case clearly, and to provide links to the correct sources.
Coding
- add support for a new provider. Documentation TBD, starting point possible with wip_guide.
- extend methods for an existing support, i.e support an additionnal API). Documentation TBD
- extend support of an existing API, i.e, support more (json) fields from the response, or more parameters. Documentation TBD
ChangeLog
See CHANGELOG.md
Owner
- Name: Denis
- Login: DenisCarriere
- Kind: user
- Location: Ottawa, ON Canada
- Company: Pinax
- Website: https://pinax.network
- Twitter: DenisCarriere
- Repositories: 195
- Profile: https://github.com/DenisCarriere
Building Web3 🚀 with @pinax-network @pomelo-io @EOS-Nation
GitHub Events
Total
- Issues event: 8
- Watch event: 31
- Issue comment event: 7
- Pull request event: 5
- Fork event: 8
Last Year
- Issues event: 8
- Watch event: 31
- Issue comment event: 7
- Pull request event: 5
- Fork event: 8
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Denis | c****s@g****m | 662 |
| ebreton | m****u@i****m | 178 |
| Michael Okun | m****l@v****m | 43 |
| Thomas Labadie | t****e@g****m | 22 |
| Matthieu Rigal | m****u@o****m | 14 |
| stirringhalo | g****p@x****m | 13 |
| Antoine Vandermeersch | a****s@g****m | 11 |
| ebreton | e****l | 10 |
| Antonio Lima | a****7@g****m | 9 |
| Palo Dravecky | p****y@g****m | 8 |
| Tyler | t****e@h****m | 8 |
| Holger Bruch | h****h@s****e | 8 |
| Alex Pilon | a****p@a****a | 8 |
| Alexander Lukanin | a****3@g****m | 7 |
| xiangmeng | m****g@m****m | 5 |
| Star Ying | s****g@g****m | 5 |
| Raymond Wu | v****g@g****m | 5 |
| Leo Arias | l****s@c****m | 4 |
| telis | a****s@g****m | 4 |
| nyejon | n****n@g****m | 4 |
| yed_ | y****d@v****t | 3 |
| gisgraphy | d****t@g****m | 3 |
| cspinelive | j****l@g****m | 3 |
| Thejaswi Puthraya | t****a@g****m | 3 |
| Thanh Ha | t****a@a****a | 3 |
| Kevin Brolly | k****y@g****m | 3 |
| Ikar Pohorsky | p****y@i****z | 3 |
| marc tobias | m****l@g****t | 3 |
| Denis Carriere | c****e@g****m | 3 |
| root | r****t@i****l | 3 |
| and 43 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 91
- Total pull requests: 36
- Average time to close issues: 3 months
- Average time to close pull requests: over 1 year
- Total issue authors: 84
- Total pull request authors: 34
- Average comments per issue: 1.1
- Average comments per pull request: 0.31
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 7
- Pull requests: 2
- Average time to close issues: about 5 hours
- Average time to close pull requests: N/A
- Issue authors: 6
- Pull request authors: 2
- Average comments per issue: 0.29
- Average comments per pull request: 0.5
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- navindransgk (2)
- sdil (2)
- eadmaster (2)
- DenisCarriere (2)
- fabiocaccamo (2)
- dotysan (2)
- mdivk (2)
- bernd-wechner (1)
- anurupsatyarth (1)
- rdhuff (1)
- roozbehr66 (1)
- willdumm (1)
- mafudge (1)
- argyili (1)
- connesy (1)
Pull Request Authors
- bvermeulen (3)
- A-Iskakov (2)
- jorenham (1)
- razmikarm (1)
- caos21 (1)
- abaumg (1)
- N-Masi (1)
- jas32096 (1)
- karbachinsky (1)
- fabiocaccamo (1)
- notveryleet (1)
- benemohamed (1)
- rettinghaus (1)
- nyejon (1)
- vlsd (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 19
-
Total downloads:
- pypi 1,388,431 last-month
- Total docker downloads: 812,591
-
Total dependent packages: 68
(may contain duplicates) -
Total dependent repositories: 1,444
(may contain duplicates) - Total versions: 130
- Total maintainers: 2
pypi.org: geocoder
Geocoder is a simple and consistent geocoding library.
- Homepage: https://github.com/DenisCarriere/geocoder
- Documentation: https://geocoder.readthedocs.io/
- License: The MIT License
-
Latest release: 1.38.1
published over 8 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r4
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r4
published about 3 years ago
Rankings
Maintainers (1)
alpine-edge: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-edge: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.14: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r1
published about 5 years ago
Rankings
Maintainers (1)
alpine-v3.15: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r1
published about 5 years ago
Rankings
Maintainers (1)
alpine-v3.16: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r2
published over 4 years ago
Rankings
Maintainers (1)
alpine-v3.17: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r2
published over 4 years ago
Rankings
Maintainers (1)
conda-forge.org: geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: Apache-2.0
-
Latest release: 1.38.1
published about 7 years ago
Rankings
spack.io: py-geocoder
Geocoder is a simple and consistent geocoding library.
- Homepage: https://github.com/DenisCarriere/geocoder
- License: []
-
Latest release: 1.38.1
published over 1 year ago
Rankings
alpine-v3.19: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r4
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.19: py3-geocoder-pyc
Precompiled Python bytecode for py3-geocoder
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r4
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-geocoder
A simple and consistent geocoding library
- Homepage: https://github.com/DenisCarriere/geocoder
- License: MIT
-
Latest release: 1.38.1-r5
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- certifi ==2017.4.17 development
- chardet ==3.0.4 development
- click ==6.7 development
- codecov ==2.0.9 development
- coveralls >=0.4 development
- decorator ==4.1.2 development
- flake8 ==3.3.0 development
- future ==0.16.0 development
- idna ==2.5 development
- mock ==2.0.0 development
- py ==1.4.34 development
- pytest ==3.1.3 development
- pytest-cov ==2.5.1 development
- ratelim ==0.1.6 development
- requests ==2.18.1 development
- requests-mock ==1.3.0 development
- six ==1.10.0 development
- sphinx ==1.6.3 development
- urllib3 ==1.21.1 development
- click ==6.7
- future ==0.16.0
- ratelim ==0.1.6
- requests ==2.18.1
- six ==1.10.0