Skip to content
Introduction to Data Visualization with Seaborn
Introduction to Data Visualization with Seaborn
Run the hidden code cell below to import the data used in this course.
# Importing the course packages
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# Importing the course datasets
country_data = pd.read_csv('datasets/countries-of-the-world.csv', decimal=",")
mpg = pd.read_csv('datasets/mpg.csv')
student_data = pd.read_csv('datasets/student-alcohol-consumption.csv', index_col=0)
survey = pd.read_csv('datasets/young-people-survey-responses.csv', index_col=0)Take Notes
Add notes about the concepts you've learned and code cells with code you want to keep.
Add your notes here
# Add your code snippets hereExplore Datasets
Use the DataFrames imported in the first cell to explore the data and practice your skills!
- From
country_data, create a scatter plot to look at the relationship between GDP and Literacy. Use color to segment the data points by region. - Use
mpgto create a line plot withmodel_yearon the x-axis andweighton the y-axis. Create differentiating lines for each country of origin (origin). - Create a box plot from
student_datato explore the relationship between the number of failures (failures) and the average final grade (G3). - Create a bar plot from
surveyto compare howLonelinessdiffers across values forInternet usage. Format it to have two subplots for gender. - Make sure to add titles and labels to your plots and adjust their format for readability!
DataFrameas
df
variable
Current Type: Bar
Current X-axis: None
Current Y-axis: None
Current Color: None