Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Composing data visualizations in Ember
Search
Chris Henn
March 03, 2015
Technology
990
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Composing data visualizations in Ember
Chris Henn
March 03, 2015
Other Decks in Technology
See All in Technology
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.5k
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.1k
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
260
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
360
クロスボーダーM&AのValue Upを支えるプロダクト開発。日米チームのハブになったプロダクトエンジニアの実践 / Product Engineering Conference 2026
genda
0
120
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
290
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
620
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
260
AIで仕事のやり方を変える
matsu7874
3
1.1k
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.2k
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
700
AI時代のAPI品質を支えるガードレール / API Guardrails for API quality in the AI era
yokawasa
1
220
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.9k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Become a Pro
speakerdeck
PRO
31
6.2k
Product Roadmaps are Hard
iamctodd
55
13k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
530
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
The SEO identity crisis: Don't let AI make you average
varn
0
550
Transcript
Composing Data Visualizations in Ember Chris Henn · chnn/composing-graphics
How should we split a statistical graphic into parts?
• Lets us change one feature of the graphic at
a time • Suggests the aspects of a plot that are possible to change • Encourages custom visualizations for every data situation
mpg cyl disp hp drat wt qsec vs am gear
carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 …
[ {name: “Mazda RX4”, mpg: 21.0, wgt: 2.62, cyl: 6,
…}, {name: “Mazda RX4 Wag”, mpg: 21.0, wgt: 2.875, cyl: 6, …}, {name: “Datsun 710”, mpg: 22.8, wgt: 2.32, cyl: 4, …}, … ]
Demo
Hadley Wickham’s Grammar of Graphics
A simple scatterplot
A simple scatterplot • Mappings from variables to aspects of
the plot • In the grammar this is a data to aesthetic mapping • Every visualization has at least one (often more)
A simple scatterplot • Each Data to Aesthetic mapping has
some mapping function • These are called scales
A simple scatterplot • We’ve chosen to represent these as
points • This is called a geom (or geometry)
The Grammar of Graphics • Data to Aesthetic mappings •
Scales: one per Data to Aesthetic mapping • Layers A. Geom B. Stat C. Optional Data to Aesthetic mapping • Coordinate System • Faceting
What does this look like using Ember?
Data to Aesthetic Mappings
{{my-scatterplot data=app.carData y="mpg" x="wt" color="cyl"}} Data to Aesthetic Mappings
Scales
// Some scale constructor var scale = linearScale([0, 10], [0,
300]); scale(5) // => 150 scale.invert(150) // => 5 Scales
var SomeComponent = Ember.Component.extend({ // Computed property that returns a
scale function xScale: linearScaleMacro('data', 'x', ‘screenWidth'), // ... }); Scales
Layers Geometries, Stats, Optional Data to Aesthetic mappings
{{plot-points data=data x=x y=y xScale=xScale yScale=yScale}} Layers
<svg> <path d="{{pathString}}" /> </svg> Layers: Geometries
<svg> {{#each points as |point|}} <circle cx="{{point.x}}" cy=“{{point.y}}" /> {{/each}}
</svg> Layers: Geometries
Further considerations • Interactivity • Animations and transitions • Performance
• When is the grammar appropriate?
When is the Grammar of Graphics appropriate? General Purpose Plotting
Library App with one visualization Your Ember App
Questions? chrishenn.net twitter: @cwhnn github: @chnn