VISUALIZATION AND
DATA TOOLS
By: SEK SOCHEAT
Lecturer Artificial Intelligence
2023 – 2024
Mobile: 017 879 967 MSIT – AEU
Email: [email protected]
TABLE OF CONTENTS
Visualization and Data Tools
1. Introduction to Data Visualization
2. Overview of Visualization Tools
3. Practical Demonstration: Creating Visualizations
4. Best Practices in Data Visualization
5. Exercise and Solution: Data Visualization with Plotly
2
1. INTRODUCTION TO DATA VISUALIZATION
1. INTRODUCTION TO DATA VISUALIZATION
Introduction
What is Data Visualization?
• Definition and Purpose:
Explanation of how data visualization is the graphical representation of
information and data.
Discuss the purpose of visualizations in simplifying complex data sets to make
them easier to understand.
• Importance of Data Visualization:
Highlight the role of visualizations in data analysis, making data-driven
decisions, and communicating insights effectively.
4
1. INTRODUCTION TO DATA VISUALIZATION
Introduction
Key Concepts:
• Types of Data:
Quantitative Data: Numeric data representing quantities (e.g., sales numbers,
temperatures).
Qualitative Data: Categorical data representing characteristics or attributes (e.g.,
names, labels).
• Types of Visualizations:
Charts and Graphs: Bar charts, line graphs, pie charts, scatter plots, etc.
Maps: Geographical visualizations like heat maps and choropleth maps.
Infographics: Combination of visual elements to present data in an engaging manner.
5
2. OVERVIEW OF VISUALIZATION TOOLS
2. OVERVIEW OF VISUALIZATION TOOLS
Popular Visualization Tools
• Tableau: • Power BI:
• Features and Benefits: • Features and Benefits:
User-friendly drag-and-drop interface. Seamless integration with Microsoft products.
Integration with various data sources. Real-time data access and updates.
Strong community support and extensive Rich visualization options and customization.
resources.
• Examples of Visualizations: • Examples of Visualizations:
Showcase a dashboard with multiple charts. Business intelligence dashboard with key
Interactive filters and visual elements. performance indicators (KPIs).
7
2. OVERVIEW OF VISUALIZATION TOOLS
Popular Visualization Tools
• Matplotlib and Seaborn (Python libraries): • D3.js (JavaScript library):
• Features and Benefits: • Features and Benefits:
Highly customizable and versatile. Allows creating complex, interactive
Suitable for creating static, animated, and visualizations for the web.
interactive visualizations. Extensive control over the final appearance
• Examples of Visualizations: and behavior.
Matplotlib: Basic line plot with labels and • Examples of Visualizations:
grid. Interactive scatter plot with zoom and pan
Seaborn: Advanced heatmap with functionality.
annotations.
8
2. OVERVIEW OF VISUALIZATION TOOLS
Popular Visualization Tools
• Google Data Studio: • Plotly:
• Features and Benefits: • Features and Benefits:
Free tool with integration to Google Interactive visualizations that are easy to share and
embed.
services.
Supports a wide range of chart types, including 3D
Easy sharing and collaboration on reports. graphs.
Integration with Python, R, MATLAB, and JavaScript.
• Examples of Visualizations: • Examples of Visualizations:
Scatter Plots: Interactive scatter plots with hover info
Customizable reports and dashboards using and zoom.
Google Analytics data. 3D Surface Plots: Visualize three-dimensional data in an
interactive format.
9
3. PRACTICAL DEMONSTRATION: CREATING
VISUALIZATIONS
3. PRACTICAL DEMONSTRATION: CREATING VISUALIZATIONS
Choosing the Right Tool for the Job and Hands-On Example with Tableau:
• Factors to Consider: • Hands-On Example with Tableau:
• Loading a Dataset:
• Data Size:
Step-by-step guide to importing a sample CSV
Handle large datasets effectively (e.g., Power file into Tableau.
BI). • Creating a Simple Bar Chart:
Drag and drop fields to create a bar chart.
• Complexity: Customizing chart colors and labels.
Manage complex visualizations (e.g., D3.js). • Adding Filters and Interactive Elements:
Adding interactive filters for user-driven
• Interactivity: analysis.
Need for interactive elements (e.g., Tableau). Creating a dashboard combining multiple
visualizations.
11
3. PRACTICAL DEMONSTRATION: CREATING VISUALIZATIONS
Hands-On Example with Matplotlib (Python)
• Loading a Dataset:
• Customizing the Plot:
Loading a Dataset:
Adding labels, titles, and customizing the
import pandas as pd
appearance.
data = pd.read_csv('sample_data.csv')
• Example:
• Creating a Line Plot:
Changing line color and style.
Basic line plot code example.
import matplotlib.pyplot as plt Adding grid lines.
plt.plot(data['Date'], data['Value'])
plt.xlabel('Date')
plt.ylabel('Value')
plt.title('Sample Line Plot')
plt.show()
12
4. BEST PRACTICES IN DATA VISUALIZATION
4. BEST PRACTICES IN DATA VISUALIZATION
Design Principles
• Clarity and Simplicity:
• Common Pitfalls:
Avoid clutter and focus on the key message.
Use clear and concise labels and legends. • Overloading with Information:
Avoid excessive details that obscure the main
• Avoiding Misleading Visualizations:
insights.
Ensure accurate representation of data.
Avoid distortion through inappropriate • Poor Color Choices:
scaling. Use colors to enhance readability and
• Choosing the Right Chart Type: accessibility.
Match the chart type to the data type and • Misleading Scales or Axes:
analysis goal.
Examples: Use appropriate scales to accurately represent
Use bar charts for categorical data comparisons. data.
Use line charts for time series data.
14
5. EXERCISE AND SOLUTION: DATA
VISUALIZATION WITH PLOTLY
5. EXERCISE AND SOLUTION
Data Visualization with Plotly
Objective:
You have been given a dataset of social media posts Tasks:
from various platforms. The dataset includes the Your task is to create the following visualizations
following columns:
using Plotly:
• platform: The social media platform (e.g., Twitter,
Facebook, Instagram).
• Bar Chart: Visualize the total number of likes,
• date: The date of the post. shares, and comments for each platform.
• likes: The number of likes the post received. • Line Chart: Show the trend of likes over time for
each platform.
• shares: The number of shares the post received.
• Scatter Plot: Display the relationship between
• comments: The number of comments the post likes and shares for each platform.
received.
16
5. EXERCISE AND SOLUTION
Data Visualization with Plotly
Explaination:
• Loading the Data: The data is loaded into a
Pandas DataFrame. The date column is
converted to a datetime format for accurate
plotting.
• Bar Chart: Only numerical columns (likes,
shares, comments) are selected for aggregation.
The data is grouped by the platform and
summed for these numerical columns. A bar
chart is created to visualize the total
interactions for each platform.
• Line Chart: A line chart is created to show the
trend of likes over time for each platform.
• Scatter Plot: A scatter plot is created to
display the relationship between likes and
shares for each platform.
17
Thank You!
If you have any questions, please reach me!