Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Visualization Grammar
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Eitan Lees
March 03, 2020
Programming
9
940
Visualization Grammar
A brief tour of the Vega/Vega-Lite visualization grammar used in Altair
Eitan Lees
March 03, 2020
Tweet
Share
More Decks by Eitan Lees
See All by Eitan Lees
Visualization
eitanlees
150
17k
Matplotlib
eitanlees
8
1.1k
Altair Tutorial
eitanlees
4
1k
Scientific Visualization
eitanlees
6
800
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
660
2026年 エンジニアリング自己学習法
yumechi
0
140
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
AI巻き込み型コードレビューのススメ
nealle
2
1.2k
今から始めるClaude Code超入門
448jp
8
9k
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
120
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
610
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
Context Engineering - Making Every Token Count
addyosmani
9
670
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
GraphQLとの向き合い方2022年版
quramy
50
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
200
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Transcript
Data Mark Encoding Transform Scale Guide Visualization Grammar
Data Mark Encoding Transform Scale Guide A B C &
Variables Observations Tabular Data A B C
Data Mark Encoding Transform Scale Guide A,B,C,D,E 4,6,4,4,3 4,4,8,4,3 7,5,5,0,1
5,9,3,0,5 0,1,2,4,2 [ { "A":4, "B":6, "C":4, "D":4, "E":3 }, { "A":4, "B":4, "C":8, "D":4, "E":3 }, { "A":7, "B":5, "C":5, "D":0, "E":1 }, { "A":5, "B":9, "C":3, "D":0, "E":5 }, { "A":0, "B":1, "C":2, "D":4, "E":2 } ] https://eitanlees.com/ABC.csv
Data Mark Encoding Transform Scale Guide B A A A
C C C B B and many more ... Text Circle Bar Line
Data Mark Encoding Transform Scale Guide X Position Y Position
Size Color ⠇ Channel A B C D ⠇ Variable
Data Mark Encoding Transform Scale Guide Calculate Fold Filter Aggregate
and many more ...
Data Mark Encoding Transform Scale Guide f(domain) → range
Data Mark Encoding Transform Scale Guide A B C Legend
Data Mark Encoding Transform Scale Guide Let’s make a chart
Data Mark Encoding Transform Scale Guide import altair as alt
from vega_datasets import data iris = data.iris() sepalLength sepalWidth PetalLength PetalWidth species 5.1 3.5 1.4 0.2 setosa 4.9 3.0 1.4 0.2 setosa 4.7 3.2 1.3 0.2 setosa 4.6 3.1 1.5 0.2 setosa ⠇
Data Mark Encoding Transform Scale Guide import altair as alt
from vega_datasets import data iris = data.iris() alt.Chart(iris).mark_circle()
Data Mark Encoding Transform Scale Guide import altair as alt
from vega_datasets import data iris = data.iris() alt.Chart(iris).mark_circle() Without an encoding our chart is not very interesting
Data Mark Encoding Transform Scale Guide import altair as alt
from vega_datasets import data iris = data.iris() alt.Chart(iris).mark_circle().encode( alt.X('petalLength'), alt.Y('petalWidth') )
Data Mark Encoding Transform import altair as alt from vega_datasets
import data iris = data.iris() alt.Chart(iris).mark_circle().encode( alt.X('petalLength'), alt.Y('petalWidth'), alt.Color('species') ) Scale Guide
Data Mark Encoding Transform import altair as alt from vega_datasets
import data iris = data.iris() alt.Chart(iris).mark_circle().encode( alt.X('petalLength'), alt.Y('petalWidth'), alt.Color('species') ) Scale Guide Note that the guides and scales are automatically generated for us
Data Mark Encoding Transform import altair as alt from vega_datasets
import data iris = data.iris() alt.Chart(iris).mark_circle().encode( alt.X('petalLength'), alt.Y('petalWidth'), alt.Color('species') ).transform_filter( alt.datum.sepalWidth < 3 ) Scale Guide