Encodable: Configurable Grammar for Visualization Components

Krist Wongsuphasawat
Krist WongsuphasawatData Visualization
Encodable <.>
Krist Wongsuphasawat / @kristw
Configurable Grammar for Visualization Components
Presented at IEEE VIS 2020.
See additional information at github.com/kristw/encodable
Data Experience Team
Airbnb, Inc.
Solution
Inspiration
Results
Conclusions
Motivation
Many programmatic ways
to create a visualization
Visualization Libraries
Graphic Libraries
Low-level Building Blocks
Visualization Grammars
High-level Building Blocks
Chart Templates
Level of
abstraction
Visualization Libraries
Graphic Libraries
Low-level Building Blocks
Visualization Grammars
High-level Building Blocks
Chart Templates
Level of
abstraction
Graphic Libraries Manipulate graphics
processing, three.js, …
Visualization Libraries
Graphic Libraries
Low-level Building Blocks
Visualization Grammars
High-level Building Blocks
Chart Templates
Manipulate graphics
processing, three.js, …
Level of
abstraction
Chart Templates
Google Charts, nivo, FusionCharts, …
A catalog of charts by “chart types”
Encodable: Configurable Grammar for Visualization Components
nivo
Encodable: Configurable Grammar for Visualization Components
Problem
Visualization components have different APIs.
Icons by Sean Au
Problem
Visualization components have different APIs.
Component users
Keep learning new APIs
Icons by Sean Au
Problem
Visualization components have different APIs.
Component users
Keep learning new APIs
Example: Set “x” for scatterplot
Icons by Sean Au
Problem
Visualization components have different APIs.
A) Requires field x in data
Component users
Keep learning new APIs
Example: Set “x” for scatterplot
Icons by Sean Au
B) Without field x in data
Problem
Visualization components have different APIs.
Component users
Keep learning new APIs
Example: Set “x” for scatterplot
Icons by Sean Au
B) Without field x in data
Problem
Visualization components have different APIs.
Component users
Keep learning new APIs
Example: Set “x” for scatterplot
Icons by Sean Au
Problem
Component users
Keep learning new APIs
High switching cost
Visualization components have different APIs.
Icons by Sean Au
Problem
Component users
Keep learning new APIs
High switching cost
Inconsistent features
Visualization components have different APIs.
Logarithmic scale
Number formatting
Make axis include zero
etc.
Icons by Sean Au
Problem
Visualization components have different APIs.
Component users
Keep learning new APIs
High switching cost
Inconsistent features
Icons by Sean Au
Problem
Visualization components have different APIs.
Could the components
be more similar?
Component users
Keep learning new APIs
High switching cost
Inconsistent features
Icons by Sean Au
Problem
Visualization components have different APIs.
Could the components
be more similar?
Component authors
No API standard
No help
Component users
Keep learning new APIs
High switching cost
Inconsistent features
Icons by Sean Au
Problem
Visualization components have different APIs.
Could the components
be more similar?
Could building consistent
components be easier?
Component authors
No API standard
No help
Component users
Keep learning new APIs
High switching cost
Inconsistent features
Icons by Sean Au
Solution
Inspiration
Results
Conclusions
Motivation
Visualization Libraries
Graphic Libraries
Visualization Grammars
Chart Templates
Level of
abstraction
Google Charts, nivo, FusionCharts, …
processing, three.js, …
Manipulate graphics
A catalog of charts by “chart types”
Low-level Building Blocks
High-level Building Blocks
Visualization Libraries
Graphic Libraries
Visualization Grammars
Chart Templates
One language to describe all charts
A catalog of charts by “chart types”
Low-level Building Blocks
High-level Building Blocks
Vega-Lite, …
Google Charts, nivo, FusionCharts, …
Level of
abstraction
Manipulate graphics
processing, three.js, …
Vega-Lite
Creating a bar chart
[Satyanarayan et al. 2017]
Vega-Lite
Creating a bar chart
[Satyanarayan et al. 2017]
Vega-Lite
Creating a bar chart
Channel Name
Channel Definition
[Satyanarayan et al. 2017]
Vega-Lite
Creating a bar chart
[Satyanarayan et al. 2017]
Vega-Lite
Creating a bar chart
Channel Name
Channel Definition
[Satyanarayan et al. 2017]
Could any vis. component
define encoding like this?
Solution
Inspiration
Results
Conclusions
Motivation
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
Analyze
vega-lite
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
Analyze
Adopt this part
vega-lite
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
Analyze
Adopt this part
vega-lite
Let the component authors
handle rendering.
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
Decouple & Evolve
vega-lite
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
Decouple & Evolve
vega-lite encodable
Parser
+
Configurable grammar
Adapt
Assumption
Data in tabular format
Principle #1
Vis. component is described by its encoding channels.
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Value (Channel Definition)
Value (Channel Definition)
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Value (Channel Definition)
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Value (Channel Definition)
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Value (Channel Definition)
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
What are the valid
channel names and definitions?
Value (Channel Definition)
Key (Channel Name)
Principle #1
Vis. component is described by its encoding channels.
Principle #2
Author defines specific channels.
Principle #2
Author defines specific channels.
Channel Name
Principle #2
Author defines specific channels.
Channel Name Channel type & output
Principle #2
Author defines specific channels.
Channel Name Channel type & output
Architecture
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
vega-lite
Configurable grammar
encodable
Parser
+
Adapt
my-component
Architecture
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
vega-lite
Configurable grammar
encodable
Parser
+
Adapt
my-component
Architecture
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
vega-lite
Configurable grammar
encodable
Parser
+ Encodable
Adapt
my-component
Architecture
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
vega-lite
Configurable grammar
encodable
Parser
+ Encodable
Adapt
Minimal Configuration
User’s specification
+
my-component
Architecture
Grammar
Parsing & rendering logic
User’s specification
Output visualization
+
vega-lite
Configurable grammar
encodable
Parser
+ Encodable
Adapt
Minimal Configuration
User’s specification
+
Rendering logic
Output visualization
+
Build a component
with .
Encodable
Encodable: Configurable Grammar for Visualization Components
Visualization Component (WordCloud)
Visualization Component (WordCloud)
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
Visualization Component (WordCloud)
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
Visualization Component (WordCloud)
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
Visualization Component (WordCloud)
User’s Code
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
<WordCloud
encoding={{
color: { field: ‘food’ },
size: {
field: ‘count,
scale: { range: [0,48] }
},
text: { field: ‘food’ },
}}
width={400}
height={400}
data={[
{food:‘Burger’, count:80 },
{food:‘Noodle’, count:10 }
]}
/>
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
Visualization Component (WordCloud)
User’s Code
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
Rendering
function WordCloud({
width, height, data , encoding
}: WordCloudProps) {
const encoder =
encoder.setDomainFromDataset( data );
const channels = encoder.channels;
return (<div style={{ width , height }}>
{ data .map(d => (<span style={{
color: channels.color.encodeDatum(d),
fontSize: channels.size.encodeDatum(d),
}}>
{channels.text.getValueFromDatum(d)}
</span>))}
</div>);
}
<WordCloud
encoding={{
color: { field: ‘food’ },
size: {
field: ‘count,
scale: { range: [0,48] }
},
text: { field: ‘food’ },
}}
width={400}
height={400}
data={[
{food:‘Burger’, count:80 },
{food:‘Noodle’, count:10 }
]}
/>
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
Visualization Component (WordCloud)
User’s Code
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
Rendering
function WordCloud({
width, height, data , encoding
}: WordCloudProps) {
const encoder =
encoder.setDomainFromDataset( data );
const channels = encoder.channels;
return (<div style={{ width , height }}>
{ data .map(d => (<span style={{
color: channels.color.encodeDatum(d),
fontSize: channels.size.encodeDatum(d),
}}>
{channels.text.getValueFromDatum(d)}
</span>))}
</div>);
}
<WordCloud
encoding={{
color: { field: ‘food’ },
size: {
field: ‘count,
scale: { range: [0,48] }
},
text: { field: ‘food’ },
}}
width={400}
height={400}
data={[
{food:‘Burger’, count:80 },
{food:‘Noodle’, count:10 }
]}
/>
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
createEncoder< WordCloudConfig >( encoding )
Visualization Component (WordCloud)
User’s Code
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
Rendering
function WordCloud({
width, height, data , encoding
}: WordCloudProps) {
const encoder =
encoder.setDomainFromDataset( data );
const channels = encoder.channels;
return (<div style={{ width , height }}>
{ data .map(d => (<span style={{
color: channels.color.encodeDatum(d),
fontSize: channels.size.encodeDatum(d),
}}>
{channels.text.getValueFromDatum(d)}
</span>))}
</div>);
}
<WordCloud
encoding={{
color: { field: ‘food’ },
size: {
field: ‘count,
scale: { range: [0,48] }
},
text: { field: ‘food’ },
}}
width={400}
height={400}
data={[
{food:‘Burger’, count:80 },
{food:‘Noodle’, count:10 }
]}
/>
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
createEncoder< WordCloudConfig >( encoding )
fillChannelDef(encoding.color) createChannelEncoder(…)
fillChannelDef(encoding.size) createChannelEncoder(…)
fillChannelDef(encoding.text) createChannelEncoder(…)
Filler Parser
encoder
Visualization Component (WordCloud)
User’s Code
API
type WordCloudProps = {
encoding:
width: number;
height: number;
data: object[];
}
Rendering
function WordCloud({
width, height, data , encoding
}: WordCloudProps) {
const encoder =
encoder.setDomainFromDataset( data );
const channels = encoder.channels;
return (<div style={{ width , height }}>
{ data .map(d => (<span style={{
color: channels.color.encodeDatum(d),
fontSize: channels.size.encodeDatum(d),
}}>
{channels.text.getValueFromDatum(d)}
</span>))}
</div>);
}
<WordCloud
encoding={{
color: { field: ‘food’ },
size: {
field: ‘count,
scale: { range: [0,48] }
},
text: { field: ‘food’ },
}}
width={400}
height={400}
data={[
{food:‘Burger’, count:80 },
{food:‘Noodle’, count:10 }
]}
/>
Config
WordCloudConfig = {
color: [‘Color’, string];
size: [‘Numeric’, number];
text: [‘Text’, string];
}
DeriveEncoding< WordCloudConfig >
createEncoder< WordCloudConfig >( encoding )
fillChannelDef(encoding.color) createChannelEncoder(…)
fillChannelDef(encoding.size) createChannelEncoder(…)
fillChannelDef(encoding.text) createChannelEncoder(…)
Filler Parser
encoder
Solution
Inspiration
Results
Conclusions
Motivation
Examples
Example
Word Cloud
Example
Scatter Plot
Example
Balloon Plot
Example
Coffee Chart
Beyond examples
Real-world usage
Apache Superset
(incubating)
npm package
encodable
Solution
Inspiration
Results
Conclusions
Motivation
Encodable <.>
Envision a world where vis. components
are more similar and consistent.
Krist Wongsuphasawat (@kristw)
github.com/kristw/encodable
Component authors
Less work to create consistent components.
Component users
Improve productivity and developer experience.
Encodable <.>
Envision a world where vis. components
are more similar and consistent.
Krist Wongsuphasawat (@kristw)
github.com/kristw/encodable
Configurable grammar and parser
Make progress towards that world.
Less overhead to iterate and enhance a component.
Component authors
Less work to create consistent components.
Component users
Improve productivity and developer experience.
Encodable <.>
Envision a world where vis. components
are more similar and consistent.
Krist Wongsuphasawat (@kristw)
github.com/kristw/encodable
Configurable grammar and parser
Make progress towards that world.
Less overhead to iterate and enhance a component.
Future work
More common features, e.g., legend, axes
while keeping Encodable lightweight.
Auto-generate doc and control panels.
Extend to other platforms and languages.
Component authors
Less work to create consistent components.
Component users
Improve productivity and developer experience.
github.com/kristw/encodable
Acknowledgement
Kanit Wongsuphasawat
Dominik Moritz
Chris Williams
Airbnb Data Experience team
Benjawan Chanthaworakit
Encodable <.>
Envision a world where vis. components
are more similar and consistent.
Krist Wongsuphasawat (@kristw)
github.com/kristw/encodable
Configurable grammar and parser
Make progress towards that world.
Conveniently add/remove channels.
Future work
More common features, e.g., legend, axes
while keeping Encodable lightweight.
Auto-generate doc and control panels.
Extend to other platforms and languages.
Component authors
Less work to create consistent components.
Component users
Improve productivity and developer experience.
Thank you
1 of 79

