SlideShare ist ein Scribd-Unternehmen logo
1 von 79
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

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.