{ "info": { "author": "John Krauss", "author_email": "john@accursedware.com", "bugtrack_url": null, "classifiers": [], "description": "# NYC Geoclient Python Bindings\n\nPython bindings for the REST [NYC Geoclient API][api].\n\n [api]: http://developer.cityofnewyork.us/api/geoclient-api-beta\n\n### Usage\n\nFirst, you will need to register an application with the [NYC Developer\nPortal][portal], and make sure that you check off access to the Geoclient API\nfor the application. Take note of the Application's ID and key. You will not\nbe able to use the ID and key until [DoITT][] approves you -- this could take\nseveral days, and you will receive an email when this happens. There isn't any\nindication of your status on the dashboard, but all requests will return a 403.\n\n [portal]: https://developer.cityofnewyork.us/\n [DoITT]: http://www.nyc.gov/html/doitt/html/home/home.shtml\n\nYou can `pip install` nyc-geoclient. It depends upon the [requests][] library.\n\n [requests]: http://docs.python-requests.org/en/latest/index.html\n\n $ pip install nyc_geoclient\n\nOnce your app has been approved by DoITT, using the API is simple:\n\n >>> from nyc_geoclient import Geoclient\n >>> g = Geoclient('my app ID', 'my app key')\n\nAll of the REST endpoints are supported.\n\n >>> g.address('1500', 'Madison Ave', 'Manhattan')\n {u'assemblyDistrict': u'68',\n u'boardOfElectionsPreferredLgc': u'1',\n u'boePreferredStreetName': u'MADISON AVENUE',\n u'boePreferredstreetCode': u'12539001',\n u'boroughCode1In': u'1',\n u'censusBlock2000': u'2000',\n u'censusBlock2010': u'3003',\n u'censusTract1990': u' 168 ',\n u'censusTract2000': u' 168 ',\n u'censusTract2010': u' 168 ',\n u'cityCouncilDistrict': u'08',\n u'civilCourtDistrict': u'06',\n u'coincidentSegmentCount': u'1',\n ...\n\n >>> g.intersection('atlantic ave', 'nevins st', 'Brooklyn')\n {u'assemblyDistrict': u'52',\n u'boroughCode1In': u'3',\n u'censusTract1990': u' 39 ',\n u'censusTract2000': u' 39 ',\n u'censusTract2010': u' 39 ',\n u'cityCouncilDistrict': u'33',\n u'civilCourtDistrict': u'01',\n u'communityDistrict': u'302',\n u'communityDistrictBoroughCode': u'3',\n u'communityDistrictNumber': u'02',\n u'communitySchoolDistrict': u'15',\n u'congressionalDistrict': u'08',\n u'crossStreetNamesFlagIn': u'E',\n u'dcpPreferredLgcForStreet1': u'01',\n u'dcpPreferredLgcForStreet2': u'01',\n u'dotStreetLightContractorArea': u'3',\n ...\n\n##### Errors\n\nIn cases where the geocoder does not work, it will still return a dict. You\nmust look at the value for `message` to see what happened.\n\n >>> g.intersection('atlantic ave', 'nevins st', 'manhattan')\n {u'boroughCode1In': u'1',\n u'censusTract1990': u' ',\n u'censusTract2000': u' ',\n u'censusTract2010': u' ',\n u'crossStreetNamesFlagIn': u'E',\n u'firstBoroughName': u'MANHATTAN',\n u'firstStreetNameNormalized': u'ATLANTIC AVENUE',\n u'geosupportFunctionCode': u'2',\n u'geosupportReturnCode': u'11',\n u'message': u\"'ATLANTIC AVE' NOT RECOGNIZED. THERE ARE NO SIMILAR NAMES\",\n u'secondStreetNameNormalized': u'NEVINS ST',\n u'streetName1In': u'ATLANTIC AVE',\n u'streetName2In': u'NEVINS ST',\n u'workAreaFormatIndicatorIn': u'C'}\n\nThe messages are generally very helpful.\n\n### Documentation\n\nTake a look at the [Python documentation][] for details on using the bindings,\nwhich closely follows the [DoITT documentation][] (requires account/login).\n\n [Python documentation]: https://nyc-geoclient.readthedocs.org/\n [DoITT documentation]: http://developer.cityofnewyork.us/api/geoclient-api-beta\n\n### License\n\nBSD.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/talos/nyc-geoclient", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "nyc_geoclient", "package_url": "https://pypi.org/project/nyc_geoclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nyc_geoclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/talos/nyc-geoclient" }, "release_url": "https://pypi.org/project/nyc_geoclient/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Python bindings for the NYC Geoclient REST API", "version": "0.0.2" }, "last_serial": 985430, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "432d14d65d17fc7e0e196f87b5887299", "sha256": "f1e19b2d64c0f003b9eca60fa2407230811a03d3c53cc2986f12691a0dd96080" }, "downloads": -1, "filename": "nyc_geoclient-0.0.1.tar.gz", "has_sig": false, "md5_digest": "432d14d65d17fc7e0e196f87b5887299", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4002, "upload_time": "2014-01-28T14:01:19", "url": "https://files.pythonhosted.org/packages/d1/b6/7c12cc677dab7ba39afcfc749c043f156201278ccca466048ea8d4d36b6e/nyc_geoclient-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "96d7b8d9945afa65d28cec8919dd9d67", "sha256": "d4c664908bc80e3b7a6dc49b3c96624eb25420734346e7d768fde97bf66738cf" }, "downloads": -1, "filename": "nyc_geoclient-0.0.2.tar.gz", "has_sig": false, "md5_digest": "96d7b8d9945afa65d28cec8919dd9d67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5459, "upload_time": "2014-01-29T19:36:12", "url": "https://files.pythonhosted.org/packages/48/bc/26cf7e4a139f1b319a9328e0a769a680f248d8ee11ba018c47263fc2c8e1/nyc_geoclient-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "96d7b8d9945afa65d28cec8919dd9d67", "sha256": "d4c664908bc80e3b7a6dc49b3c96624eb25420734346e7d768fde97bf66738cf" }, "downloads": -1, "filename": "nyc_geoclient-0.0.2.tar.gz", "has_sig": false, "md5_digest": "96d7b8d9945afa65d28cec8919dd9d67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5459, "upload_time": "2014-01-29T19:36:12", "url": "https://files.pythonhosted.org/packages/48/bc/26cf7e4a139f1b319a9328e0a769a680f248d8ee11ba018c47263fc2c8e1/nyc_geoclient-0.0.2.tar.gz" } ] }