survey-tools


Namesurvey-tools JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummarySimple python tools for survey research analysis for users of Pandas
upload_time2024-08-16 03:43:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright (c) 2018 The Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords crosstabs recode survey research weighting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # survey_tools

This is a simple python package for survey research analysis containing convenient functions for weighted crosstabs, recoding, and weighting.

# Install

You can install survey_tools with `pip`:

```
python -m pip install survey_tools
```

# Assorted Python Functions for Survey Research

`tabs` - 1, 2, and 3 way tabs. Make them weighted or unweighted. Have them include NAs or not. Have them be counts or normalized by row, column, or cell.

```python
tabs(data, 'var_name', display='column', wts='weight_var', dropna=False)
```

`rake_weight` - weight a survey to specified targets using the raking method.

```python
rake_weight(data, df_of_proportions_to_weight_to)
```

`recode` (Similar to car::recode in R) - Select a variable and create a simple recoding string to easily recode variables.

```python
recode(data, 'var_name', 'lo:5=1;6:10=2;11:hi=3;NaN=NaN')
```

`get_names` function - Use regex to easily select names in a given pandas.DataFrame

```python
get_names(data, r'^[Yy]ear.+')
```

# Future Add-ons
1. Add CI function
2. Stacking survey
3. Add other weighting functions like matching, propensity weighting, or multiple combinations of these and raking.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "survey-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Alex Bass <acbass49@gmail.com>",
    "keywords": "Crosstabs, Recode, Survey Research, Weighting",
    "author": null,
    "author_email": "Alex Bass <acbass49@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f7/5b/20e2564fa0b6f1386d7ca77b23fd1936b8ce0506f3b92d94052448b20ab9/survey_tools-0.1.1.tar.gz",
    "platform": null,
    "description": "# survey_tools\n\nThis is a simple python package for survey research analysis containing convenient functions for weighted crosstabs, recoding, and weighting.\n\n# Install\n\nYou can install survey_tools with `pip`:\n\n```\npython -m pip install survey_tools\n```\n\n# Assorted Python Functions for Survey Research\n\n`tabs` - 1, 2, and 3 way tabs. Make them weighted or unweighted. Have them include NAs or not. Have them be counts or normalized by row, column, or cell.\n\n```python\ntabs(data, 'var_name', display='column', wts='weight_var', dropna=False)\n```\n\n`rake_weight` - weight a survey to specified targets using the raking method.\n\n```python\nrake_weight(data, df_of_proportions_to_weight_to)\n```\n\n`recode` (Similar to car::recode in R) - Select a variable and create a simple recoding string to easily recode variables.\n\n```python\nrecode(data, 'var_name', 'lo:5=1;6:10=2;11:hi=3;NaN=NaN')\n```\n\n`get_names` function - Use regex to easily select names in a given pandas.DataFrame\n\n```python\nget_names(data, r'^[Yy]ear.+')\n```\n\n# Future Add-ons\n1. Add CI function\n2. Stacking survey\n3. Add other weighting functions like matching, propensity weighting, or multiple combinations of these and raking.\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2018 The Python Packaging Authority  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Simple python tools for survey research analysis for users of Pandas",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/acbass49/survey_tools",
        "Issues": "https://github.com/acbass49/survey_tools/issues",
        "Vignette": "https://alexbass.me/projects/survey_tools/"
    },
    "split_keywords": [
        "crosstabs",
        " recode",
        " survey research",
        " weighting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "139df0ef04d4ba30e7f3bbdcea7b9f02311111e169682ab62975f04ae98b75cb",
                "md5": "5ca12b181961e5cb5197e272c7056d44",
                "sha256": "c4c7a3c441469fffdc6cabd8948c6569e5737632c7146375ee7a67385d8e7eaf"
            },
            "downloads": -1,
            "filename": "survey_tools-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ca12b181961e5cb5197e272c7056d44",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9269,
            "upload_time": "2024-08-16T03:43:14",
            "upload_time_iso_8601": "2024-08-16T03:43:14.135338Z",
            "url": "https://files.pythonhosted.org/packages/13/9d/f0ef04d4ba30e7f3bbdcea7b9f02311111e169682ab62975f04ae98b75cb/survey_tools-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f75b20e2564fa0b6f1386d7ca77b23fd1936b8ce0506f3b92d94052448b20ab9",
                "md5": "23d6793e3bb9a2230ab0716177058e05",
                "sha256": "6ac23c39f0267bc0a5d768a1ae5fe2e89c930d54fa5154105fd6d1881e0c3fd4"
            },
            "downloads": -1,
            "filename": "survey_tools-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "23d6793e3bb9a2230ab0716177058e05",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14157,
            "upload_time": "2024-08-16T03:43:15",
            "upload_time_iso_8601": "2024-08-16T03:43:15.567464Z",
            "url": "https://files.pythonhosted.org/packages/f7/5b/20e2564fa0b6f1386d7ca77b23fd1936b8ce0506f3b92d94052448b20ab9/survey_tools-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-16 03:43:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "acbass49",
    "github_project": "survey_tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "survey-tools"
}
        
Elapsed time: 1.38230s