Example of a Class

Hands-On Python Session Analyzing Taylor Swift’s Discography

Duration: 1 hour

Level: Undergraduate in Data Science, first year

Course Fundamentals of Data Analysis

Session Overview

In this hands-on session, the instructor along with the students will create a Python notebook to analyze a dataset of Taylor Swift’s discography in an hands-on coding session. This will help students gain practical experience in data analysis and visualization, working in parallel with other peers and the instructor.

Learning Outcomes

By the end of this session, students should be able to:

  1. Load and preprocess a dataset using Python.
  2. Perform exploratory data analysis (EDA) on the dataset.
  3. Visualize data using libraries such as Matplotlib and Seaborn.
  4. Derive insights from the dataset and discuss their implications.

Pre-Session Preparation

Materials uploaded on Moodle:

  1. Python installation guide.
  2. Jupyter Notebook setup instructions.
  3. Link to the dataset: Taylor Swift’s Discography Dataset.
  4. Pre-reading material on basic Python and data analysis concepts.
  5. Tutorial video on loading and preprocessing data in Python.

Task: Students should come prepared with Python and Jupyter Notebook installed on their laptops.


Session Structure

1. Introduction (10 minutes)

  • Objective: Set the stage for the session.
  • Activities:
    • Brief overview of the session objectives.
    • Introduction to the dataset: Taylor Swift’s discography.
    • Recap of key Python concepts relevant to the session.

2. Dataset Loading and Preprocessing (10 minutes)

  • Objective: Teach students how to load and clean the dataset.
  • Activities:
    • Demonstration: Show how to load the dataset into a Jupyter Notebook using Pandas.
    • Discussion: Explain common data cleaning techniques such as handling missing values and data transformation.
    • Activity: Students load and clean the dataset on their laptops, identifying and handling missing values.

3. Exploratory Data Analysis (EDA) (15 minutes)

  • Objective: Enable students to understand and summarize the main characteristics of the dataset.
  • Activities:
    • Demonstration: Show basic EDA techniques including summary statistics, data distribution, and correlation analysis.
    • Activity: Students perform EDA on the dataset, generating summary statistics, plotting histograms, and calculating correlations. They identify any outliers or interesting patterns in the data.

4. Data Visualization (15 minutes)

  • Objective: Teach students to create meaningful visualizations.
  • Activities:
    • Demonstration: Introduce data visualization libraries (Matplotlib and Seaborn), showing how to create various types of plots such as histograms, bar charts, scatter plots, and line graphs.
    • Activity: Students create visualizations based on their EDA findings, producing at least three different types of visualizations.

5. Discussion and Interpretation (10 minutes)

  • Objective: Encourage students to interpret and discuss their findings.
  • Activities:
    • Group Discussion: Students share their visualizations and insights.
    • Q&A Session: Address any questions and provide additional explanations.
    • Reflection: Discuss the implications of the data and how it can inform our understanding of Taylor Swift’s music career.

6. Closing (10 minutes)

  • Objective: Summarize the session and outline next steps.
  • Activities:
    • Recap of the key points covered in the session.
    • Provide additional resources for further learning.
    • Announce the follow-up assignment.
    • Open floor for any final questions or feedback.

Resources Needed

  • Laptops with Python and Jupyter Notebook installed.
  • Dataset file and additional reading materials.
  • Internet access for any real-time queries and troubleshooting.

Follow-Up Assignment

Task: Write a brief report (1-2 pages) summarizing the insights derived from the dataset analysis, including the visualizations created during the session. Reflect on the process and discuss any challenges faced and how they were overcome.

Assessment Criteria:

  • Accuracy and completeness of the dataset analysis.
  • Quality and clarity of the visualizations.
  • Depth of insights and reflections in the report.

Artifact

During the class, along with students, we have made a notebook to analyse Taylor Swift’s discography. You can view the complete Jupyter notebook created in this session by clicking here.