Python: Create a Likert Scale Chart with Plot-Likert ver. 2

Last Updated on October 12, 2021 by shibatau

I.What do you learn?

Let me introduce Plot Likert, which visualizes results from Likert-type survey quetions in Python, using matplotlib.

https://github.com/nmalkin/plot-likert

II.Liket-type survey

I have often created pie charts for the results from Likert-type survey like these.

They look beautiful but not so informative about the difference among charts in comparison to Likert scale chars.  

III.Scripts

!pip install plot-likert
import plot_likert
import pandas as pd
# define my selections
myscale1 = \
    ['strongly disagree',
     'disagree',
     'neutral',
     'agree',
     'strongly agree']
# create a likert plot
plot_likert.plot_likert(df2_bef4_6, myscale1, plot_percentage=True)

You can see my sample scripts here:

https://colab.research.google.com/drive/1j8Z5ol4ozY6sM8UX_dstADtc7TCs8tkk?usp=sharing

About shibatau

I was born and grown up in Kyoto. I studied western philosophy at the University and specialized in analytic philosophy, especially Ludwig Wittgenstein at the postgraduate school. I'm interested in new technology, especially machine learning and have been learning R language for two years and began to learn Python last summer. Listening toParamore, Sia, Amazarashi and MIyuki Nakajima. Favorite movies I've recently seen: "FREEHELD". Favorite actors and actresses: Anthony Hopkins, Denzel Washington, Ellen Page, Meryl Streep, Mia Wasikowska and Robert DeNiro. Favorite books: Fyodor Mikhailovich Dostoyevsky, "The Karamazov Brothers", Shinran, "Lamentations of Divergences". Favorite phrase: Salvation by Faith. Twitter: @shibatau

2 Comments

  1. Likert plot is so great! Is there a way of including percentage breakdown inside the bars themselves?

    Any help would be greatly appreciated!

    Thanks 🙂

  2. Thank you for asking. You can see the scripts for the plot with percentage breakdowns here: https://stackoverflow.com/questions/70975856/adding-percentages-to-subgroups-of-each-group-likert-scale-python.
    I also have run the codes on Google Colaboratory: https://colab.research.google.com/drive/1nxvP0rZvY-GuK12n0vOF3x_zVOo0v5Cf?usp=sharing
    You are required to restart the run time in the middle. I hope this helps.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.