Part 1 - Plotting Using Seaborn - Violin, Box and Line Plot

  21 Aug 2019
   python, visualisation

Introduction and Data preparation

Please follow the folloing links regarding data preparation and previous posts to follow along -


Violin Plot showing distribution of score for each track by complexity

plot1 = sns.catplot(y="Track",
                 x="Score",
                 data=test_scores, 
                 jitter=True, 
                 height=9, 
                 aspect=0.5,
                 kind = "violin", 
                 col = "Complexity",
                 cut = 0,
                 col_order = ["Easy","Medium","Difficult"],
                 palette = sns.color_palette(["#a05195","#d45087","#f95d6a"])) \
                .set_ylabels(fontsize=25) \
                .set_xlabels(fontsize = 25, label = "Score") \
                .set_xticklabels(fontsize=20) \
                .set_yticklabels(fontsize=20) \
                .set_titles(size = 20) 

plot1.fig.subplots_adjust(top=0.8)
plot1.fig.suptitle('Violin Plot showing distribution of score for each track by complexity',size = 30)
#plot1.savefig("Violin Plot -1.png",dpi=100,bbox_inches='tight')

  Part 0 - Plotting Using Seaborn - Data Preparation

  20 Aug 2019
   python, visualisation

Import Preliminaries and datasets

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.pylab as plb
import warnings
warnings.filterwarnings('ignore')

test_scores = pd.read_csv("Data/Test scores.csv", parse_dates=['Test taken date'])
test_master = pd.read_csv("Data/Test master.csv")
test_participant = pd.read_csv("Data/Audience summary.csv")

We have three datasets, namely -

Test Scores Dataset

This contains scores of each particpant in the test they appeared.

test_scores.head()
Participant identifierTest NameTest taken dateTrackDesignationScore
037MCTMIf conditional2018-11-23EngineeringLead18
137MCTMDeterminers and Quantifiers2018-11-23EngineeringLead28
237MCTMModals2018-11-23EngineeringLead22
337MCTMTenses2018-11-13EngineeringLead12
437MCTMPronouns2018-11-13EngineeringLead15

  Nearest Neighbors using L2 and L1 Distance

  20 Jul 2019
   python, machine learning