Plot Likert
===========
This is a library to visualize results from [Likert-type](https://en.wikipedia.org/wiki/Likert_scale) survey questions in Python, using [matplotlib](https://matplotlib.org/).
![A sample plot](docs/sample_plot.png)
Installation
------------
Install the latest stable version from PyPI:
```shell
pip install plot-likert
```
To get the latest development version:
```shell
pip install --pre plot-likert
# OR
pip install git+https://github.com/nmalkin/plot-likert.git
```
Quick start
-----------
```python
# Make sure you have some data
import pandas as pd
data = pd.DataFrame({'Q1': {0: 'Strongly disagree', 1: 'Agree', ...},
'Q2': {0: 'Disagree', 1: 'Strongly agree', ...}})
# Now plot it!
import plot_likert
plot_likert.plot_likert(data, plot_likert.scales.agree, plot_percentage=True);
```
Usage and sample figures
------------------------
To learn about how to use this library and see more example figures,
[visit the User Guide, which is a Jupyter notebook](https://github.com/nmalkin/plot-likert/blob/release/docs/guide.ipynb).
Want to see even more examples? [Look here](docs/lots_of_random_figures.ipynb)!
Background
----------
This library was inspired by Jason Bryer's great [`likert` package for R](https://cran.r-project.org/web/packages/likert/) (but it's nowhere near as good).
I needed to visualize the results of some Likert-style questions and knew about the `likert` R package but was surprised to find nothing like that existed in Python, except for a [Stackoverflow answer by Austin Cory Bart](https://stackoverflow.com/a/41384812). This package builds on that solution and packages it as a library.
I've since discovered that there may be other solutions out there.
Here are a few to consider:
- https://github.com/dmardanbeigi/Likert_Scale_Plot_in_Python
- https://github.com/Oliph/likertScalePlot
- https://blog.orikami.nl/behind-the-screens-likert-scale-visualization-368557ad72d1
While this library started as a quick-and-dirty hack,
it has been steadily improving thanks to the contributions of a number of community members and [Fjohürs Lykkewe](https://www.youtube.com/watch?v=ef7cTuVUiWs).
Thank you to everyone who has contributed!
Raw data
{
"_id": null,
"home_page": "https://github.com/nmalkin/plot-likert",
"name": "plot-likert",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "plot graph visualize likert survey matplotlib",
"author": "nmalkin",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/61/a3/adf66dbc61cce5cc2286c5c85289782a0d9b71f47cedfd2266a8a215d430/plot-likert-0.5.0.tar.gz",
"platform": null,
"description": "Plot Likert\n===========\nThis is a library to visualize results from [Likert-type](https://en.wikipedia.org/wiki/Likert_scale) survey questions in Python, using [matplotlib](https://matplotlib.org/).\n\n![A sample plot](docs/sample_plot.png)\n\n\n\nInstallation\n------------\nInstall the latest stable version from PyPI:\n\n```shell\npip install plot-likert\n```\n\nTo get the latest development version:\n\n```shell\npip install --pre plot-likert\n# OR\npip install git+https://github.com/nmalkin/plot-likert.git\n```\n\n\nQuick start\n-----------\n```python\n# Make sure you have some data\nimport pandas as pd\n\ndata = pd.DataFrame({'Q1': {0: 'Strongly disagree', 1: 'Agree', ...},\n 'Q2': {0: 'Disagree', 1: 'Strongly agree', ...}})\n\n# Now plot it!\nimport plot_likert\n\nplot_likert.plot_likert(data, plot_likert.scales.agree, plot_percentage=True);\n```\n\n\nUsage and sample figures\n------------------------\n\nTo learn about how to use this library and see more example figures,\n[visit the User Guide, which is a Jupyter notebook](https://github.com/nmalkin/plot-likert/blob/release/docs/guide.ipynb).\n\nWant to see even more examples? [Look here](docs/lots_of_random_figures.ipynb)!\n\nBackground\n----------\n\nThis library was inspired by Jason Bryer's great [`likert` package for R](https://cran.r-project.org/web/packages/likert/) (but it's nowhere near as good).\nI needed to visualize the results of some Likert-style questions and knew about the `likert` R package but was surprised to find nothing like that existed in Python, except for a [Stackoverflow answer by Austin Cory Bart](https://stackoverflow.com/a/41384812). This package builds on that solution and packages it as a library.\n\nI've since discovered that there may be other solutions out there.\nHere are a few to consider:\n- https://github.com/dmardanbeigi/Likert_Scale_Plot_in_Python\n- https://github.com/Oliph/likertScalePlot\n- https://blog.orikami.nl/behind-the-screens-likert-scale-visualization-368557ad72d1\n\nWhile this library started as a quick-and-dirty hack,\nit has been steadily improving thanks to the contributions of a number of community members and [Fjoh\u00fcrs Lykkewe](https://www.youtube.com/watch?v=ef7cTuVUiWs).\nThank you to everyone who has contributed!\n",
"bugtrack_url": null,
"license": "",
"summary": "Library to visualize results from Likert-style survey questions",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/nmalkin/plot-likert"
},
"split_keywords": [
"plot",
"graph",
"visualize",
"likert",
"survey",
"matplotlib"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9af86d7742dec2f0ee5bbaab5242080139b4bb278aafaaaac36050e383e14ccd",
"md5": "e9611eaac61a18fd91135706759d9fd9",
"sha256": "970f033eed10f0a10aea56320577a98fb15bcb0c8e04f3802d36e0caf67f4c85"
},
"downloads": -1,
"filename": "plot_likert-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9611eaac61a18fd91135706759d9fd9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11184,
"upload_time": "2023-08-11T03:12:45",
"upload_time_iso_8601": "2023-08-11T03:12:45.053366Z",
"url": "https://files.pythonhosted.org/packages/9a/f8/6d7742dec2f0ee5bbaab5242080139b4bb278aafaaaac36050e383e14ccd/plot_likert-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "61a3adf66dbc61cce5cc2286c5c85289782a0d9b71f47cedfd2266a8a215d430",
"md5": "69651d8804ce35af926eb1973d886422",
"sha256": "9315b840e3c54c99af57a414fdde477eac56014b19958480f40e896c501959bb"
},
"downloads": -1,
"filename": "plot-likert-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "69651d8804ce35af926eb1973d886422",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11184,
"upload_time": "2023-08-11T03:15:27",
"upload_time_iso_8601": "2023-08-11T03:15:27.109334Z",
"url": "https://files.pythonhosted.org/packages/61/a3/adf66dbc61cce5cc2286c5c85289782a0d9b71f47cedfd2266a8a215d430/plot-likert-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-11 03:15:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nmalkin",
"github_project": "plot-likert",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "plot-likert"
}