SlideShare a Scribd company logo
1 of 79
Download to read offline
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”
nivo
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
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

More Related Content

Similar to Encodable: Configurable Grammar for Visualization Components

I T Mentors V S2008 Onramp240 V1
I T Mentors  V S2008  Onramp240 V1I T Mentors  V S2008  Onramp240 V1
I T Mentors V S2008 Onramp240 V1llangit
 
"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
"Technical Challenges behind Visual IDE for React Components" Tetiana MandziukFwdays
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIVijayananda Mohire
 
내꺼내꺼
내꺼내꺼내꺼내꺼
내꺼내꺼misty915
 
Java 2D API: Enhanced Graphics and Imaging for the Java Platform
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
 
Building DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchEelco Visser
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzkenetzke
 
Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 FlexJuan Sanchez
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...Nordic APIs
 
GraphQL: Enabling a new generation of API developer tools
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 toolsSashko Stubailo
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
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 DevelopersDave Bost
 
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...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
Web-Dev Portfolio
Web-Dev PortfolioWeb-Dev Portfolio
Web-Dev Portfolionwbgh
 
C Sharp Certification
C Sharp CertificationC Sharp Certification
C Sharp CertificationVskills
 
Exploring Ink Analysis
Exploring Ink AnalysisExploring Ink Analysis
Exploring Ink AnalysisFrank La Vigne
 

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

I T Mentors V S2008 Onramp240 V1
I T Mentors  V S2008  Onramp240 V1I T Mentors  V S2008  Onramp240 V1
I T Mentors V S2008 Onramp240 V1
 
VB.Net Mod1.pptx
VB.Net Mod1.pptxVB.Net Mod1.pptx
VB.Net Mod1.pptx
 
"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
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
 
What's New in Visual Studio 2008
What's New in Visual Studio 2008What's New in Visual Studio 2008
What's New in Visual Studio 2008
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AI
 
내꺼내꺼
내꺼내꺼내꺼내꺼
내꺼내꺼
 
Java 2D API: Enhanced Graphics and Imaging for the Java Platform
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
 
Building DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language Workbench
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
 
Intro_to_VB.PPT
Intro_to_VB.PPTIntro_to_VB.PPT
Intro_to_VB.PPT
 
GraphQL: Enabling a new generation of API developer tools
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
 
Vsts intro
Vsts introVsts intro
Vsts intro
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
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
 
MSDN Dec2007
MSDN Dec2007MSDN Dec2007
MSDN Dec2007
 
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...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
Web-Dev Portfolio
Web-Dev PortfolioWeb-Dev Portfolio
Web-Dev Portfolio
 
C Sharp Certification
C Sharp CertificationC Sharp Certification
C Sharp Certification
 
Exploring Ink Analysis
Exploring Ink AnalysisExploring Ink Analysis
Exploring Ink Analysis
 

More from Krist Wongsuphasawat

What I tell myself before visualizing
What I tell myself before visualizingWhat I tell myself before visualizing
What I tell myself before visualizingKrist 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)
6 things to expect when you are visualizing (2020 Edition)Krist Wongsuphasawat
 
Increasing the Impact of Visualization Research
Increasing the Impact of Visualization ResearchIncreasing the Impact of Visualization Research
Increasing the Impact of Visualization ResearchKrist Wongsuphasawat
 
6 things to expect when you are visualizing
6 things to expect when you are visualizing6 things to expect when you are visualizing
6 things to expect when you are visualizingKrist Wongsuphasawat
 
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)
What to expect when you are visualizing (v.2)Krist Wongsuphasawat
 
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with Dataร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with DataKrist 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...
Reveal the talking points of every episode of Game of Thrones from fans' conv...Krist Wongsuphasawat
 
What to expect when you are visualizing
What to expect when you are visualizingWhat to expect when you are visualizing
What to expect when you are visualizingKrist Wongsuphasawat
 
Adventure in Data: A tour of visualization projects at Twitter
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 TwitterKrist Wongsuphasawat
 
Data Visualization: A Quick Tour for Data Science Enthusiasts
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 EnthusiastsKrist 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...
Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc...Krist Wongsuphasawat
 
Making Sense of Millions of Thoughts: Finding Patterns in the Tweets
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 TweetsKrist 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?
From Data to Visualization, what happens in between?Krist Wongsuphasawat
 
A Narrative Display for Sports Tournament Recap
A Narrative Display for Sports Tournament RecapA Narrative Display for Sports Tournament Recap
A Narrative Display for Sports Tournament RecapKrist Wongsuphasawat
 
Visualization for Event Sequences Exploration
Visualization for Event Sequences ExplorationVisualization for Event Sequences Exploration
Visualization for Event Sequences ExplorationKrist 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 ...
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...Krist Wongsuphasawat
 

More from Krist Wongsuphasawat (20)

What I tell myself before visualizing
What I tell myself before visualizingWhat I tell myself before visualizing
What I tell myself before visualizing
 
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)
6 things to expect when you are visualizing (2020 Edition)
 
Increasing the Impact of Visualization Research
Increasing the Impact of Visualization ResearchIncreasing the Impact of Visualization Research
Increasing the Impact of Visualization Research
 
6 things to expect when you are visualizing
6 things to expect when you are visualizing6 things to expect when you are visualizing
6 things to expect when you are visualizing
 
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)
What to expect when you are visualizing (v.2)
 
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with Dataร้อยเรื่องราวจากข้อมูล / Storytelling with Data
ร้อยเรื่องราวจากข้อมูล / Storytelling with Data
 
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...
Reveal the talking points of every episode of Game of Thrones from fans' conv...
 
What to expect when you are visualizing
What to expect when you are visualizingWhat to expect when you are visualizing
What to expect when you are visualizing
 
Adventure in Data: A tour of visualization projects at Twitter
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
 
Logs & Visualizations at Twitter
Logs & Visualizations at TwitterLogs & Visualizations at Twitter
Logs & Visualizations at Twitter
 
d3Kit
d3Kitd3Kit
d3Kit
 
Data Visualization: A Quick Tour for Data Science Enthusiasts
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
 
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...
Using Visualizations to Monitor Changes and Harvest Insights from a Global-sc...
 
Data Visualization at Twitter
Data Visualization at TwitterData Visualization at Twitter
Data Visualization at Twitter
 
Making Sense of Millions of Thoughts: Finding Patterns in the Tweets
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?
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?
 
A Narrative Display for Sports Tournament Recap
A Narrative Display for Sports Tournament RecapA Narrative Display for Sports Tournament Recap
A Narrative Display for Sports Tournament Recap
 
Visualization for Event Sequences Exploration
Visualization for Event Sequences ExplorationVisualization for Event Sequences Exploration
Visualization for Event Sequences Exploration
 
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...
Krist Wongsuphasawat's Dissertation Proposal Slides: Interactive Exploration ...
 
Usability of Google Docs
Usability of Google DocsUsability of Google Docs
Usability of Google Docs
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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”
  • 7.
  • 9.
  • 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
  • 55.
  • 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.