Recommended

Navigating the Wide World of Data Visualization Libraries by
Navigating the Wide World of Data Visualization LibrariesNavigating the Wide World of Data Visualization Libraries
Navigating the Wide World of Data Visualization LibrariesKrist Wongsuphasawat
2K views72 slides
Custom Properties in InduSoft Web Studio by
Custom Properties in InduSoft Web StudioCustom Properties in InduSoft Web Studio
Custom Properties in InduSoft Web StudioAVEVA
2.2K views17 slides
From Backbone to Ember and Back(bone) Again by
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Againjonknapp
746 views55 slides
Whidbey old by
Whidbey old Whidbey old
Whidbey old grenaud
598 views55 slides
Introduction to Shiny for building web apps in R by
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RPaul Richards
10.5K views17 slides
Daniel Egan Msdn Tech Days Oc Day2 by
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan
682 views49 slides

More Related Content

Similar to Encodable: Configurable Grammar for Visualization Components

VB.Net Mod1.pptx by
VB.Net Mod1.pptxVB.Net Mod1.pptx
VB.Net Mod1.pptxEzhil Aparajit
5 views22 slides
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk by
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana MandziukFwdays
148 views90 slides
What's New in Visual Studio 2008 by
What's New in Visual Studio 2008What's New in Visual Studio 2008
What's New in Visual Studio 2008Acend Corporate Learning
390 views122 slides
내꺼내꺼 by
내꺼내꺼내꺼내꺼
내꺼내꺼misty915
631 views20 slides
Java 2D API: Enhanced Graphics and Imaging for the Java Platform by
Java 2D API: Enhanced Graphics and Imaging for the Java PlatformJava 2D API: Enhanced Graphics and Imaging for the Java Platform
Java 2D API: Enhanced Graphics and Imaging for the Java Platformwhite paper
965 views9 slides
Building DSLs with the Spoofax Language Workbench by
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchEelco Visser
1.2K views149 slides

Similar to Encodable: Configurable Grammar for Visualization Components(20)

"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk by Fwdays
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
Fwdays148 views
내꺼내꺼 by misty915
내꺼내꺼내꺼내꺼
내꺼내꺼
misty915631 views
Java 2D API: Enhanced Graphics and Imaging for the Java Platform by white paper
Java 2D API: Enhanced Graphics and Imaging for the Java PlatformJava 2D API: Enhanced Graphics and Imaging for the Java Platform
Java 2D API: Enhanced Graphics and Imaging for the Java Platform
white paper965 views
Building DSLs with the Spoofax Language Workbench by Eelco Visser
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language Workbench
Eelco Visser1.2K views
Modular Web Applications With Netzke by netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
netzke1.1K views
Visual Experience 360 Flex by Juan Sanchez
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
Juan Sanchez1.3K views
GraphQL: Enabling a new generation of API developer tools by Sashko Stubailo
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo1.8K views
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers by Dave Bost
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Dave Bost3.1K views
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by Maarten Balliauw
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Maarten Balliauw326 views
Web-Dev Portfolio by nwbgh
Web-Dev PortfolioWeb-Dev Portfolio
Web-Dev Portfolio
nwbgh430 views
C Sharp Certification by Vskills
C Sharp CertificationC Sharp Certification
C Sharp Certification
Vskills404 views
David Bilík: Anko – modern way to build your layouts? by mdevtalk
David Bilík: Anko – modern way to build your layouts?David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?
mdevtalk1.9K views
Android training in Nagpur by letsleadsand
Android training in Nagpur Android training in Nagpur
Android training in Nagpur
letsleadsand25 views

More from Krist Wongsuphasawat

What I tell myself before visualizing by
What I tell myself before visualizingWhat I tell myself before visualizing
What I tell myself before visualizingKrist Wongsuphasawat
26 views138 slides
6 things to expect when you are visualizing (2020 Edition) by
6 things to expect when you are visualizing (2020 Edition)6 things to expect when you are visualizing (2020 Edition)
6 things to expect when you are visualizing (2020 Edition)Krist Wongsuphasawat
475 views203 slides
Increasing the Impact of Visualization Research by
Increasing the Impact of Visualization ResearchIncreasing the Impact of Visualization Research
Increasing the Impact of Visualization ResearchKrist Wongsuphasawat
1.3K views33 slides
6 things to expect when you are visualizing by
6 things to expect when you are visualizing6 things to expect when you are visualizing
6 things to expect when you are visualizingKrist Wongsuphasawat
2.3K views214 slides
What to expect when you are visualizing (v.2) by
What to expect when you are visualizing (v.2)What to expect when you are visualizing (v.2)
What to expect when you are visualizing (v.2)Krist Wongsuphasawat
607 views182 slides
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data by
ร้อยเรื่องราวจากข้อมูล / Storytelling with Dataร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with DataKrist Wongsuphasawat
630 views126 slides

More from Krist Wongsuphasawat(20)

6 things to expect when you are visualizing (2020 Edition) by Krist Wongsuphasawat
6 things to expect when you are visualizing (2020 Edition)6 things to expect when you are visualizing (2020 Edition)
6 things to expect when you are visualizing (2020 Edition)
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data by Krist Wongsuphasawat
ร้อยเรื่องราวจากข้อมูล / Storytelling with Dataร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data
Reveal the talking points of every episode of Game of Thrones from fans' conv... by Krist Wongsuphasawat
Reveal the talking points of every episode of Game of Thrones from fans' conv...Reveal the talking points of every episode of Game of Thrones from fans' conv...
Reveal the talking points of every episode of Game of Thrones from fans' conv...
Adventure in Data: A tour of visualization projects at Twitter by Krist Wongsuphasawat
Adventure in Data: A tour of visualization projects at TwitterAdventure in Data: A tour of visualization projects at Twitter
Adventure in Data: A tour of visualization projects at Twitter
Data Visualization: A Quick Tour for Data Science Enthusiasts by Krist Wongsuphasawat
Data Visualization: A Quick Tour for Data Science EnthusiastsData Visualization: A Quick Tour for Data Science Enthusiasts
Data Visualization: A Quick Tour for Data Science Enthusiasts
Krist Wongsuphasawat50.6K views
Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc... by Krist Wongsuphasawat
Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc...Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc...
Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc...
Making Sense of Millions of Thoughts: Finding Patterns in the Tweets by Krist Wongsuphasawat
Making Sense of Millions of Thoughts: Finding Patterns in the TweetsMaking Sense of Millions of Thoughts: Finding Patterns in the Tweets
Making Sense of Millions of Thoughts: Finding Patterns in the Tweets
From Data to Visualization, what happens in between? by Krist Wongsuphasawat
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ... by Krist Wongsuphasawat
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...

Recently uploaded

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
34 views35 slides
The Forbidden VPN Secrets.pdf by
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdfMariam Shaba
20 views72 slides
Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 slides
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism UniverseSimone Puorto
12 views61 slides
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdfDr. Jimmy Schwarzkopf
20 views29 slides
"Running students' code in isolation. The hard way", Yurii Holiuk by
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk Fwdays
17 views34 slides

Recently uploaded(20)

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
The Forbidden VPN Secrets.pdf by Mariam Shaba
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdf
Mariam Shaba20 views
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto12 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays17 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays11 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman36 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely25 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson92 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf

Encodable: Configurable Grammar for Visualization Components

  • 1. Encodable <.> Krist Wongsuphasawat / @kristw Configurable Grammar for Visualization Components Presented at IEEE VIS 2020. See additional information at github.com/kristw/encodable Data Experience Team Airbnb, Inc.
  • 3. Many programmatic ways to create a visualization
  • 4. Visualization Libraries Graphic Libraries Low-level Building Blocks Visualization Grammars High-level Building Blocks Chart Templates Level of abstraction
  • 5. Visualization Libraries Graphic Libraries Low-level Building Blocks Visualization Grammars High-level Building Blocks Chart Templates Level of abstraction Graphic Libraries Manipulate graphics processing, three.js, …
  • 6. Visualization Libraries Graphic Libraries Low-level Building Blocks Visualization Grammars High-level Building Blocks Chart Templates Manipulate graphics processing, three.js, … Level of abstraction Chart Templates Google Charts, nivo, FusionCharts, … A catalog of charts by “chart types”
  • 10. Problem Visualization components have different APIs. Icons by Sean Au
  • 11. Problem Visualization components have different APIs. Component users Keep learning new APIs Icons by Sean Au
  • 12. Problem Visualization components have different APIs. Component users Keep learning new APIs Example: Set “x” for scatterplot Icons by Sean Au
  • 13. Problem Visualization components have different APIs. A) Requires field x in data Component users Keep learning new APIs Example: Set “x” for scatterplot Icons by Sean Au
  • 14. B) Without field x in data Problem Visualization components have different APIs. Component users Keep learning new APIs Example: Set “x” for scatterplot Icons by Sean Au
  • 15. B) Without field x in data Problem Visualization components have different APIs. Component users Keep learning new APIs Example: Set “x” for scatterplot Icons by Sean Au
  • 16. Problem Component users Keep learning new APIs High switching cost Visualization components have different APIs. Icons by Sean Au
  • 17. Problem Component users Keep learning new APIs High switching cost Inconsistent features Visualization components have different APIs. Logarithmic scale Number formatting Make axis include zero etc. Icons by Sean Au
  • 18. Problem Visualization components have different APIs. Component users Keep learning new APIs High switching cost Inconsistent features Icons by Sean Au
  • 19. Problem Visualization components have different APIs. Could the components be more similar? Component users Keep learning new APIs High switching cost Inconsistent features Icons by Sean Au
  • 20. Problem Visualization components have different APIs. Could the components be more similar? Component authors No API standard No help Component users Keep learning new APIs High switching cost Inconsistent features Icons by Sean Au
  • 21. Problem Visualization components have different APIs. Could the components be more similar? Could building consistent components be easier? Component authors No API standard No help Component users Keep learning new APIs High switching cost Inconsistent features Icons by Sean Au
  • 23. Visualization Libraries Graphic Libraries Visualization Grammars Chart Templates Level of abstraction Google Charts, nivo, FusionCharts, … processing, three.js, … Manipulate graphics A catalog of charts by “chart types” Low-level Building Blocks High-level Building Blocks
  • 24. Visualization Libraries Graphic Libraries Visualization Grammars Chart Templates One language to describe all charts A catalog of charts by “chart types” Low-level Building Blocks High-level Building Blocks Vega-Lite, … Google Charts, nivo, FusionCharts, … Level of abstraction Manipulate graphics processing, three.js, …
  • 25. Vega-Lite Creating a bar chart [Satyanarayan et al. 2017]
  • 26. Vega-Lite Creating a bar chart [Satyanarayan et al. 2017]
  • 27. Vega-Lite Creating a bar chart Channel Name Channel Definition [Satyanarayan et al. 2017]
  • 28. Vega-Lite Creating a bar chart [Satyanarayan et al. 2017]
  • 29. Vega-Lite Creating a bar chart Channel Name Channel Definition [Satyanarayan et al. 2017] Could any vis. component define encoding like this?
  • 31. Grammar Parsing & rendering logic User’s specification Output visualization + Analyze vega-lite
  • 32. Grammar Parsing & rendering logic User’s specification Output visualization + Analyze Adopt this part vega-lite
  • 33. Grammar Parsing & rendering logic User’s specification Output visualization + Analyze Adopt this part vega-lite Let the component authors handle rendering.
  • 34. Grammar Parsing & rendering logic User’s specification Output visualization + Decouple & Evolve vega-lite
  • 35. Grammar Parsing & rendering logic User’s specification Output visualization + Decouple & Evolve vega-lite encodable Parser + Configurable grammar Adapt
  • 37. Principle #1 Vis. component is described by its encoding channels.
  • 38. Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 39. Key (Channel Name) Principle #1 Vis. component is described by its encoding channels. Value (Channel Definition)
  • 40. Value (Channel Definition) Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 41. Value (Channel Definition) Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 42. Value (Channel Definition) Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 43. Value (Channel Definition) Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 44. What are the valid channel names and definitions? Value (Channel Definition) Key (Channel Name) Principle #1 Vis. component is described by its encoding channels.
  • 45. Principle #2 Author defines specific channels.
  • 46. Principle #2 Author defines specific channels. Channel Name
  • 47. Principle #2 Author defines specific channels. Channel Name Channel type & output
  • 48. Principle #2 Author defines specific channels. Channel Name Channel type & output
  • 49. Architecture Grammar Parsing & rendering logic User’s specification Output visualization + vega-lite Configurable grammar encodable Parser + Adapt
  • 50. my-component Architecture Grammar Parsing & rendering logic User’s specification Output visualization + vega-lite Configurable grammar encodable Parser + Adapt
  • 51. my-component Architecture Grammar Parsing & rendering logic User’s specification Output visualization + vega-lite Configurable grammar encodable Parser + Encodable Adapt
  • 52. my-component Architecture Grammar Parsing & rendering logic User’s specification Output visualization + vega-lite Configurable grammar encodable Parser + Encodable Adapt Minimal Configuration User’s specification +
  • 53. my-component Architecture Grammar Parsing & rendering logic User’s specification Output visualization + vega-lite Configurable grammar encodable Parser + Encodable Adapt Minimal Configuration User’s specification + Rendering logic Output visualization +
  • 54. Build a component with . Encodable
  • 57. Visualization Component (WordCloud) Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; }
  • 58. Visualization Component (WordCloud) Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig >
  • 59. Visualization Component (WordCloud) API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig >
  • 60. Visualization Component (WordCloud) User’s Code API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } <WordCloud encoding={{ color: { field: ‘food’ }, size: { field: ‘count, scale: { range: [0,48] } }, text: { field: ‘food’ }, }} width={400} height={400} data={[ {food:‘Burger’, count:80 }, {food:‘Noodle’, count:10 } ]} /> Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig >
  • 61. Visualization Component (WordCloud) User’s Code API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } Rendering function WordCloud({ width, height, data , encoding }: WordCloudProps) { const encoder = encoder.setDomainFromDataset( data ); const channels = encoder.channels; return (<div style={{ width , height }}> { data .map(d => (<span style={{ color: channels.color.encodeDatum(d), fontSize: channels.size.encodeDatum(d), }}> {channels.text.getValueFromDatum(d)} </span>))} </div>); } <WordCloud encoding={{ color: { field: ‘food’ }, size: { field: ‘count, scale: { range: [0,48] } }, text: { field: ‘food’ }, }} width={400} height={400} data={[ {food:‘Burger’, count:80 }, {food:‘Noodle’, count:10 } ]} /> Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig >
  • 62. Visualization Component (WordCloud) User’s Code API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } Rendering function WordCloud({ width, height, data , encoding }: WordCloudProps) { const encoder = encoder.setDomainFromDataset( data ); const channels = encoder.channels; return (<div style={{ width , height }}> { data .map(d => (<span style={{ color: channels.color.encodeDatum(d), fontSize: channels.size.encodeDatum(d), }}> {channels.text.getValueFromDatum(d)} </span>))} </div>); } <WordCloud encoding={{ color: { field: ‘food’ }, size: { field: ‘count, scale: { range: [0,48] } }, text: { field: ‘food’ }, }} width={400} height={400} data={[ {food:‘Burger’, count:80 }, {food:‘Noodle’, count:10 } ]} /> Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig > createEncoder< WordCloudConfig >( encoding )
  • 63. Visualization Component (WordCloud) User’s Code API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } Rendering function WordCloud({ width, height, data , encoding }: WordCloudProps) { const encoder = encoder.setDomainFromDataset( data ); const channels = encoder.channels; return (<div style={{ width , height }}> { data .map(d => (<span style={{ color: channels.color.encodeDatum(d), fontSize: channels.size.encodeDatum(d), }}> {channels.text.getValueFromDatum(d)} </span>))} </div>); } <WordCloud encoding={{ color: { field: ‘food’ }, size: { field: ‘count, scale: { range: [0,48] } }, text: { field: ‘food’ }, }} width={400} height={400} data={[ {food:‘Burger’, count:80 }, {food:‘Noodle’, count:10 } ]} /> Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig > createEncoder< WordCloudConfig >( encoding ) fillChannelDef(encoding.color) createChannelEncoder(…) fillChannelDef(encoding.size) createChannelEncoder(…) fillChannelDef(encoding.text) createChannelEncoder(…) Filler Parser encoder
  • 64. Visualization Component (WordCloud) User’s Code API type WordCloudProps = { encoding: width: number; height: number; data: object[]; } Rendering function WordCloud({ width, height, data , encoding }: WordCloudProps) { const encoder = encoder.setDomainFromDataset( data ); const channels = encoder.channels; return (<div style={{ width , height }}> { data .map(d => (<span style={{ color: channels.color.encodeDatum(d), fontSize: channels.size.encodeDatum(d), }}> {channels.text.getValueFromDatum(d)} </span>))} </div>); } <WordCloud encoding={{ color: { field: ‘food’ }, size: { field: ‘count, scale: { range: [0,48] } }, text: { field: ‘food’ }, }} width={400} height={400} data={[ {food:‘Burger’, count:80 }, {food:‘Noodle’, count:10 } ]} /> Config WordCloudConfig = { color: [‘Color’, string]; size: [‘Numeric’, number]; text: [‘Text’, string]; } DeriveEncoding< WordCloudConfig > createEncoder< WordCloudConfig >( encoding ) fillChannelDef(encoding.color) createChannelEncoder(…) fillChannelDef(encoding.size) createChannelEncoder(…) fillChannelDef(encoding.text) createChannelEncoder(…) Filler Parser encoder
  • 71. Beyond examples Real-world usage Apache Superset (incubating) npm package encodable
  • 73. Encodable <.> Envision a world where vis. components are more similar and consistent. Krist Wongsuphasawat (@kristw) github.com/kristw/encodable Component authors Less work to create consistent components. Component users Improve productivity and developer experience.
  • 74. Encodable <.> Envision a world where vis. components are more similar and consistent. Krist Wongsuphasawat (@kristw) github.com/kristw/encodable Configurable grammar and parser Make progress towards that world. Less overhead to iterate and enhance a component. Component authors Less work to create consistent components. Component users Improve productivity and developer experience.
  • 75. Encodable <.> Envision a world where vis. components are more similar and consistent. Krist Wongsuphasawat (@kristw) github.com/kristw/encodable Configurable grammar and parser Make progress towards that world. Less overhead to iterate and enhance a component. Future work More common features, e.g., legend, axes while keeping Encodable lightweight. Auto-generate doc and control panels. Extend to other platforms and languages. Component authors Less work to create consistent components. Component users Improve productivity and developer experience.
  • 77. Acknowledgement Kanit Wongsuphasawat Dominik Moritz Chris Williams Airbnb Data Experience team Benjawan Chanthaworakit
  • 78. Encodable <.> Envision a world where vis. components are more similar and consistent. Krist Wongsuphasawat (@kristw) github.com/kristw/encodable Configurable grammar and parser Make progress towards that world. Conveniently add/remove channels. Future work More common features, e.g., legend, axes while keeping Encodable lightweight. Auto-generate doc and control panels. Extend to other platforms and languages. Component authors Less work to create consistent components. Component users Improve productivity and developer experience.