{ "info": { "author": "Ben Welsh", "author_email": "ben.welsh@latimes.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "
8\"\"\"\"8                           8\"\"\"\"8\n8      eeeee eeeee eeeee eeee    8      eeeee e    e e     eeee\n8eeeee   8   8   8   8   8       8eeeee   8   8    8 8     8\n    88   8e  8eee8   8e  8eee        88   8e  8eeee8 8e    8eee\ne   88   88  88  8   88  88      e   88   88    88   88    88\n8eee88   88  88  8   88  88ee    8eee88   88    88   88eee 88ee 
\n\nA Python library that standardizes the names of U.S. states\n\n[![Build Status](https://travis-ci.org/datadesk/latimes-statestyle.png?branch=master)](https://travis-ci.org/datadesk/latimes-statestyle)\n[![PyPI version](https://badge.fury.io/py/latimes-statestyle.png)](http://badge.fury.io/py/latimes-statestyle)\n[![Coverage Status](https://coveralls.io/repos/datadesk/latimes-statestyle/badge.png?branch=master)](https://coveralls.io/r/datadesk/latimes-statestyle?branch=master)\n\n* Issues: [https://github.com/datadesk/latimes-statestyle/issues](https://github.com/datadesk/latimes-statestyle/issues)\n* Packaging: [https://pypi.python.org/pypi/latimes-statestyle](https://pypi.python.org/pypi/latimes-statestyle)\n* Testing: [https://travis-ci.org/datadesk/latimes-statestyle](https://travis-ci.org/datadesk/latimes-statestyle)\n* Coverage: [https://coveralls.io/r/datadesk/latimes-statestyle](https://coveralls.io/r/datadesk/latimes-statestyle)\n\nFeatures\n--------\n\n- Submit a state\u2019s name, postal code or Associated Press abbreviation or [FIPS\n code](https://en.wikipedia.org/wiki/Federal_Information_Processing_Standards)\n and receive a clean object with all other formats as attributes.\n- State objects also provide the \u201cstateface\u201d code for [ProPublica\u2019s\n web font of state shapes](http://propublica.github.com/stateface/)\n\nGetting started\n---------------\n\nGetting started is as easy as\u2026\n\n```bash\n$ pip install latimes-statestyle\n```\n\nThen start feeding it your data.\n\n```python\n>>> import statestyle\n# Get by postal code\n>>> obj = statestyle.get('CA')\n```\n\nIf there is a match you can access the clean, standardized attributes.\n\n```python\n# Here's the full name of the state\n>>> print obj.name\nCalifornia\n# The U.S. postal code\n>>> print obj.postal\nCA\n# The Associated Press style abbreviation\n>>> print obj.ap\nCalif.\n# The FIPS ID code\n>>> print obj.fips\n6\n# The type of geographic area\n>>> print obj.type\nstate\n# The ProPublica stateface code\n>>> obj.stateface\n\"E\"\n```\n\nYou can pass in any of the attributes for a match.\n\n```python\n# Like the FIPS code\n>>> obj = statestyle.get(6)\n# And the same attributes available\n>>> print obj.name\nCalifornia\n```\n\nHere's what happens when you submit something that doesn't have a match.\n\n```python\n>>> statestyle.get(\"foo\")\nTraceback (most recent call last):\n File \"\", line 1, in \n File \"statestyle/__init__.py\", line 27, in get\n raise ValueError(\"The state you requested does not exist\")\nValueError: The state you requested does not exist\n```\n\nAnd here's a couple ways you can convert the object it returns to a dictionary.\n\n```python\n>>> o = statestyle.get(\"CA\")\n>>> dict(o)\n{'name': 'California', 'ap': 'Calif.', 'fips': '6', 'postal': 'CA', 'type': 'state', 'stateface': 'E'}\n>>> o.to_dict()\n{'name': 'California', 'ap': 'Calif.', 'fips': '6', 'postal': 'CA', 'type': 'state', 'stateface': 'E'}\n# You can also access the attributes as dictionary keys if you want\n>>> o['name']\n'California'\n```\n\nContributing\n------------\n\nIf you would like to add another feature or change existing data, edit\n`statestyle/data.csv` and then run `python build.py`, which will remake\nthe data file imported by the library.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "latimes-statestyle", "package_url": "https://pypi.org/project/latimes-statestyle/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/latimes-statestyle/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/latimes-statestyle/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "Standardizes data about U.S. states", "version": "0.1.6" }, "last_serial": 1475780, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d779d257d1f1d4235dfcfde7a845313d", "sha256": "92aad04a988491c5012250c47de674e645d9dfc116afdeb82966108b2b3979ee" }, "downloads": -1, "filename": "latimes-statestyle-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d779d257d1f1d4235dfcfde7a845313d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7091, "upload_time": "2011-07-22T23:07:52", "url": "https://files.pythonhosted.org/packages/41/a5/d54c4c0ab53167a83d90deddccc8717d82176e86bf1161845bca677f038d/latimes-statestyle-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3ae1abcb706432acf2e6ea71b34e64b6", "sha256": "9f9d6ad6bb7fae27b77bda00115d2f0b142b1751bb638035a459134c7cf7da1f" }, "downloads": -1, "filename": "latimes-statestyle-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ae1abcb706432acf2e6ea71b34e64b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7213, "upload_time": "2012-02-03T03:35:24", "url": "https://files.pythonhosted.org/packages/08/9d/dddeefd0204149688ab2c951ccafacc4b93b8bb624f559dd1dca4d6ff28e/latimes-statestyle-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "94de2151bfac582d5c884ae75390003d", "sha256": "df1d25fdf6faeecb455f2fcf5b861455b4f47b54d9f6ee2e7971f57906794779" }, "downloads": -1, "filename": "latimes-statestyle-0.1.2.tar.gz", "has_sig": false, "md5_digest": "94de2151bfac582d5c884ae75390003d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7821, "upload_time": "2012-03-23T01:28:11", "url": "https://files.pythonhosted.org/packages/69/52/d4befa5ddc26f6d9fd67dd5f56ac23ec61ed47ef84015c698a578c0edee4/latimes-statestyle-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "3fe2a18c9a3fe4e8e3c8a26c2037929c", "sha256": "90edc582e0f6773ee705062b85949b04315efc1a101e4440cee400131108431f" }, "downloads": -1, "filename": "latimes-statestyle-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3fe2a18c9a3fe4e8e3c8a26c2037929c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13986, "upload_time": "2013-08-16T16:36:48", "url": "https://files.pythonhosted.org/packages/9a/27/2a6315bcd19dbaf8b24391d5f28f41dca5dd7e40be396c28d30b3338709f/latimes-statestyle-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a35a5d699981e797e0eb0e10312d275a", "sha256": "c4f0158f204c95c4ccc4636f86212da68a73b854f48dbdd3a099cc1f49beabf8" }, "downloads": -1, "filename": "latimes-statestyle-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a35a5d699981e797e0eb0e10312d275a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8491, "upload_time": "2015-03-21T05:30:22", "url": "https://files.pythonhosted.org/packages/34/08/62e78245e818944d35a04f5b8bb7c5f3404730792afc6c211bec1ca8d29f/latimes-statestyle-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "772499cfa9b0e19cd1249dab4d6818fc", "sha256": "f0528fca3b0fabc4c8925c8a769548f59b7a8bf8b779aa8ba91b936a6efd8406" }, "downloads": -1, "filename": "latimes-statestyle-0.1.5.tar.gz", "has_sig": false, "md5_digest": "772499cfa9b0e19cd1249dab4d6818fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8926, "upload_time": "2015-03-24T17:14:02", "url": "https://files.pythonhosted.org/packages/cd/dd/77e45127e501c2de7fc4b776d43a4ceb2e7426a093899f3073a035408db4/latimes-statestyle-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "69907a834d27a3f02625a95af9643475", "sha256": "7f3a6fed8a226458fd2be284ac4a28c5ed06159d6544ac5d0cfe34830a3d4905" }, "downloads": -1, "filename": "latimes-statestyle-0.1.6.tar.gz", "has_sig": false, "md5_digest": "69907a834d27a3f02625a95af9643475", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8937, "upload_time": "2015-03-24T18:33:08", "url": "https://files.pythonhosted.org/packages/5f/8a/dfd64823f0b4bcad4f052ea90a42b6e48b113a75781b2d52751c4d75d6ad/latimes-statestyle-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "69907a834d27a3f02625a95af9643475", "sha256": "7f3a6fed8a226458fd2be284ac4a28c5ed06159d6544ac5d0cfe34830a3d4905" }, "downloads": -1, "filename": "latimes-statestyle-0.1.6.tar.gz", "has_sig": false, "md5_digest": "69907a834d27a3f02625a95af9643475", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8937, "upload_time": "2015-03-24T18:33:08", "url": "https://files.pythonhosted.org/packages/5f/8a/dfd64823f0b4bcad4f052ea90a42b6e48b113a75781b2d52751c4d75d6ad/latimes-statestyle-0.1.6.tar.gz" } ] }