{ "info": { "author": "PaddyAlton", "author_email": "paddy.alton@apolitical.co", "bugtrack_url": null, "classifiers": [], "description": "easy-geoparsing\n---\n\nEasy-to-use module for streamlined parsing of countries from plaintext locations and top-level domains, plus manipulation of country names and ISO 2 & 3 character codes.\n\nImplementation relies on:\n\n- the [RESTcountries](https://restcountries.eu/) API\n- the [geotext](https://pypi.org/project/geotext/) module\n\n## installation\n\nTo install from the command line via [pip](https://pip.pypa.io/en/stable/), do:\n\n`pip install easy-geoparsing`\n\nTo upgrade to the latest version via `pip` do:\n\n`pip install easy-geoparsing --upgrade`\n\nTo use via [pipenv](https://docs.pipenv.org/en/latest/) put the following in your Pipfile:\n\n```\n[packages]\neasy-geoparsing = \">=1.0.0\"\n```\n\n## development\n\nIf you've cloned the repository, the best way to make it work is using `pipenv`\n\nIf you don't yet have `pipenv`, you can use `pip` to install it from the command line:\n\n`pip install pipenv --upgrade`\n\nThen, in the top level directory of this repository, `easy-geoparsing`, do:\n\n`pipenv install --dev`\n\nThis will create the virtual environment and install the requirements (viewable in the Pipfile). The `--dev` flag will install packages needed for testing etc.\n\n## usage\n\n### GETTING STARTED\n\nDo the following to get the parser utilities, noting that creating an instance of `EasyCountryParser` will automatically download the country data payload from RESTcountries and set up all the resources. Speed will therefore depend on your internet connection, but the payload is not large.\n\n```\nfrom easy_geoparsing import EasyCountryParser\n\nez_parser = EasyCountryParser()\n```\n\nor, if you don't want to use our alternative names for some of the countries (i.e. you want to exactly follow the RESTcountries standard)\n\n`ez_parser = EasyCountryParser(altnames=False)`\n\nThe `EasyCountryParser` class provides utilities, based on the data from the RESTcountries API and the GeoText natural-language parser library, for easily extracting and handling country names and codes.\n\n### PARSER RESOURCES\n\nThe parser is initialised with the following resources:\n\n - `.data` - pandas DataFrame containing RESTcountries data\n - `.tld_to_a2c` - python dict, maps TLDs to 2-character ISO codes\n - `.tld_to_a3c` - python dict, maps TLDs to 3-character ISO codes\n - `.iso2to3` - python dict, maps 2-character ISO codes to 3\n - `.iso3to2` - python dict, maps 3-character ISO codes to 2\n - `.a2c_map` - python dict, maps 2-char ISO codes to full names\n - `.a3c_map` - python dict, maps 3-char ISO codes to full names\n\n### PARSER METHODS\n\nThe parser has the following methods for handling locations data:\n\n - `.retrieve_country` - parses plaintext for extractable 2-character ISO codes for countries (which can then be manipulated using the mappers above)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/apolitical/easy-geoparsing/archive/v1.2.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "easy-geoparsing", "package_url": "https://pypi.org/project/easy-geoparsing/", "platform": "", "project_url": "https://pypi.org/project/easy-geoparsing/", "project_urls": { "Download": "https://github.com/apolitical/easy-geoparsing/archive/v1.2.1.tar.gz" }, "release_url": "https://pypi.org/project/easy-geoparsing/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "Easy-to-use module for streamlined parsing of countries from locations", "version": "1.2.1" }, "last_serial": 5572488, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "822bb2a5cba356c80eb72043057ec959", "sha256": "9b56c95df844580a42fb9074a598d5f8463c9ded072155f101220cadb5cea510" }, "downloads": -1, "filename": "easy-geoparsing-1.0.0.tar.gz", "has_sig": false, "md5_digest": "822bb2a5cba356c80eb72043057ec959", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4706, "upload_time": "2019-05-15T16:44:04", "url": "https://files.pythonhosted.org/packages/ee/f9/43295860ad31c1bbc5c09e2c9fadae2392a94d0d3161ebeb5f86931776c9/easy-geoparsing-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2accf9f16cef659fe44df3766e959b53", "sha256": "611debe0705ad0ff92e4037573f1afb8020dc49cc21fdaeba01fc013ff9e6709" }, "downloads": -1, "filename": "easy-geoparsing-1.0.1.tar.gz", "has_sig": false, "md5_digest": "2accf9f16cef659fe44df3766e959b53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4758, "upload_time": "2019-05-15T17:08:21", "url": "https://files.pythonhosted.org/packages/8e/ec/922acb0323eb7083ee1ee7a3bc50d5b73b4ecfd21a7a60f8a319a8ff4027/easy-geoparsing-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "15df9c7dcb55b5ec6eef22024c7b57f4", "sha256": "cc90f035031a8e425255d8a86826058479000217fe84408ad23dbda7f4c8b81f" }, "downloads": -1, "filename": "easy-geoparsing-1.1.0.tar.gz", "has_sig": false, "md5_digest": "15df9c7dcb55b5ec6eef22024c7b57f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4785, "upload_time": "2019-05-15T17:50:33", "url": "https://files.pythonhosted.org/packages/77/88/877e3fc99fa345ddbfca0282b795613c2be5bb4b265eee052b632032e91b/easy-geoparsing-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e219d4288d85a38bf7273137a84adbd3", "sha256": "4e47b0e4ad41d82bcffce8b8105d5388cdc4f37b6919a908668136b23bdcd090" }, "downloads": -1, "filename": "easy-geoparsing-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e219d4288d85a38bf7273137a84adbd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4783, "upload_time": "2019-05-15T17:52:54", "url": "https://files.pythonhosted.org/packages/5f/02/dc2823c0f02e888946cd149d16c3a4dbc4dcd9316b3b5bcef019d8024f35/easy-geoparsing-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "a70257cdeba9e40d72ef8e3ca0f6ff93", "sha256": "2e4ace70ef0bb4c68df81457285e7e1c8e6044b11acb471c1435dccc0807807b" }, "downloads": -1, "filename": "easy-geoparsing-1.1.2.tar.gz", "has_sig": false, "md5_digest": "a70257cdeba9e40d72ef8e3ca0f6ff93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4784, "upload_time": "2019-05-15T17:59:06", "url": "https://files.pythonhosted.org/packages/14/50/b4e4b43569d214e223a92d016c4b27e6daac81e37d0e0b8b6c49ba81e3c1/easy-geoparsing-1.1.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "8622b8742863959436f73b2616755b1a", "sha256": "62c02038768b5c63e76871412e1b05024abf24e27170bf5b37f1e4e6e482536f" }, "downloads": -1, "filename": "easy-geoparsing-1.2.0.tar.gz", "has_sig": false, "md5_digest": "8622b8742863959436f73b2616755b1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5196, "upload_time": "2019-05-15T18:17:11", "url": "https://files.pythonhosted.org/packages/9a/5e/67346c202c465281dee31eacf8c321a09da7f9f52e5bfa9028ddbfcbea93/easy-geoparsing-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "e0964e68a53efab82e08302e0d719b7a", "sha256": "82b3dd390b017101c27812ce46d81df7fd228b72fbc337d3171d7eae5fe04e1e" }, "downloads": -1, "filename": "easy-geoparsing-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e0964e68a53efab82e08302e0d719b7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5208, "upload_time": "2019-07-23T13:33:42", "url": "https://files.pythonhosted.org/packages/a9/56/ea27ef7edd62ccf46b72d21cc89f35e7d2ed31b16da27a4f257717c1b055/easy-geoparsing-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0964e68a53efab82e08302e0d719b7a", "sha256": "82b3dd390b017101c27812ce46d81df7fd228b72fbc337d3171d7eae5fe04e1e" }, "downloads": -1, "filename": "easy-geoparsing-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e0964e68a53efab82e08302e0d719b7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5208, "upload_time": "2019-07-23T13:33:42", "url": "https://files.pythonhosted.org/packages/a9/56/ea27ef7edd62ccf46b72d21cc89f35e7d2ed31b16da27a4f257717c1b055/easy-geoparsing-1.2.1.tar.gz" } ] }