This case study focuses on a dataset of online sales transactions, ideal for demonstrating a variety of charts and data preparation steps.
Dataset: A CSV file containing columns like OrderID, ProductID, ProductName, Category, Price, Quantity, Date, and CustomerCountry.
Concepts Covered:
Loading and Cleansing: Handling missing values in Price or Quantity, and ensuring Date is in the correct format.
Bar Charts: Visualize Total Sales or Order Count by Category.
Line Chart: Plot Daily Sales over a month or a year to identify trends and seasonality.
Scatter Plot: Examine the relationship between Price and Quantity to see if more expensive items are sold less frequently.
Descriptive Statistics: Calculate the average Price per Category or the total Quantity of the top-selling products.
This case study uses a popular, well-structured dataset to explore sales and profit across different regions, a great way to introduce multivariate analysis with visualizations.
Dataset: A table with columns such as OrderDate, ShipDate, ShipMode, CustomerID, Segment, City, State, Region, Category, Sub-Category, Sales, Quantity, and Profit.
Concepts Covered:
Data Transformation: Grouping data by Region or Category to apply descriptive statistics.
Choosing the Best Chart:
Use a Bar Chart to compare total Sales by Region.
Use a Histogram to show the distribution of Profit across all orders.
Use a Scatter Plot to visualize the relationship between Sales and Profit.
Data Analysis: Identify which regions are the most and least profitable and which product sub-categories have the highest sales but low profits.
This case study offers a rich mix of numerical and categorical data, perfect for creating diverse visualizations and exploring relationships between variables.
Dataset: Contains columns such as Title, Genre, Director, Budget, GrossRevenue, Rating (e.g., IMDB score), and ReleaseYear.
Concepts Covered:
Technical Requirements: Setting up the environment to handle textual data and numerical values.
Histogram: Show the distribution of IMDB Scores or Budget values.
Bar Chart: Visualize the Average Gross Revenue for each Genre.
Scatter Plot: Plot Budget against GrossRevenue to see if a higher budget correlates with higher earnings.
Data Cleansing: Handling missing values in Budget or GrossRevenue and potentially grouping less frequent Genres into an "Other" category.
This case study is relatable for students and provides a clear context for a range of visualizations.
Dataset: Columns might include StudentID, Gender, ParentalEducation, StudyHours, Absences, MathScore, ReadingScore, and WritingScore.
Concepts Covered:
Data Analysis: Explore how StudyHours relate to MathScore or how ParentalEducation levels affect ReadingScore.
Bar Charts: Compare the average MathScore between different ParentalEducation levels.
Scatter Plot: Visualize the relationship between ReadingScore and WritingScore to see if they are correlated.
Polar Chart: An interesting way to visualize Average Scores for Math, Reading, and Writing for a specific student or group.
This case study is ideal for introducing the concepts of time-series data and the power of line charts to show trends and patterns over time.
Dataset: A simple dataset with Date and EnergyConsumption for a city or country.
Concepts Covered:
Loading and Data Transformation: Ensuring the Date column is correctly parsed as a datetime object.
Line Chart: This is the primary visualization here, showing EnergyConsumption over time to spot daily, weekly, or seasonal patterns.
Data Refactoring: Resampling the data from daily to weekly or monthly consumption to analyze different trends.
Data Cleansing: Handling potential missing days in the dataset.
Descriptive Statistics: Calculate the average daily consumption, or the standard deviation of consumption to see how much it fluctuates.
This case study involves analyzing a dataset of social media posts to understand public sentiment about a product or topic. It moves beyond simple numerical and categorical data to text-based data, a common challenge in modern data science.
Dataset: A collection of tweets or social media comments with columns like UserID, Timestamp, TextContent, and a pre-labeled Sentiment (Positive, Negative, Neutral).
Concepts Covered:
Data Transformation: Tokenizing and cleaning the TextContent to prepare it for analysis. This is a complex step involving natural language processing (NLP) techniques.
Bar Charts: Visualize the distribution of Sentiment (e.g., number of positive vs. negative posts).
Line Chart: Plot the sentiment score or a moving average of sentiment over time to identify trends or reactions to specific events.
Advanced Visualization: Use a word cloud to visualize the most common words in positive vs. negative posts, providing a visual summary of the key themes.
Data Analysis: Identify if a particular event led to a significant shift in public sentiment.
This case study involves a highly technical and complex dataset, ideal for demonstrating how EDA can be used in scientific fields. It requires students to think critically about data relationships and scale.
Dataset: A simulated or anonymized dataset with columns for PatientID, Age, GeneticMarker (e.g., a sequence string), BloodPressure, and DiseaseStatus (e.g., presence or absence of a disease).
Concepts Covered:
Data Cleansing: Handling genetic sequence data, which may contain errors or be in different formats.
Histogram: Plot the distribution of Age and BloodPressure for patients to identify any patterns.
Scatter Plot: A complex visualization could involve a dimensionality reduction technique (like Principal Component Analysis) to plot a 2D representation of the high-dimensional GeneticMarker data, with points colored by DiseaseStatus to see if there are visual clusters.
Descriptive Statistics: Calculate the mean BloodPressure for the DiseaseStatus groups.
Data Analysis: Explore potential visual correlations between specific genetic markers and the DiseaseStatus of patients.
This case study focuses on time-series data from financial markets, which is inherently complex due to its noisy and volatile nature.
Dataset: Daily stock prices for a specific company or index, with columns like Date, Open, High, Low, Close, and Volume.
Concepts Covered:
Line Chart: Create a candlestick chart (a specialized line chart) that displays Open, High, Low, and Close prices for each day. This is a crucial visualization for financial data analysis.
Histogram:Visualize the distribution of the `Daily Returns` (percentage change in price) to understand the market's volatility.
Data Refactoring: Calculate a moving average of the `Close` price to smooth out short-term fluctuations and identify long-term trends.
Data Analysis: Explore the relationship between `Volume` and price movements to see if high-volume days correspond with significant price changes.
This case study integrates data from multiple sources, requiring students to merge datasets and analyze them to understand the relationship between different factors.
Dataset 1: Air quality sensor data with Timestamp, LocationID, and various pollutant levels (e.g., PM2.5, Ozone).
Dataset 2: Traffic data with Timestamp, LocationID, and TrafficVolume.
Concepts Covered:
Merging Datasets: Join the two datasets on Timestamp and LocationID to create a unified view. This is a core transformation skill.
Line Chart: Create a dual-axis line chart to plot TrafficVolume and a key pollutant level (PM2.5) over the same Timestamp, allowing for a direct visual comparison.
Polar Chart: An interesting application is to use a polar chart to visualize how air quality or traffic volume changes throughout a 24-hour cycle.
Data Analysis: Analyze if peaks in TrafficVolume visually correspond to peaks in pollutant levels.
This case study is a classic machine learning problem that starts with a thorough EDA. The complexity lies in exploring the relationships between many variables to find predictors of a specific outcome.
Dataset: A dataset of customer information with columns like CustomerID, Age, Gender, Tenure (how long they've been a customer), MonthlyCharges, ContractType, and Churn (a binary variable indicating if they left).
Concepts Covered:
Data Transformation: Discretize continuous variables like Tenure and MonthlyCharges into bins to better visualize their relationship with Churn.
Bar Charts: Compare the churn rate across different ContractTypes or Genders.
Violin Plot: This is a more advanced alternative to a box plot, showing the full distribution of MonthlyCharges for customers who did and did not churn. This provides a more detailed view of the data.
Scatter Plot: Create a scatter plot of Age versus MonthlyCharges, with the points colored by Churn, to see if there are visual clusters of churned customers.
Data Analysis: Identify which variables appear to be the strongest predictors of Churn based on the visualizations and descriptive statistics.