There are so many libraries of visualization components nowadays with their APIs often different from one another. Could these components be more similar, both in terms of the APIs and common functionalities? For someone who is developing a new visualization component, how should the API look like? This work drew inspiration from visualization grammar, decoupled the grammar from its rendering engine and adapted it into a configurable grammar for individual components called Encodable. Encodable helps component authors define grammar for their components, and parse encoding specifications from users into utility functions for the implementation.
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.
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
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, …
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.
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.
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.