{ "info": { "author": "Sveinbjorn Thordarson", "author_email": "sveinbjorn@sveinbjorn.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: Icelandic", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Linguistic", "Topic :: Utilities" ], "description": "# iceaddr\n[![Build Status](https://travis-ci.org/sveinbjornt/iceaddr.svg?branch=master)](https://travis-ci.org/sveinbjornt/iceaddr)\n### Look up Icelandic street addresses and postcodes\n\nPython (2 and 3) module to look up and get information about Icelandic street addresses and postcodes. The underlying data is taken from [Sta\u00f0fangaskr\u00e1](https://opingogn.is/dataset/stadfangaskra), the official Icelandic Address Registry maintained by [Registers Iceland](https://www.skra.is) ([CC-BY](http://opendefinition.org/licenses/cc-by/)), [IS 50V \u00d6rnefni](https://opingogn.is/dataset/is-50v-ornefni-isn93) from the [National Land Survey of Iceland](https://www.lmi.is), and from the postcode table provided by [Postur.is](https://www.postur.is/einstaklingar/posthus/postnumer/gagnaskrar/).\n\n\n\n## Installation\n\n```\n$ pip install iceaddr\n```\n\n## Examples\n\n### Look up address with postcode:\n\n```python\n>>> from iceaddr import iceaddr_lookup\n>>> a = iceaddr_lookup('Austurstr\u00e6ti', number=14, postcode=101)\n>>> pprint.pprint(a)\n[{'bokst': '',\n 'byggd': 1,\n 'heiti_nf': 'Austurstr\u00e6ti',\n 'heiti_tgf': 'Austurstr\u00e6ti',\n 'hnitnum': 10083839,\n 'husnr': 14,\n 'landnr': 100852,\n 'lat_wgs84': 64.147529217656,\n 'long_wgs84': -21.9389394651385,\n 'postnr': 101,\n 'serheiti': '',\n 'stadur_nf': 'Reykjav\u00edk',\n 'stadur_tgf': 'Reykjav\u00edk',\n 'svaedi': 'H\u00f6fu\u00f0borgarsv\u00e6\u00f0i\u00f0',\n 'svfnr': 0,\n 'tegund': '\u00de\u00e9ttb\u00fdli',\n 'vidsk': '',\n 'x_isn93': 356999.259090909,\n 'y_isn93': 408290.561363636}]\n```\n\n### Look up address with place name\n\n```python\n>>> from iceaddr import iceaddr_lookup\n>>> a = iceaddr_lookup('\u00d6ldug\u00f6tu', number=4, placename='Reykjav\u00edk')\n>>> pprint.pprint(a)\n[{'bokst': '',\n 'byggd': 1,\n 'heiti_nf': '\u00d6ldugata',\n 'heiti_tgf': '\u00d6ldug\u00f6tu',\n 'hnitnum': 10017023,\n 'husnr': 4,\n 'landnr': 100570,\n 'lat_wgs84': 64.1484874806941,\n 'long_wgs84': -21.9452072913341,\n 'postnr': 101,\n 'serheiti': '',\n 'stadur_nf': 'Reykjav\u00edk',\n 'stadur_tgf': 'Reykjav\u00edk',\n 'svaedi': 'H\u00f6fu\u00f0borgarsv\u00e6\u00f0i\u00f0',\n 'svfnr': 0,\n 'tegund': '\u00de\u00e9ttb\u00fdli',\n 'vidsk': '',\n 'x_isn93': 356699.479545455,\n 'y_isn93': 408411.468181818}]\n```\n\nStreet and place names can be provided in either nominative or dative case (e.g. both '\u00d6ldugata' and '\u00d6ldug\u00f6tu' will work, as will both 'Selfoss' and 'Selfossi').\n\nPlease note that`iceaddr_lookup()` returns a list of zero or more addresses matching the criterion.\n\n```python\n>>> from iceaddr import iceaddr_lookup\n>>> iceaddr_lookup('D\u00fafnah\u00f3lar', number=10)\n[]\n>>> res = iceaddr_lookup('\u00d6ldugata', number=9)\n>>> [(a['postnr'], a['stadur_nf']) for a in res]\n[(101, 'Reykjav\u00edk'), (220, 'Hafnarfj\u00f6r\u00f0ur'), (621, 'Dalv\u00edk')]\n```\n\nFor natural search string queries, the module provides `iceaddr_suggest()`:\n\n```python\n>>> from iceaddr import iceaddr_suggest\n>>>\n>>> a = iceaddr_suggest('\u00d6ldugata 4, Rey')\n>>> [n['stadur_tgf'] for n in a]\n['Reykjav\u00edk', 'Rey\u00f0arfir\u00f0i']\n>>> a = iceaddr_suggest('\u00d6ldug\u00f6', limit=200)\n>>> len(a)\n151\n```\n\nThe default limit on results from both functions is 50.\n\n### Keys\n\n| Key | |\n| ------------- |---------------------------------------------------------|\n| bokst | House letter |\n| byggd | |\n| heiti_nf | Street name (nominative case), e.g. '\u00d6ldugata' |\n| heiti_tgf | Street name (dative case), e.g. '\u00d6ldug\u00f6tu' |\n| hnitnum | |\n| husnr | House number |\n| landnr | |\n| lat_wgs84 | Latitude (WGS84 coordinates) |\n| long_wgs84 | Longitude (WGS84 coordinates) |\n| postnr | Postcode (e.g. 101) |\n| serheiti | Special name |\n| stadur_nf | Place name (nominative case), e.g. 'Selfoss' |\n| stadur_tgf | Place name (dative case), e.g. 'Selfossi' |\n| svaedi | Area (e.g. 'H\u00f6fu\u00f0borgarsv\u00e6\u00f0i\u00f0', 'Nor\u00f0urland') |\n| svfnr | |\n| tegund | Type (either '\u00de\u00e9ttb\u00fdli' (urban) or 'Dreifb\u00fdli' (rural)) |\n| vidsk | Additional information |\n| x_isn93 | Coordinate X (ISN93) |\n| y_isn93 | Coordinate Y (ISN93) |\n\n### Postcodes\n\n```python\n>>> from iceaddr import postcodes_for_placename\n>>> postcodes_for_placename('\u00cdsafj\u00f6r\u00f0ur')\n[400, 401]\n>>> postcodes_for_placename('K\u00f3pavogi')\n[200, 201, 202, 203]\n>>> postcodes_for_placename('k\u00f3pav', partial=True)\n[200, 201, 202, 203]\n>>>\n```\n\n```python\n>>> from iceaddr import postcodes\n>>> postcodes.get(400)\n{ 'svaedi': 'Vesturland og Vestfir\u00f0ir', \n 'stadur_nf': '\u00cdsafj\u00f6r\u00f0ur', \n 'stadur_tgf': '\u00cdsafir\u00f0i', \n 'tegund': '\u00de\u00e9ttb\u00fdli' }\n```\n\n### Placenames (\"\u00f6rnefni\")\n\n```python\n>>> from iceaddr import placename_lookup\n>>> placename_lookup('Me\u00f0alfellsvatn')\n[{'flokkur': 'Vatna\u00f6rnefni Mi\u00f0',\n 'id': 2339,\n 'lat_wgs84': 64.3112049,\n 'long_wgs84': -21.5997926,\n 'nafn': 'Me\u00f0alfellsvatn'}]\n```\n\nIf more than one placename match is found, the results are ordered by size, with precedence given to municipalities and densely populated areas.\n\n## Version History\n\n* 0.3.3: Minor placename additions, smarter ordering of placename lookup results (08/01/2019)\n* 0.3.2: Added municipalities and various B\u00cdN placenames to ornefni database (02/01/2019)\n* 0.3.1: Added more placenames from LM\u00cd data, support for multithreaded use\n* 0.3: Added `placename_lookup` to look up coordinates for Icelandic placenames + minor fixes (10/12/2018)\n* 0.2: Added `iceaddr_suggest`, result limit, changed key names for postcode dicts (22/10/2018)\n* 0.1.2: Initial release (10/10/2018)\n\n## BSD License \n\nCopyright (C) 2018 Sveinbjorn Thordarson\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may\nbe used to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sveinbjornt/iceaddr", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "iceaddr", "package_url": "https://pypi.org/project/iceaddr/", "platform": "", "project_url": "https://pypi.org/project/iceaddr/", "project_urls": { "Homepage": "https://github.com/sveinbjornt/iceaddr" }, "release_url": "https://pypi.org/project/iceaddr/0.3.3/", "requires_dist": null, "requires_python": "", "summary": "Look up information about Icelandic street addresses and postcodes", "version": "0.3.3" }, "last_serial": 4673489, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "0e2c05df46aa8f3353d7f3f026cf3582", "sha256": "1221dc51ab60d33c7cc60ce5854bdb743c58b8040e6cb735668d9294fe6ef95a" }, "downloads": -1, "filename": "iceaddr-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0e2c05df46aa8f3353d7f3f026cf3582", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5517937, "upload_time": "2018-10-10T14:47:44", "url": "https://files.pythonhosted.org/packages/22/b6/fda73e2e0dddce058167625915c7fa87f215a645f2f6e1383dfed9436c76/iceaddr-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a8bdb95cdac29602c4d1c9c28db2be8", "sha256": "647f7de10852e6d3af1f0a14c13b03d18f9607b583d74ab47855485817395043" }, "downloads": -1, "filename": "iceaddr-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7a8bdb95cdac29602c4d1c9c28db2be8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5505730, "upload_time": "2018-10-10T14:47:49", "url": "https://files.pythonhosted.org/packages/7b/dd/b59acaa702cc4684ca6c165a78610c6218efa7857025c024b0ebd3bf23ff/iceaddr-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5b7ce6f0515e29688540f8c81f9deb8e", "sha256": "2031d3ec70bb343f552b34768365ca4b13abeead4934b86f8203f193ff8aec46" }, "downloads": -1, "filename": "iceaddr-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b7ce6f0515e29688540f8c81f9deb8e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5522827, "upload_time": "2018-10-22T18:22:28", "url": "https://files.pythonhosted.org/packages/29/c2/610471073b98c4343f7627a656ea19911cb98fa975869afbcfca68aba8fb/iceaddr-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99c7047d5519f2f31b14830020e78208", "sha256": "c69a6a645af45c44a385319fcf10c60f1e5054ce21ac5a5c1378d72377f063ea" }, "downloads": -1, "filename": "iceaddr-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "99c7047d5519f2f31b14830020e78208", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5519440, "upload_time": "2018-10-22T18:22:31", "url": "https://files.pythonhosted.org/packages/d6/8d/fe3eab324eb1ffee6edf6f5396fd2d409deefd26aa64d0f5da2467465a66/iceaddr-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4bdfd278a7020f78d031ca391ecf0e99", "sha256": "1708b83aca9fddc9af6ed1e283da07000eaaaae2f0440e1f8f6679d032e6e4d1" }, "downloads": -1, "filename": "iceaddr-0.2.tar.gz", "has_sig": false, "md5_digest": "4bdfd278a7020f78d031ca391ecf0e99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5508563, "upload_time": "2018-10-22T18:22:34", "url": "https://files.pythonhosted.org/packages/ce/4e/d9a1be6198ca6523da351dfde47ff16092d10c0f17f50cf387bd883e81d9/iceaddr-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "6e8066291c50331fdc9b49e56e20d3b9", "sha256": "2fd9719e9bf3b46901598295fc020285ae23b001a10dd9931499dca06850d43c" }, "downloads": -1, "filename": "iceaddr-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6e8066291c50331fdc9b49e56e20d3b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7395511, "upload_time": "2018-12-10T14:33:35", "url": "https://files.pythonhosted.org/packages/ff/cd/249ba2451c5a354f3c5082d891c5d8a39bba583b47db818402640ed4037b/iceaddr-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f38df7b14f639314183fdc4f0c1e9d88", "sha256": "9338fb64fb83c6d569beb26910c599ec66a7c3087fbb34b2eac5eae783537c67" }, "downloads": -1, "filename": "iceaddr-0.3.tar.gz", "has_sig": false, "md5_digest": "f38df7b14f639314183fdc4f0c1e9d88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7380065, "upload_time": "2018-12-10T14:33:39", "url": "https://files.pythonhosted.org/packages/43/4a/20b62ac29b6b01c7b7b1c7dfc8afe7dbfa9d12bdc54eda0b76823b405fe7/iceaddr-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "e24248a65045c4d8b6af033a83fee44a", "sha256": "bcdea0561edcf2ebe35865fdaba6459665e77e968e059267259c9729eaf9f87b" }, "downloads": -1, "filename": "iceaddr-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e24248a65045c4d8b6af033a83fee44a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9401316, "upload_time": "2018-12-17T17:19:22", "url": "https://files.pythonhosted.org/packages/fb/63/5217a425307f013d949e6bc5f40016b58defd972f708c5474ce997c3959e/iceaddr-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb2f156541310e4e6c79c82a43cccb87", "sha256": "1d4e1e19400a1d831435659a6d8346009d862eea90afc9ebe97514622545bcf4" }, "downloads": -1, "filename": "iceaddr-0.3.1.tar.gz", "has_sig": false, "md5_digest": "fb2f156541310e4e6c79c82a43cccb87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9385089, "upload_time": "2018-12-17T17:19:28", "url": "https://files.pythonhosted.org/packages/76/6a/ee889f736c42391ff0b4faadcd9adf3358851dafce35023dc242a6599b82/iceaddr-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "afb0c23955b4d6eff8b464000e35cd28", "sha256": "3a567f13c73d63b0445aa2ffaaeab39b8f2b796f913c0500ec9f41a7449060eb" }, "downloads": -1, "filename": "iceaddr-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "afb0c23955b4d6eff8b464000e35cd28", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9406646, "upload_time": "2019-01-02T13:22:11", "url": "https://files.pythonhosted.org/packages/e1/d4/8e686cfd3b18980fcb5d4fb1b0e21de40412ee7dd646dbebffb791f29892/iceaddr-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2473a00ab3603f2a6bfa30fb164cff2", "sha256": "e2453fb731b6a590efa106212ee215c7ed499eb9ba2ea155e00a620ba095805a" }, "downloads": -1, "filename": "iceaddr-0.3.2.tar.gz", "has_sig": false, "md5_digest": "e2473a00ab3603f2a6bfa30fb164cff2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9390559, "upload_time": "2019-01-02T13:22:42", "url": "https://files.pythonhosted.org/packages/3b/cf/ddf7b0ea8226287f851650d4feb5bcfb22b6514ed73c5f99db61da0fe08e/iceaddr-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "b65be51d09f998bf7782282d87b1292b", "sha256": "a60ec51c6487ca976805246f100b5cd88a833922e2d8672d379eb652b1298a09" }, "downloads": -1, "filename": "iceaddr-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b65be51d09f998bf7782282d87b1292b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9408096, "upload_time": "2019-01-08T16:31:37", "url": "https://files.pythonhosted.org/packages/41/67/9a89bb777cfe8adcc1bd472bebaf457010354a475bed0ab5e0641ee3a8cf/iceaddr-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27be3591ad8f0f61d7b22e447c774521", "sha256": "88d8cd53d857feee7260ea4c7b812d32e1b473ee549fe34495d2e7dd968846b1" }, "downloads": -1, "filename": "iceaddr-0.3.3.tar.gz", "has_sig": false, "md5_digest": "27be3591ad8f0f61d7b22e447c774521", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9391989, "upload_time": "2019-01-08T16:31:43", "url": "https://files.pythonhosted.org/packages/27/b3/b4bacef56995a5acbb177d053fab7ce9ad7799bdea773c77d9446092fe28/iceaddr-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b65be51d09f998bf7782282d87b1292b", "sha256": "a60ec51c6487ca976805246f100b5cd88a833922e2d8672d379eb652b1298a09" }, "downloads": -1, "filename": "iceaddr-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b65be51d09f998bf7782282d87b1292b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9408096, "upload_time": "2019-01-08T16:31:37", "url": "https://files.pythonhosted.org/packages/41/67/9a89bb777cfe8adcc1bd472bebaf457010354a475bed0ab5e0641ee3a8cf/iceaddr-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27be3591ad8f0f61d7b22e447c774521", "sha256": "88d8cd53d857feee7260ea4c7b812d32e1b473ee549fe34495d2e7dd968846b1" }, "downloads": -1, "filename": "iceaddr-0.3.3.tar.gz", "has_sig": false, "md5_digest": "27be3591ad8f0f61d7b22e447c774521", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9391989, "upload_time": "2019-01-08T16:31:43", "url": "https://files.pythonhosted.org/packages/27/b3/b4bacef56995a5acbb177d053fab7ce9ad7799bdea773c77d9446092fe28/iceaddr-0.3.3.tar.gz" } ] }