W04- Visualization and Data Tools
W04- Visualization and Data Tools
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
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
7
2. OVERVIEW OF VISUALIZATION TOOLS
8
2. OVERVIEW OF VISUALIZATION TOOLS
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.
9
3. PRACTICAL DEMONSTRATION: CREATING
VISUALIZATIONS
3. PRACTICAL DEMONSTRATION: CREATING VISUALIZATIONS
Choosing the Right Tool for the Job and Hands-On Example with Tableau:
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
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!