Skip to content

Visualizing a Google Forms Survey via Python, Seaborn and Matplotlib

Notifications You must be signed in to change notification settings

Pydes-boop/SurveyVisualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google Survey Visualization

This is a simple Python Script to create combined subplots of user surveys which used the standard Likert-Scale from 1...5 (Strongly Disagree...Strongly Agree)

Additionally it uses Color Maps to color code the different parts of our survey

Examples of our generated Graph-Image look like this:

Image showing several survey charts, some colored green and some colored orange Image showing several survey charts, some colored green and some colored orange

This Code should be easily transferable for other survey results if theyre also using the Likert-Scale

Usage

This is our main method to generate our plot-images

   def plot_subplot(column_count, row_count, df_columns, colorlist, name, deleteLastPlot=False, XLabel=''):

column_count: amount of columns for image generation
row_count: amount of rows for image generation
df_columns: Dataframe that includes all the columns we want to plot
colorlist: List of ColorMaps or Colors (needs to be specified for every plot)
name:, filename we use to save in image folder
deleteLastPlot: Default: False, If True: removes bottom right (last) plot if we have an odd amount of plots
XLabel: Bottom label for all the plots, used to specify what Sub-Survey the questions belong to

You can easily generate a list of colormaps with the right amount (for every column)

    c_map = ['OrRd', 'BuPu', 'YlGn', 'YlOrBr']
    col_list = [c_map[0] for i in range(len(Lists[0].columns))] + [c_map[1] for i in range(len(Lists[1].columns))]

Here we generate 2 lists of repeating colormaps from the amount of columns in our seperated datasets (seperated by Sub-Survey)

Acknowledgements

This Article by Charlene Chambliss was very helpful in learning my way around this sort of visualization using seaborn

Different Approach

If you are considering to visualize your data in a similar fashion to mine, you should really consider this blogpost as a potential alternative for your visualization.

Further Reading

This project uses both MatplotLib and Seaborn. If you want to get into this further or have some weirder data you want to represent (ie.: like 3d Data) you should read more about matplotlib, like in this article

About

Visualizing a Google Forms Survey via Python, Seaborn and Matplotlib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages