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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Eitan Lees
March 03, 2020
Programming
970
9
Share
Visualization Grammar
A brief tour of the Vega/Vega-Lite visualization grammar used in Altair
Eitan Lees
March 03, 2020
More Decks by Eitan Lees
See All by Eitan Lees
Visualization
eitanlees
151
17k
Matplotlib
eitanlees
8
1.1k
Altair Tutorial
eitanlees
4
1.1k
Scientific Visualization
eitanlees
6
820
Other Decks in Programming
See All in Programming
20260514_its_the_context_window_stupid.pdf
heita
0
990
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
390
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.7k
ハーネスエンジニアリングとは?
kinopeee
13
7k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.4k
Firefoxにコントリビューションして得られた学び
ken7253
2
160
AI Agent と正しく分析するための環境作り
yoshyum
2
480
空間オーディオの活用
objectiveaudio
0
150
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
160
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How STYLIGHT went responsive
nonsquared
100
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
Six Lessons from altMBA
skipperchong
29
4.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Google's AI Overviews - The New Search
badams
0
1k
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