{ "info": { "author": "Jake Kara", "author_email": "jake@jakekara.com", "bugtrack_url": null, "classifiers": [], "description": "# CT Name Cleaner\n\nResolve village and coloquial Connecticut town names, as well as common\nmisspellings of Connecticut town names to their official town names.\n\nThis is based on an R package of the same name by my colleague Andrew Ba Tran.\n\nThis installs a command line script, ctclean, as well as a library\nparticularly meant for use within Jupyter notebooks.\n\nby Jake Kara, jake@jakekara.com\n\n### Latest version\n\n0.10.1\n \n### Installation\n\n pip install ctnamecleaner\n\n### Command line util\n\nUsage:\n\n\t$ ctclean New\\ Preston\n\tWASHINGTON\n\t$ ctclean \"New Preston\"\n\tWASHINGTON\n\nWhen nothing is found, return None:\n\n\t$ ctclean NotGonnaFindItsVille\n\tNone\n\nSet a custom value to return on error with the --error or -e flag:\n\n $ ctclean NotGonnaFindItsVille --error \"Ruh Roh\"\n Ruh Roh\n\n### Use with Pandas dataframes\n\nSee HELP.txt in this directory and the Notebook in the demo/ folder in this\nrepo for an example of translating an entire column with the clean,\nclean_col and the clean_dataframe() method. clean_dataframe uses pandas'\nDataFrame.join() method, so it's faster than using the cean() method\nand applying it with a lambda function yourself. \n\n### Extending with other data\n\nNot in CT? Want to map other things? Just make a spreadsheet and put it\nanywhere, online or locally, that Pandas .read_csv() can open, and then use\nthe constructor to customize the lookup class.\n\n >>> l = lookup.Lookup(csv_url=\"http://path/to/your/sheet\",\n\t\t\t raw_name_col=\"something\",\n\t\t\t clean_name_col=\"something_else\")\n\n### Contents of HELP.txt\n\nBelow this point is auto documentation from the lookup class generated from\nhelp.py:\n\nHelp on module ctlookup.lookup in ctlookup:\n\nNAME\n ctlookup.lookup - Main module for CT Name Cleaner\n\nFILE\n /Applications/MAMP/htdocs/tdev/pyctnamecleaner/package/ctlookup/lookup.py\n\nCLASSES\n Lookup\n \n class Lookup\n | Lookup class for CT place names, or any other DF for that matter\n | \n | Methods defined here:\n | \n | __init__(self, raw_name_col='name', clean_name_col='real.town.name', csv_url=None, use_inet_csv=False)\n | Constructor for Lookup \n | \n | No need to use parameters unless you are specifying a different\n | source URL.\n | \n | Parameters\n | -----------\n | raw_name_col : string, optional\n | The name of the column with input names, like \"New Preston\"\n | \n | Only use if you're using a different source spreadsheet.\n | \n | clean_name_col : string, optional\n | The name of the column with out names, like \"Washington\"\n | \n | Only use if you're using a different source spreadsheet.\n | \n | csv_url : string, optional\n | A valid local file or remote url to use as an alternative\n | source spreadsheet.\n | \n | use_inet_csv : boolean, optional\n | Force a reload of the spreadsheet from the web to reflect any\n | new additions since it was bundled with this python package.\n | \n | Defaults to False. The list doesn't change too much anymore.\n | \n | clean(self, raw_name, error=None)\n | Get a clean place name (e.g. input \"New Preston\" and get\n | \"Washington\")\n | \n | Parameters\n | ----------\n | raw_name : string\n | The input name of the place, such as a village or a\n | common misspelling of a town name\n | \n | error : obj, optional\n | The default to return if no match is found\n | \n | Defaults to None\n | \n | Returns\n | -------\n | String or the value of None (or anything specified with the error\n | parameter) if no match is found\n | \n | clean_col(self, series, error=None)\n | Clean a Pandas Series of place names\n | \n | Parameters\n | ----------\n | series : Pandas Series\n | A series containing place names that need to be cleaned\n | \n | error : obj, optional\n | Value to use if no match is found for a given place.\n | \n | Defaults to None\n | \n | Notes\n | -----\n | Meant as a less opinionated version of clean_dataframe\n | \n | clean_dataframe(self, df, town_col, error=None)\n | Clean an entire column of place names\n | \n | Parameters\n | ----------\n | \n | df : Pandas DataFrame\n | Dataframe containing to clean\n | \n | town_col : valid column label\n | Label of column containing town names to clean\n | \n | error : obj, optional\n | Default value to use when no match is found.\n | \n | Defaults to None\n | \n | Notes\n | -----\n | I plan to deprecate this but leave it in place for\n | backward-compatibility. Use clean_col instead.", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/ctnamecleaner/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jakekara/ctnamecleaner-py", "keywords": "", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "ctnamecleaner", "package_url": "https://pypi.org/project/ctnamecleaner/", "platform": "", "project_url": "https://pypi.org/project/ctnamecleaner/", "project_urls": { "Download": "https://pypi.python.org/pypi/ctnamecleaner/", "Homepage": "https://github.com/jakekara/ctnamecleaner-py" }, "release_url": "https://pypi.org/project/ctnamecleaner/0.10.1/", "requires_dist": null, "requires_python": "", "summary": "Replace village names and commonly-misspelled Connecticut town names with real town/city names.", "version": "0.10.1" }, "last_serial": 3635198, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "95ee1983c0401e3b7b36056dc7fe961d", "sha256": "44de42ea67d3cb478466783bebb2168334689f3dabab6a9f463bc55473fac56d" }, "downloads": -1, "filename": "ctnamecleaner-0.1.tar.gz", "has_sig": false, "md5_digest": "95ee1983c0401e3b7b36056dc7fe961d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1939, "upload_time": "2016-08-25T21:17:44", "url": "https://files.pythonhosted.org/packages/25/4a/7f69f3205626c3c2e2f9abff522245478a68d50d2a113fb48e3996c6c42b/ctnamecleaner-0.1.tar.gz" } ], "0.10": [ { "comment_text": "", "digests": { "md5": "71aed4cb24dfa219d34c469d8e3fc227", "sha256": "57fb678da0ac0ef4251f494f8200bc931c5fd6958bea61601264bebd8643df1d" }, "downloads": -1, "filename": "ctnamecleaner-0.10.tar.gz", "has_sig": false, "md5_digest": "71aed4cb24dfa219d34c469d8e3fc227", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8869, "upload_time": "2016-09-02T13:20:10", "url": "https://files.pythonhosted.org/packages/3e/6c/251fcd6bcfe311d44cff78349abb32130f56e6acba52fff62ec0c872d424/ctnamecleaner-0.10.tar.gz" } ], "0.10.1": [ { "comment_text": "", "digests": { "md5": "9065a428d0731eff2ecf148c523c8dfb", "sha256": "3f14b09b5e9d1ff20a854c12e130d4d8a4bb6f0fc23de6e2105f6b315c6ff2c8" }, "downloads": -1, "filename": "ctnamecleaner-0.10.1.tar.gz", "has_sig": false, "md5_digest": "9065a428d0731eff2ecf148c523c8dfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13421, "upload_time": "2018-03-03T16:10:30", "url": "https://files.pythonhosted.org/packages/93/19/6ea8bdcb804bb861aeb88685233cc24ee4934fc1bdcbc4df682596c35434/ctnamecleaner-0.10.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "561cffe81f6d8c993c2da669afdb9905", "sha256": "813e31077ac8c28c257c20b81a30a5589511da0ada002cec7e2efa693423cee9" }, "downloads": -1, "filename": "ctnamecleaner-0.2.tar.gz", "has_sig": false, "md5_digest": "561cffe81f6d8c993c2da669afdb9905", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1948, "upload_time": "2016-08-25T21:28:47", "url": "https://files.pythonhosted.org/packages/60/f8/5580ed658f90db743b1ad98b5d1b17cf181b738b46537a7cdd2c29e7f265/ctnamecleaner-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1861dfaaebe65398619574c93304d016", "sha256": "863b1f0f2b07da120d89a822f86bac002843ac68580775e42512a703b4fb3407" }, "downloads": -1, "filename": "ctnamecleaner-0.3.tar.gz", "has_sig": false, "md5_digest": "1861dfaaebe65398619574c93304d016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1948, "upload_time": "2016-08-25T21:33:20", "url": "https://files.pythonhosted.org/packages/e8/ad/ca560ffb467520db0d13a6a25cfa5254a7c58486d9e44a76125fff5aa11c/ctnamecleaner-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "08c509a9ff0be44bd9728b793addd37c", "sha256": "2ee3b0caf77f97b793f0f79fac9e0d3fdcc46f5a83d70c78e8c58acde8148bf3" }, "downloads": -1, "filename": "ctnamecleaner-0.4.tar.gz", "has_sig": false, "md5_digest": "08c509a9ff0be44bd9728b793addd37c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1961, "upload_time": "2016-08-25T21:35:53", "url": "https://files.pythonhosted.org/packages/8a/d5/3e1428abe9ba5d0eaec9c62f2b40d3de410cb2e932dedeefd84775eaec6e/ctnamecleaner-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "3f20c97cb6c3d4db9d815c1d95275acc", "sha256": "29ab8d9a5703b160c86b0bf17d88f1509673f79424644bf18b76990dfc61a362" }, "downloads": -1, "filename": "ctnamecleaner-0.5.tar.gz", "has_sig": false, "md5_digest": "3f20c97cb6c3d4db9d815c1d95275acc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2706, "upload_time": "2016-08-26T20:43:53", "url": "https://files.pythonhosted.org/packages/b8/d8/663bc9452cc90e094fb522a116a3b5de5277be778a0f0dd4d4f566137d63/ctnamecleaner-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "2cf6cfa04de92e1ffc8b0197114e0cc7", "sha256": "b6fa3b38f698f3fd961cd55d5ae32d26f08c01a82f9a325f3dfefa2eddbf90fb" }, "downloads": -1, "filename": "ctnamecleaner-0.6.tar.gz", "has_sig": false, "md5_digest": "2cf6cfa04de92e1ffc8b0197114e0cc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3140, "upload_time": "2016-08-29T14:42:01", "url": "https://files.pythonhosted.org/packages/ca/ab/e1f48e0b5c6cfcac885f0f9b51e630c7678bd894b0f59e24127f6480b1e3/ctnamecleaner-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "7c6076960b51b04feb67dfd635c05cec", "sha256": "29abdb10575b86e2af1d406ed4f13dd2c076a124eab888052884c1584ec1fafa" }, "downloads": -1, "filename": "ctnamecleaner-0.7.tar.gz", "has_sig": false, "md5_digest": "7c6076960b51b04feb67dfd635c05cec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3149, "upload_time": "2016-08-29T14:55:07", "url": "https://files.pythonhosted.org/packages/7b/dd/91c53330d25e908b87d086d5d0da0917d59d676a5e44376a5d89f9478006/ctnamecleaner-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "b708d7750e03de4799762430766fae75", "sha256": "71a02d1b847cc1e6ea95409cf8221176c7b96f3dd832e744772d2c35c2b9b2cb" }, "downloads": -1, "filename": "ctnamecleaner-0.8.tar.gz", "has_sig": false, "md5_digest": "b708d7750e03de4799762430766fae75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8714, "upload_time": "2016-08-29T16:10:16", "url": "https://files.pythonhosted.org/packages/ff/aa/4279b7036fe412567097571374c5cbb2b21f7d9b822b5de77a2f1e6f30ab/ctnamecleaner-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "cf6335d13ef5db705bb03ad660918cfa", "sha256": "bd07b1f195cb1f763947ad3878b753235c54bfc25532c5d5ab0b3345c7e5e591" }, "downloads": -1, "filename": "ctnamecleaner-0.9.tar.gz", "has_sig": false, "md5_digest": "cf6335d13ef5db705bb03ad660918cfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8835, "upload_time": "2016-09-02T13:14:03", "url": "https://files.pythonhosted.org/packages/28/c7/b0e6cc49474442935cf1f069840f2a928495171d7ee412e6f5f9ad51e890/ctnamecleaner-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9065a428d0731eff2ecf148c523c8dfb", "sha256": "3f14b09b5e9d1ff20a854c12e130d4d8a4bb6f0fc23de6e2105f6b315c6ff2c8" }, "downloads": -1, "filename": "ctnamecleaner-0.10.1.tar.gz", "has_sig": false, "md5_digest": "9065a428d0731eff2ecf148c523c8dfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13421, "upload_time": "2018-03-03T16:10:30", "url": "https://files.pythonhosted.org/packages/93/19/6ea8bdcb804bb861aeb88685233cc24ee4934fc1bdcbc4df682596c35434/ctnamecleaner-0.10.1.tar.gz" } ] }