This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Features:

  • Batch geocoding large amount of data.
  • Address or coordinates (reverse geocoding) supported.
  • Automatically handle input type, so you can mix address and coordinate in an array.
  • Automatically store data in Sqlite database.
  • Smart API keys quota management, you would never stuck at getting GeocoderQuotaExceeded error.
  • Built in logging system, or you can plug on yours.
  • Quick result lookup.

Quick Link:

Usage Example

Basically, you only need to do three things, and geomate will take care of everything else for you:

  1. Prepare your API keys.
  2. Give the path of your database file.
  3. Create a list of address or coordinate you want to geocode.
import geomate
import pprint

# put your google map API key here, what you see here is all fake
api_keys = [
    "GoogleGeoCodingApiKey01", # user1
    "GoogleGeoCodingApiKey02", # user2
    ...
    "GoogleGeoCodingApiKey99", # user991ihu8",
]

# create a google geocode API client
googlegeocoder = geomate.GoogleGeocoder(api_keys=api_keys)
googlegeocoder.check_usable() # show you which keys are available

# bind to a geocoder and database
batch = geomate.BatchGeocoder(googlegeocoder, db_file="geocode.sqlite3")

# construct your todo address list anyway you want
list_of_address = [
    "675 15th St NW Washington, DC 20005",
    "2317 Morgan Ln Dunn Loring, VA 22027",
    "1201 Rockville Pike Rockville, MD 20852",
    (39.085801, -77.084513),
    (38.872719, -77.306417),
    (38.902027, -77.053536),
]

batch.process_this(list_of_address) # process everything

# see what's we have done
for address in list_of_address:
    pprint.pprint(batch.lookup(address))

Advance Usage

Suppose you got 10000 address, but 5000 of them are invalid address, which is not able to geocoded. And invalid address happens to be at begin of the queue. You probably don’t want to waste API quota on that. geomate provide a keyword shuffle to randomlly perform the geocoding, so in average, you can get most of valid address geocoded in a short time:

batch.process_this(list_of_address, shuffle=True)

Here’s something may helpful. Basically there are two steps in the processing:

  1. Insert to-do addresses as primary key into a table, and skip address already in database.
  2. Do geocoding.

So you can take advantage of this for more flexible batch geocoding process.

batch.add_addresses(list_of_address)
batch.process_all(shuffle=True)

Lookup the geocoded data

You can easily retrieve the geocoded data by:

for address in list_of_address:
    data = batch.lookup(address)
    pprint(data)

Of course you can also manually read it from sqlite database.

Install

geomate is released on PyPI, so all you need is:

$ pip install geomate

To upgrade to latest version:

$ pip install --upgrade geomate

Prerequisit: geopy, to install:

$ pip install geopy
Release History

Release History

0.0.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
geomate-0.0.7.zip (17.0 kB) Copy SHA256 Checksum SHA256 Source Jan 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting