圖形文法

ggplot2 資料視覺化入門

Rick Scavetta

Founder, Scavetta Academy

The quick brown fox jumps over the lazy dog

ggplot2 資料視覺化入門

The quick brown fox jumps over the lazy dog

ggplot2 資料視覺化入門

圖形文法

  • 繪圖架構
  • Leland Wilkinson,《Grammar of Graphics》,1999 年
  • 2 項原則
    • 圖形=由不同語法元素分層組成
    • 透過美學對映產生有意義的圖

ggplot2 資料視覺化入門

三個核心語法元素

Element Description
Data 要繪製的資料集。
Aesthetics 我們將資料「對映」到的尺度。
Geometries 用於呈現資料的視覺元素。
ggplot2 資料視覺化入門

課程 1:核心能力

Element Description
Data 要繪製的資料集。
Aesthetics 我們將資料「對映」到的尺度。
Geometries 用於呈現資料的視覺元素。
Themes 所有非資料墨跡。
ggplot2 資料視覺化入門

七個語法元素

Element Description
Data 要繪製的資料集。
Aesthetics 我們將資料「對映」到的尺度。
Geometries 用於呈現資料的視覺元素。
Themes 所有非資料墨跡。
Statistics 協助理解的資料表徵。
Coordinates 資料要繪製所在的座標空間。
Facets 小多圖分面繪製。
ggplot2 資料視覺化入門

各元素的術語

ggplot2 資料視覺化入門

課程 2:EDA 工具

  • 其餘 3 層
  • 資料視覺化最佳實務
ggplot2 資料視覺化入門

一起來練習吧!

ggplot2 資料視覺化入門

Preparing Video For Download...