{ "info": { "author": "Neil Freeman", "author_email": "contact@fakeisthenewreal.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Census Geocode\n--------------\n\nCensus Geocode is a light weight Python wrapper for the US Census [Geocoder API](http://geocoding.geo.census.gov/geocoder/), compatible with both Python 2 and 3. It comes packaged with a simple command line tool for geocoding an address to a longitude and latitude, or a batch file into a parsed address and coordinates.\n\nIt's strongly recommended to review the [Census Geocoder docs](https://geocoding.geo.census.gov/geocoder/Geocoding_Services_API.pdf) before using this module.\n\nBasic example:\n\n```python\nimport censusgeocode as cg\n\ncg.coordinates(x=-76, y=41)\ncg.onelineaddress('1600 Pennsylvania Avenue, Washington, DC')\ncg.address('1600 Pennsylvania Avenue', city='Washington', state='DC', zipcode='22052')\ncg.addressbatch('data/addresses.csv')\n```\n\nUse the returntype keyword to specify 'locations' or 'geographies'. 'Locations' yields structured information about the address, and 'geographies' yields information about the Census geographies. Geographies is the default.\n```python\ncg.onelineaddress('1600 Pennsylvania Avenue, Washington, DC', returntype='locations')\n```\n\nQueries return a CensusResult object, which is basically a Python list with an extra 'input' property, which the Census returns to tell you how they interpreted your request.\n\n```python\n>>> result = cg.coordinates(x=-76, y=41)\n>>> result.input\n{\n u'vintage': {\n u'vintageName': u'Current_Current',\n u'id': u'4',\n u'vintageDescription': u'Current Vintage - Current Benchmark',\n u'isDefault': True\n },\n u'benchmark': {\n u'benchmarkName': u'Public_AR_Current',\n u'id': u'4',\n u'isDefault': False,\n u'benchmarkDescription': u'Public Address Ranges - Current Benchmark'\n },\n u'location': {\n u'y': 41.0,\n u'x': -76.0\n }\n}\n>>> result\n[{\n '2010 Census Blocks': [{\n 'AREALAND': 1409023,\n 'AREAWATER': 0,\n 'BASENAME': '1045',\n 'BLKGRP': '1',\n 'BLOCK': '1045',\n 'CENTLAT': '+40.9957436',\n 'CENTLON': '-076.0089338',\n 'COUNTY': '079',\n 'FUNCSTAT': 'S',\n 'GEOID': '420792166001045',\n 'INTPTLAT': '+40.9957436',\n 'INTPTLON': '-076.0089338',\n 'LSADC': 'BK',\n 'LWBLKTYP': 'L',\n 'MTFCC': 'G5040',\n 'NAME': 'Block 1045',\n 'OBJECTID': 9940449,\n 'OID': 210404020212114,\n 'STATE': '42',\n 'SUFFIX': '',\n 'TRACT': '216600'\n }],\n 'Census Tracts': [{\n 'AREALAND': 86404594,\n 'AREAWATER': 650526,\n 'BASENAME': '2166',\n 'CENTLAT': '+41.0361462',\n 'CENTLON': '-075.9801252',\n 'COUNTY': '079',\n 'FUNCSTAT': 'S',\n 'GEOID': '42079216600',\n 'INTPTLAT': '+41.0379841',\n 'INTPTLON': '-075.9743749',\n 'LSADC': 'CT',\n 'MTFCC': 'G5020',\n 'NAME': 'Census Tract 2166',\n 'OBJECTID': 61245,\n 'OID': 20790277158250,\n 'STATE': '42',\n 'TRACT': '216600'\n }],\n 'Counties': [{\n 'AREALAND': 2305974186,\n 'AREAWATER': 41240020,\n 'BASENAME': 'Luzerne',\n 'CENTLAT': '+41.1768961',\n 'CENTLON': '-075.9890400',\n 'COUNTY': '079',\n 'COUNTYCC': 'H1',\n 'COUNTYNS': '01209183',\n 'FUNCSTAT': 'A',\n 'GEOID': '42079',\n 'INTPTLAT': '+41.1727868',\n 'INTPTLON': '-075.9760345',\n 'LSADC': '06',\n 'MTFCC': 'G4020',\n 'NAME': 'Luzerne County',\n 'OBJECTID': 866,\n 'OID': 27590277115518,\n 'STATE': '42'\n }],\n 'States': [{\n 'AREALAND': 115884236236,\n 'AREAWATER': 3395797284,\n 'BASENAME': 'Pennsylvania',\n 'CENTLAT': '+40.9011252',\n 'CENTLON': '-077.8369164',\n 'DIVISION': '2',\n 'FUNCSTAT': 'A',\n 'GEOID': '42',\n 'INTPTLAT': '+40.9024957',\n 'INTPTLON': '-077.8334514',\n 'LSADC': '00',\n 'MTFCC': 'G4000',\n 'NAME': 'Pennsylvania',\n 'OBJECTID': 37,\n 'OID': 27490163788605,\n 'REGION': '1',\n 'STATE': '42',\n 'STATENS': '01779798',\n 'STUSAB': 'PA'\n }]\n}]\n```\n\n### Advanced\n\nBy default, the geocoder uses the \"Current\" vintage and benchmarks. To use another vintage or benchmark, use the `CensusGeocode` class:\n````python\nimport censusgeocode\ncg = censusgeocode.CensusGeocode(benchmark='Public_AR_Census2010', vintage='Census2010_Census2010')\ncg.onelineaddress(foobar)\n````\n\nThe Census may update the available benchmarks and vintages. Review the Census Geocoder docs for the currently available [benchmarks](https://geocoding.geo.census.gov/geocoder/benchmarks) and [vintages](https://geocoding.geo.census.gov/geocoder/vintages?form).\n\n## Command line tool\n\nThe `censusgeocode` tool has two settings.\n\nAt the simplest, it takes one argument, an address, and returns a comma-delimited longitude, latitude pair.\n````bash\ncensusgeocode '100 Fifth Avenue, New York, NY'\n-73.992195,40.73797\n\ncensusgeocode '1600 Pennsylvania Avenue, Washington DC'\n-77.03535,38.898754\n````\n\nThe Census geocoder is reasonably good at recognizing non-standard addresses.\n````bash\ncensusgeocode 'Hollywood & Vine, LA, CA'\n-118.32668,34.101624\n````\n\nIt can also use the Census Geocoder's batch function to process an entire file. The file must be comma-delimited, have no header, and include the following columns:\n````\nunique id, street address, state, city, zip code\n````\n\nThe geocoder can read from a file:\n````\ncensusgeocode --csv tests/fixtures/batch.csv\n````\n([example file](https://github.com/fitnr/censusgeocode/blob/master/tests/fixtures/batch.csv))\n\nOr from stdin, using `-` as the filename:\n````\ncat tests/fixtures/batch.csv | censusgeocode --csv -\n````\n\nAccording to the Census docs, the batch geocoder is limited to 1000 rows.\n\nThe output will be a CSV file (with a header) and the columns:\n* id\n* address\n* match\n* matchtype\n* parsed\n* tigerlineid\n* side\n* lat\n* lon\n\nIf your data doesn't have a unique id, try adding line numbers with the Unix command line utility `nl`:\n```\nnl -s , input.csv | censusgeocode --csv - > output.csv\n```\n\n## License\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.\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/fitnr/censusgeocode", "keywords": "census geocode api", "license": "GNU General Public License v3 (GPLv3)", "maintainer": "", "maintainer_email": "", "name": "censusgeocode", "package_url": "https://pypi.org/project/censusgeocode/", "platform": "", "project_url": "https://pypi.org/project/censusgeocode/", "project_urls": { "Homepage": "https://github.com/fitnr/censusgeocode" }, "release_url": "https://pypi.org/project/censusgeocode/0.4.3.post1/", "requires_dist": [ "requests[security] (<3,>=2.18)", "requests-toolbelt (<1,>=0.8.0)", "six" ], "requires_python": "", "summary": "Thin Python wrapper for the US Census Geocoder", "version": "0.4.3.post1" }, "last_serial": 4783335, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d876a620cd656589a2423f66f2c39bf4", "sha256": "c41bc397182b7d21c6dba1752c82d3ac6d21f2dde2e6f60b9edc0b66b4a89d3a" }, "downloads": -1, "filename": "censusgeocode-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d876a620cd656589a2423f66f2c39bf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4121, "upload_time": "2015-07-24T22:37:06", "url": "https://files.pythonhosted.org/packages/62/ea/c8668357af155e628b5b205b9666d67e31b2aca31ff946979d69efe4be6e/censusgeocode-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "602382012da480b73539064ba9320b58", "sha256": "b0af930171af69473563bf5cc34faa8b33566661d7d6886aa2cca6724955b7c0" }, "downloads": -1, "filename": "censusgeocode-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "602382012da480b73539064ba9320b58", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6667, "upload_time": "2015-07-24T22:37:52", "url": "https://files.pythonhosted.org/packages/f5/63/ca27d2864e0aa351abb094bf48f2585d76e5ee90b3cdfd5088b14a2a0b54/censusgeocode-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e00238e35325e5e5ea6cfb9ae9205466", "sha256": "30012dbddb5e6a90a9251f6518140a064d1b5ffff66dfdad13c5408b7af8eda2" }, "downloads": -1, "filename": "censusgeocode-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e00238e35325e5e5ea6cfb9ae9205466", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4199, "upload_time": "2015-07-24T22:38:10", "url": "https://files.pythonhosted.org/packages/94/40/62a31f57e914716941e95bbd26e5b2ae6275567267c3c500d2c6c307a514/censusgeocode-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ccffde0eb7486956ec9101c765a14971", "sha256": "1f9717f2da95b50be8f735fb2b15f4af1e174f2008be603afdd8165384c8a27f" }, "downloads": -1, "filename": "censusgeocode-0.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "ccffde0eb7486956ec9101c765a14971", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9047, "upload_time": "2015-10-04T18:40:12", "url": "https://files.pythonhosted.org/packages/9a/a3/2b8ed21fc21c78c76629f1286d9c59ecabfd225a2ecad8e891630fb9ea08/censusgeocode-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca434b0abce0097ab08a5681eb84ffda", "sha256": "39164e5ab8e47389916b13a33701f570213251a3a3dbe3caa2c8eef5e52f1a73" }, "downloads": -1, "filename": "censusgeocode-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ca434b0abce0097ab08a5681eb84ffda", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8987, "upload_time": "2015-10-04T18:40:18", "url": "https://files.pythonhosted.org/packages/6d/a6/264bf9add754760e6f0c7cb11d2213c432124adfe3fcf33e623295fd2c1c/censusgeocode-0.2.1-py3-none-any.whl" } ], "0.2.2": [], "0.2.3": [], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9551c3de44981430963b5ecba5902a14", "sha256": "c1f46cf5628fd7595cbe784b9cb7d395fb32fc71fbdcca3bc798f5584ace0d65" }, "downloads": -1, "filename": "censusgeocode-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9551c3de44981430963b5ecba5902a14", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9672, "upload_time": "2017-10-31T18:29:52", "url": "https://files.pythonhosted.org/packages/f7/0f/449e2ff594bcac7c18641984f588e2aa7931b2535e8e78e4934085b88cca/censusgeocode-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c36703264ca9baedadf34004cd9caeae", "sha256": "0013fad6c7bd290a4968f3dabede3a03285bd9f68c2cfc6d340b2417d5614f75" }, "downloads": -1, "filename": "censusgeocode-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c36703264ca9baedadf34004cd9caeae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5628, "upload_time": "2017-10-31T18:29:53", "url": "https://files.pythonhosted.org/packages/35/b8/06a6e64da18dd7c53ef139c97d7939c5e457646e23526def2eeb321d2998/censusgeocode-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "51cd3d5b11263c3f39c84931bded4ecb", "sha256": "c71d0d4e8ca4d08f3b74d7032122791752c1d40e0813e53b5679666f32f8688e" }, "downloads": -1, "filename": "censusgeocode-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "51cd3d5b11263c3f39c84931bded4ecb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12011, "upload_time": "2017-11-10T19:24:47", "url": "https://files.pythonhosted.org/packages/95/28/61f027867e5cf41146ec421761d73a1f0d4f3fd370cf0b80d61bff1e03b6/censusgeocode-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48d3e2d466265827363f9aa61c6c6648", "sha256": "de12909d8f1d851c2b0bd7879aa79b4201b6fc175122bd5be572bb23201c3d0f" }, "downloads": -1, "filename": "censusgeocode-0.4.0.tar.gz", "has_sig": false, "md5_digest": "48d3e2d466265827363f9aa61c6c6648", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7604, "upload_time": "2017-11-10T19:24:49", "url": "https://files.pythonhosted.org/packages/e3/f0/dc187580c50098a258f720e6bc1002938bb270e6112c15d11f2d5d644a96/censusgeocode-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "6dff9d4f0770ef4cc9e9804740fe0299", "sha256": "8775495b8a1875dcad0a9b5347aedfe3fe0f75458b96aeacac60f45dae5b579e" }, "downloads": -1, "filename": "censusgeocode-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6dff9d4f0770ef4cc9e9804740fe0299", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12658, "upload_time": "2017-11-10T20:38:16", "url": "https://files.pythonhosted.org/packages/88/87/598222d48e94426a8320042a7ad2aa528ff93f849024127e47d9a6b1cadd/censusgeocode-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cff86eefbf78d58762360d14fc184793", "sha256": "dd77323662b258575dd88f2aecfae4b139abfa7c778d52b4151c87c65d89ddf3" }, "downloads": -1, "filename": "censusgeocode-0.4.1.tar.gz", "has_sig": false, "md5_digest": "cff86eefbf78d58762360d14fc184793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8048, "upload_time": "2017-11-10T20:38:17", "url": "https://files.pythonhosted.org/packages/d6/d0/eb689e1f43c5cfec6cefe400671044719511f660b6dc0b9fce16cc7309f0/censusgeocode-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "fd16f35be58ae7194a821013d5a15793", "sha256": "b738cd1b9c26060e3613e4a7b8dc34c1c18c93787acde5372ec5077b03f1c20b" }, "downloads": -1, "filename": "censusgeocode-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fd16f35be58ae7194a821013d5a15793", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12674, "upload_time": "2017-11-10T21:10:25", "url": "https://files.pythonhosted.org/packages/3b/6a/2f829771a594ffa38be0df5ee25993128797100d8483a09d91fd81125dcb/censusgeocode-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7333b5ad3193b65dc40e4dfb2051a152", "sha256": "e4532c61abca3c55bf104758bb10a84691ee8a6b3695e135ebd881f207d92332" }, "downloads": -1, "filename": "censusgeocode-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7333b5ad3193b65dc40e4dfb2051a152", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8068, "upload_time": "2017-11-10T21:10:26", "url": "https://files.pythonhosted.org/packages/c3/b3/6f8890ce1738dd4badcf66c8048621db1c3e1121db82cee8cdc1d6f7898a/censusgeocode-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "8812dec163603b3ecd44c51b3630c522", "sha256": "0e81ee9f74d0e3c70433d7a4e6491240070aac35051fea4a6584774c1708ac9d" }, "downloads": -1, "filename": "censusgeocode-0.4.3.tar.gz", "has_sig": false, "md5_digest": "8812dec163603b3ecd44c51b3630c522", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7050, "upload_time": "2019-02-05T17:58:38", "url": "https://files.pythonhosted.org/packages/ab/fc/c0187b4bc40666fd98b5b9fd9c389e2740b3bf1e16812a12470bbdaff8cc/censusgeocode-0.4.3.tar.gz" } ], "0.4.3.post1": [ { "comment_text": "", "digests": { "md5": "ed37eb32f88a085612530c7d3ffd3229", "sha256": "bf81d1c953536174b52b99eff36d9a6384923f6f9516502cd12c03902c50f1c8" }, "downloads": -1, "filename": "censusgeocode-0.4.3.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ed37eb32f88a085612530c7d3ffd3229", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8979, "upload_time": "2019-02-05T18:15:06", "url": "https://files.pythonhosted.org/packages/2d/bb/33aff3841b625f14301e3fefb9125f549e4d5ac992751078c080ad831575/censusgeocode-0.4.3.post1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fefc62edf331bf7fb5bb6e21b473108d", "sha256": "60bdb9999d79b2164d6f6589f124c20033b923c19f068b6d49686df7d0d201c0" }, "downloads": -1, "filename": "censusgeocode-0.4.3.post1.tar.gz", "has_sig": false, "md5_digest": "fefc62edf331bf7fb5bb6e21b473108d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21509, "upload_time": "2019-02-05T18:15:07", "url": "https://files.pythonhosted.org/packages/76/f5/e29d06c964eb8405aa8ad00fa97541c5f68adbb32b127ca456a984f99063/censusgeocode-0.4.3.post1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed37eb32f88a085612530c7d3ffd3229", "sha256": "bf81d1c953536174b52b99eff36d9a6384923f6f9516502cd12c03902c50f1c8" }, "downloads": -1, "filename": "censusgeocode-0.4.3.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ed37eb32f88a085612530c7d3ffd3229", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8979, "upload_time": "2019-02-05T18:15:06", "url": "https://files.pythonhosted.org/packages/2d/bb/33aff3841b625f14301e3fefb9125f549e4d5ac992751078c080ad831575/censusgeocode-0.4.3.post1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fefc62edf331bf7fb5bb6e21b473108d", "sha256": "60bdb9999d79b2164d6f6589f124c20033b923c19f068b6d49686df7d0d201c0" }, "downloads": -1, "filename": "censusgeocode-0.4.3.post1.tar.gz", "has_sig": false, "md5_digest": "fefc62edf331bf7fb5bb6e21b473108d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21509, "upload_time": "2019-02-05T18:15:07", "url": "https://files.pythonhosted.org/packages/76/f5/e29d06c964eb8405aa8ad00fa97541c5f68adbb32b127ca456a984f99063/censusgeocode-0.4.3.post1.tar.gz" } ] }