{ "info": { "author": "Sanhe Hu", "author_email": "husanhe@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "Welcome to geomate Documentation\r\n===================================================================================================\r\nFeatures:\r\n\r\n- Batch geocoding large amount of data.\r\n- Address or coordinates (reverse geocoding) supported.\r\n- Automatically handle input type, so you can mix address and coordinate in an array.\r\n- Automatically store data in Sqlite database.\r\n- Smart API keys quota management, you would never stuck at getting GeocoderQuotaExceeded error.\r\n- Built in logging system, or you can plug on yours.\r\n- Quick result lookup.\r\n\r\n\r\nQuick Link:\r\n\r\n- `GitHub Homepage `_\r\n- `Online Documentation `_\r\n- `PyPI download `_\r\n- `Install `_\r\n- `Issue submit and feature request `_\r\n\r\n\r\n.. _usage:\r\n\r\nUsage Example\r\n---------------------------------------------------------------------------------------------------\r\nBasically, you only need to do three things, and geomate will take care of everything else for you:\r\n\r\n1. Prepare your API keys.\r\n2. Give the path of your database file.\r\n3. Create a list of address or coordinate you want to geocode.\r\n\r\n.. code-block:: python\r\n\r\n import geomate\r\n import pprint\r\n\r\n # put your google map API key here, what you see here is all fake\r\n api_keys = [\r\n \"GoogleGeoCodingApiKey01\", # user1\r\n \"GoogleGeoCodingApiKey02\", # user2\r\n ...\r\n \"GoogleGeoCodingApiKey99\", # user991ihu8\",\r\n ]\r\n\r\n # create a google geocode API client\r\n googlegeocoder = geomate.GoogleGeocoder(api_keys=api_keys)\r\n googlegeocoder.check_usable() # show you which keys are available\r\n\r\n # bind to a geocoder and database\r\n batch = geomate.BatchGeocoder(googlegeocoder, db_file=\"geocode.sqlite3\")\r\n\r\n # construct your todo address list anyway you want\r\n list_of_address = [\r\n \"675 15th St NW Washington, DC 20005\",\r\n \"2317 Morgan Ln Dunn Loring, VA 22027\",\r\n \"1201 Rockville Pike Rockville, MD 20852\",\r\n (39.085801, -77.084513),\r\n (38.872719, -77.306417),\r\n (38.902027, -77.053536),\r\n ]\r\n\r\n batch.process_this(list_of_address) # process everything\r\n\r\n # see what's we have done\r\n for address in list_of_address:\r\n pprint.pprint(batch.lookup(address))\r\n\r\n.. image:: http://pythonhosted.org/geomate/_static/GeomateLog.png\r\n\r\n\r\n.. _advance:\r\n\r\nAdvance Usage\r\n---------------------------------------------------------------------------------------------------\r\nSuppose 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:\r\n\r\n.. code-block:: python\r\n\r\n batch.process_this(list_of_address, shuffle=True)\r\n\r\n\r\nHere's something may helpful. Basically there are two steps in the processing:\r\n\r\n1. Insert to-do addresses as primary key into a table, and skip address already in database.\r\n2. Do geocoding.\r\n\r\nSo you can take advantage of this for more flexible batch geocoding process.\r\n\r\n.. code-block:: python\r\n\r\n batch.add_addresses(list_of_address)\r\n batch.process_all(shuffle=True)\r\n \r\n\r\n.. _lookup:\r\n\r\nLookup the geocoded data\r\n--------------------------------------------------------------------------------\r\nYou can easily retrieve the geocoded data by:\r\n\r\n.. code-block:: python\r\n\r\n for address in list_of_address:\r\n data = batch.lookup(address)\r\n pprint(data)\r\n\r\nOf course you can also manually read it from sqlite database.\r\n\r\n\r\n.. _install:\r\n\r\nInstall\r\n--------------------------------------------------------------------------------\r\n\r\n``geomate`` is released on PyPI, so all you need is:\r\n\r\n.. code-block:: console\r\n\r\n $ pip install geomate\r\n\r\nTo upgrade to latest version:\r\n\r\n.. code-block:: console\r\n\r\n $ pip install --upgrade geomate\r\n\r\nPrerequisit: `geopy `_, to install:\r\n\r\n.. code-block:: console\r\n\r\n $ pip install geopy", "description_content_type": null, "docs_url": "https://pythonhosted.org/geomate/", "download_url": "https://github.com/MacHu-GWU/geomate-project/tarball/2016-01-22", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MacHu-GWU/geomate-project", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "geomate", "package_url": "https://pypi.org/project/geomate/", "platform": "Windows,MacOS,Unix", "project_url": "https://pypi.org/project/geomate/", "project_urls": { "Download": "https://github.com/MacHu-GWU/geomate-project/tarball/2016-01-22", "Homepage": "https://github.com/MacHu-GWU/geomate-project" }, "release_url": "https://pypi.org/project/geomate/0.0.7/", "requires_dist": null, "requires_python": null, "summary": "geomate is a automate geocoding tools using Google GeoCoding API.", "version": "0.0.7" }, "last_serial": 1914445, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "eb7861777f012133dd4756af41ea51ce", "sha256": "afac5555ecb73f4ce79e440e03f421b89937f724b833f564886447823b3bbd9a" }, "downloads": -1, "filename": "geomate-0.0.1.zip", "has_sig": false, "md5_digest": "eb7861777f012133dd4756af41ea51ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15099, "upload_time": "2015-09-30T02:38:13", "url": "https://files.pythonhosted.org/packages/37/85/9c89f0b7225ca24fa0acfe9f5a1635acb976cd3365e817015559f78a4348/geomate-0.0.1.zip" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f75c57e00e837496ec3821a3093e856e", "sha256": "d543e8db612e7eb630945a81ce00c835a13873ba890c609023114b5bccc53fc6" }, "downloads": -1, "filename": "geomate-0.0.2.zip", "has_sig": false, "md5_digest": "f75c57e00e837496ec3821a3093e856e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15228, "upload_time": "2015-12-23T22:20:41", "url": "https://files.pythonhosted.org/packages/53/ff/8abd0d52196dafc3d224a7973fa1a1d909b5e1947d7d52c06ec87393c577/geomate-0.0.2.zip" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "88518370dd69d80ca92ce687889d7cec", "sha256": "30bdcd07a4cfbb294ff11a1c8477cc8c8c0de9db7d915bed09edbd8ab2d55363" }, "downloads": -1, "filename": "geomate-0.0.3.zip", "has_sig": false, "md5_digest": "88518370dd69d80ca92ce687889d7cec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15227, "upload_time": "2015-12-23T22:33:41", "url": "https://files.pythonhosted.org/packages/ab/02/aed4ea758bb420a9cf859e11706d9971e8c4974949acda6ca6182653a2dc/geomate-0.0.3.zip" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f7c229eee2fd3921b02def4e7b05474c", "sha256": "f8f54bad14d49b7a70f2df45653b35f8e1b372184676f712b2f246a97b9a90d0" }, "downloads": -1, "filename": "geomate-0.0.4.zip", "has_sig": false, "md5_digest": "f7c229eee2fd3921b02def4e7b05474c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15225, "upload_time": "2015-12-23T22:44:16", "url": "https://files.pythonhosted.org/packages/82/98/a1f16fa0cacdc73666dc80abe2abdfe0662b91d15dae5557b347131e5873/geomate-0.0.4.zip" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f4928cac3ca640e50985c72e47af43f5", "sha256": "aac4f8ada9ce5eec8bc67a4d4f538492df985f1acf2ebd2e3ea3a02f2c8a46a6" }, "downloads": -1, "filename": "geomate-0.0.6.zip", "has_sig": false, "md5_digest": "f4928cac3ca640e50985c72e47af43f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15075, "upload_time": "2016-01-21T00:40:10", "url": "https://files.pythonhosted.org/packages/77/df/44554003cc306f5d232a655f13089a91055a4ff4acf12a9753fdb0738a6c/geomate-0.0.6.zip" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "f87c10b7987b980bc00892f99ac96986", "sha256": "ee360bc5ad1d15f536a8f5c1ff7315c9c18224b46c52f0b4d6c5fde078e5778f" }, "downloads": -1, "filename": "geomate-0.0.7.zip", "has_sig": false, "md5_digest": "f87c10b7987b980bc00892f99ac96986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17006, "upload_time": "2016-01-21T02:19:17", "url": "https://files.pythonhosted.org/packages/d2/b7/402b9130971b752c76be871367e347455096210ee71fa1312e84475754ca/geomate-0.0.7.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f87c10b7987b980bc00892f99ac96986", "sha256": "ee360bc5ad1d15f536a8f5c1ff7315c9c18224b46c52f0b4d6c5fde078e5778f" }, "downloads": -1, "filename": "geomate-0.0.7.zip", "has_sig": false, "md5_digest": "f87c10b7987b980bc00892f99ac96986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17006, "upload_time": "2016-01-21T02:19:17", "url": "https://files.pythonhosted.org/packages/d2/b7/402b9130971b752c76be871367e347455096210ee71fa1312e84475754ca/geomate-0.0.7.zip" } ] }