{ "info": { "author": "Paulo Emilio de Vilhena", "author_email": "pevilhena2@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "=========\nGeocoding\n=========\n\nGeocoding is an address search engine for France. Unlike other APIs, it uses a database provided by the french government (Base Adresse Nationale - BAN) as the main source of information and does not impose any limit to the number of queries. The purpose of the project is to supply the needs of french data scientists that rely on geocoded data.\n\nGetting Started\n===============\n\nPrerequisites\n-------------\n\n* Python version 3 installed locally\n* Pip installed locally\n\nFor using purposes\n------------------\n\nThe package can easily be installed via pip::\n\n pip install geocoding\n\nBefore the first use, you need to download the BAN database and process its files to unlock the functionalities of the package. All of this can be done with the following command (the whole process should take 30 minutes)::\n\n geocoding update\n\nAlternatively, you can do it step by step with the following commands::\n\n geocoding download\n geocoding decompress\n geocoding index\n\nTo unlock the reverse search, execute the following command::\n\n geocoding reverse\n\nUsage\n=====\n\nThe search engine\n-----------------\n\n.. code-block:: python\n\n import geocoding\n\n\n # -*- Complete search -*-\n output = geocoding.find('91120', 'Palaiseau', '12, Bd des Mar\u00c3\u00a9chaux')\n print(output['longitude'], output['latitude']) # 2.2099342 48.7099138\n\n\n # -*- Incomplete search -*-\n output = geocoding.find('91120', None, '12, Bd des Mar\u00c3\u00a9chaux')\n print(output['quality']) # 1 -> It means that the search was successful\n\n output = geocoding.find('91120', None, 'Bd des Mar\u00c3\u00a9chaux')\n print(output['quality']) # 3 -> It means that the number was not found\n\n output = geocoding.find('91120', 'Palaiseau', None)\n print(output['quality']) # 4 -> It means that the street was not found\n\n output = geocoding.find(None, 'Palaiseau', '12, Bd des Mar\u00c3\u00a9chaux')\n print(output['quality']) # 1\n\n output = geocoding.find(None, None, '12, Bd des Mar\u00c3\u00a9chaux')\n print(output['postal']['code']) # 35800\n print(output['commune']['nom']) # DINARD\n print(output['voie']['nom']) # BOULEVARD DES MARECHAUX\n\n\n # -*- Search with typos -*-\n geocoding.find('91120', 'Palaiseau', '12, Bd des Mar\u00c3\u00a9chx')['quality'] # 1\n geocoding.find('91120', 'Palaiau', '12, Bd des Mar\u00c3\u00a9chx')['quality'] # 1\n geocoding.find('91189', 'Palaiseau', '12, Bd des Mar\u00c3\u00a9chx')['quality'] # 1\n geocoding.find('91189', None, '12, Bd des Mar\u00c3\u00a9chx')['quality'] # 1\n\n\n # -*- Flexible syntax -*-\n geocoding.find('91120', 'Palaiseau')['quality'] # 4\n geocoding.find(commune='Palaiseau')['quality'] # 4\n geocoding.find('91120')['quality'] # 5\n\n args = {\n 'code_postal': '91120',\n 'commune': 'Palaiseau',\n 'adresse': '12, Bd Marechaux'\n }\n geocoding.find(**args)\n\nThe reverse functionality\n-------------------------\n\n.. code-block:: python\n\n import geocoding\n\n # longitude and latitude\n query = (2.2099, 48.7099)\n output = geocoding.near(query)\n output['commune']['nom'] # PALAISEAU\n output['voie']['nom'] # BOULEVARD DES MARECHAUX\n\nBenchmarks\n---------------\n\n.. code-block:: python\n\n import geocoding\n\n begin = time.time()\n for _ in range(2000):\n geocoding.find('91130', 'PALISEAU', '12 BD DES MARECHUX')\n print(time.time() - begin, 'seconds') # 1.063 seconds\n\n begin = time.time()\n for _ in range(10000):\n geocoding.find('91120', 'PALAISEAU', '12 BD DES MARECHAUX')\n print(time.time() - begin, 'seconds') # 1.407 seconds\n\n begin = time.time()\n for _ in range(10000):\n geocoding.find('75015', 'PARIS', '1 RUE SAINT CHARLES')\n print(time.time() - begin, 'seconds') # 1.525 seconds\n\n begin = time.time()\n for _ in range(1000):\n geocoding.near((2, 48))\n print(time.time() - begin, 'seconds') # 0.922 seconds\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/DeVilhena-Paulo/Geocoding", "keywords": "Geocoder France", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "Geocoding", "package_url": "https://pypi.org/project/Geocoding/", "platform": "", "project_url": "https://pypi.org/project/Geocoding/", "project_urls": { "Homepage": "https://github.com/DeVilhena-Paulo/Geocoding" }, "release_url": "https://pypi.org/project/Geocoding/1.4.2/", "requires_dist": [ "KdQuery", "Unidecode", "numpy", "sortedcontainers" ], "requires_python": "", "summary": "geocoding is an address search engine for France", "version": "1.4.2" }, "last_serial": 3141031, "releases": { "1.2.1": [ { "comment_text": "", "digests": { "md5": "0ea6dbf603cb3c91dca677bb7f112967", "sha256": "b6e2693e39f3ddb4f069d0558fc1181612a9ebdc60ed35f1961827ff03677718" }, "downloads": -1, "filename": "Geocoding-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ea6dbf603cb3c91dca677bb7f112967", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17094, "upload_time": "2017-08-22T19:21:04", "url": "https://files.pythonhosted.org/packages/c3/51/8ba3ade215a131ff2d35330440356024ec7e921d4413e6235d3a0f3ca23a/Geocoding-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c4b3c370faeb5fd609f07241949ca7a", "sha256": "9c17b84786e7a65e9ffcd52ae4304ab5d5d1ef40bcf1450f8e60ed19dc65c579" }, "downloads": -1, "filename": "Geocoding-1.2.1.tar.gz", "has_sig": false, "md5_digest": "3c4b3c370faeb5fd609f07241949ca7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14276, "upload_time": "2017-08-22T19:21:07", "url": "https://files.pythonhosted.org/packages/81/96/fa2e5034516e2a5f6bc2e8cf6e1e803181f2cf612dc961c1c5927ba52017/Geocoding-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "f0b5608374b58b8b28bcaf63ec170def", "sha256": "2e6f147b303db0790dcf9f93ff4332447aee8988ebf58c9a92bda20e17d9633c" }, "downloads": -1, "filename": "Geocoding-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f0b5608374b58b8b28bcaf63ec170def", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17135, "upload_time": "2017-08-23T06:56:17", "url": "https://files.pythonhosted.org/packages/83/40/fb5a356e903d013f37a5fcc5253a4a295d9827db890841b0d5220393ecea/Geocoding-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4eee89f9c0d6ae11c2c47c92e25c81d3", "sha256": "337975717ff51d7f54df26086f6f3151f3fbc3c679b5f72cb0e00986aa70d66b" }, "downloads": -1, "filename": "Geocoding-1.2.2.tar.gz", "has_sig": false, "md5_digest": "4eee89f9c0d6ae11c2c47c92e25c81d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14328, "upload_time": "2017-08-23T06:56:19", "url": "https://files.pythonhosted.org/packages/fb/4f/0ca24db44b5424e30a55c1ea64a898e5a17a1c6ebc72c3ca82abc29bea9a/Geocoding-1.2.2.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "047162569c09b84bf4ae82eab2d7fc0a", "sha256": "b00aa3610ed9cbd6c75722cef796f2bc39a7e47b7de11de8cd64c964a5d95b4a" }, "downloads": -1, "filename": "Geocoding-1.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "047162569c09b84bf4ae82eab2d7fc0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23291, "upload_time": "2017-08-25T16:42:43", "url": "https://files.pythonhosted.org/packages/cb/b3/f7421a1fa0357c008653a1757bc68f2da942532038af3c7b4a4b5618cac5/Geocoding-1.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a73e64d26b740f16579eb7f855a8d79", "sha256": "44d5476873abb8bd9814db6d2d30baf4880445089576a25a2c09bef4dfa4502c" }, "downloads": -1, "filename": "Geocoding-1.4.0.tar.gz", "has_sig": false, "md5_digest": "1a73e64d26b740f16579eb7f855a8d79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16570, "upload_time": "2017-08-25T16:42:44", "url": "https://files.pythonhosted.org/packages/a6/64/26dbf29a0807de5850748ca4111e92e0255c887eef79d12863f39680ab26/Geocoding-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "b32591e355a618522e1f1120d175d753", "sha256": "04353f2f93602317f536bcbb998f36434196a3c69167eb81acbb23cfae2f9c56" }, "downloads": -1, "filename": "Geocoding-1.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b32591e355a618522e1f1120d175d753", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23483, "upload_time": "2017-08-25T23:46:00", "url": "https://files.pythonhosted.org/packages/c9/66/5651fa23441818a01a6de6475c496ef9c89070f3bd6cd5410e25b74b3926/Geocoding-1.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "544d512ec2cb28c947d14e80e684eceb", "sha256": "1645f707b99c836dd4912f1fc2da671c31c7816f8ae8ce11cacca7a76a800776" }, "downloads": -1, "filename": "Geocoding-1.4.1.tar.gz", "has_sig": false, "md5_digest": "544d512ec2cb28c947d14e80e684eceb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16728, "upload_time": "2017-08-25T23:46:02", "url": "https://files.pythonhosted.org/packages/80/0b/83ebb7906b493a6aa1f1f7a6a563c3eaf642c89cac2d508226abb7e6986f/Geocoding-1.4.1.tar.gz" } ], "1.4.2": [ { "comment_text": "", "digests": { "md5": "ff725d366ddb5032968247d5cefbd38b", "sha256": "fbcdb20b4b40d6d9f0b7755c19d233c55e374f1be1a54ce41e60e117039411a3" }, "downloads": -1, "filename": "Geocoding-1.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ff725d366ddb5032968247d5cefbd38b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23486, "upload_time": "2017-09-01T17:37:00", "url": "https://files.pythonhosted.org/packages/df/d3/9e65e7b5829c5e3150ff1f4968c711089f5fb58c84556cc99b24fd9acfc8/Geocoding-1.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e502fda999e4530c7309399062b2f8c", "sha256": "b19f362d47712454df7e650ad7bf7ac7415d53a2900b67e930e9854ca3d8ffc6" }, "downloads": -1, "filename": "Geocoding-1.4.2.tar.gz", "has_sig": false, "md5_digest": "3e502fda999e4530c7309399062b2f8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16725, "upload_time": "2017-09-01T17:37:03", "url": "https://files.pythonhosted.org/packages/30/39/f5121deae550425794899e8fbc69da040df192c69dfa06ceae9513e15839/Geocoding-1.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff725d366ddb5032968247d5cefbd38b", "sha256": "fbcdb20b4b40d6d9f0b7755c19d233c55e374f1be1a54ce41e60e117039411a3" }, "downloads": -1, "filename": "Geocoding-1.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ff725d366ddb5032968247d5cefbd38b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23486, "upload_time": "2017-09-01T17:37:00", "url": "https://files.pythonhosted.org/packages/df/d3/9e65e7b5829c5e3150ff1f4968c711089f5fb58c84556cc99b24fd9acfc8/Geocoding-1.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e502fda999e4530c7309399062b2f8c", "sha256": "b19f362d47712454df7e650ad7bf7ac7415d53a2900b67e930e9854ca3d8ffc6" }, "downloads": -1, "filename": "Geocoding-1.4.2.tar.gz", "has_sig": false, "md5_digest": "3e502fda999e4530c7309399062b2f8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16725, "upload_time": "2017-09-01T17:37:03", "url": "https://files.pythonhosted.org/packages/30/39/f5121deae550425794899e8fbc69da040df192c69dfa06ceae9513e15839/Geocoding-1.4.2.tar.gz" } ] }