Data Visualization Introduction

Da-Wei Chiang

大綱

  • Example
  • 什麼是資料視覺化?
  • 為什麼需要資料視覺化?
  • 這一堂課的資料視覺化
  • 相關工具與套件

Example

Example 1

參考網址:行政院主計處

Example 2

參考網址:中央氣象局

Example 3

參考網址:GooSooner

什麼是資料視覺化?

  • 廣義定義:
    • 各領域專業技能
    • 圖形學
    • 統計分析 ...等

為什麼需要資料視覺化?

一個簡單的範例

  • 兩個班級、每個班級有10個學生,其程式會考分數如下
    • A班:100, 58, 57, 100, 57, 59, 98, 55, 58, 58
    • B班:63, 66, 70, 72, 73, 68, 73, 75, 80, 60
  • 問:
    • 哪個班級程式能力比較好?

一個可能的解

A班:100, 58, 57, 100, 57, 59, 98, 55, 58, 58
B班:63, 66, 70, 72, 73, 68, 73, 75, 80, 60


ANS:兩班的平均分數皆為70分,故兩班程式能力一樣
In [23]:
## 另一個可能的解

import matplotlib.pyplot as plt

A = [100, 58, 57, 100, 57, 59, 98, 55, 58, 58]
B = [63, 66, 70, 72, 73, 68, 73, 75, 80, 60]
score_range = range(1, 11)
plt.figure()

plt.scatter(score_range, A, c="red", label="Class A")
plt.scatter(score_range, B, c="blue", label="Class B")
plt.legend()
plt.xlabel("Student Number")
plt.ylabel("Score")
plt.title("Program Exam")
plt.show() 

為什麼需要資料視覺化?

  • 為了掌握資料概況
  • 從視覺化中找出從數據看不出來的淺規則

這一堂課的資料視覺化

  • 傳統資料分析圖形
  • 圖形的美化
  • 圖形的互動

相關工具與套件

  • 商用軟體
    • Tableau
    • Power BI
  • 前端網頁呈現

    • D3
    • High Chart
    • E Chart
  • Python 語言

    • Matplotlib
    • Seaborn
    • Bokeh