Data in Motion

A presentation at D3 Unconf in September 2017 in San Francisco, CA, USA by Sarah Drasner

Slide 1

Slide 1

DATA IN MOTION SARAH DRASNER @SARAH_EDO

Slide 2

Slide 2

LET’S START FROM THE BEGINNING. What happens when you look an an image?

Slide 3

Slide 3

Saccade SCANNING

Slide 4

Slide 4

Why Is This Important?

Slide 5

Slide 5

Draw Attention & Connect States

http://bit.ly/2h3BfFp

Slide 6

Slide 6

HOW? FILTERING/ REORDERING SHOWING GREATER CONTEXT SHOWING CHANGE OVER TIME REVEALING FOR CLARITY

Slide 7

Slide 7

FILTERING/ REORDERING

Slide 8

Slide 8

Filtering & Reordering RETAINING CONTEXT

Slide 9

Slide 9

D3 Chained Transitions SIMPLE TRANSITION . transition () . attr ( "cy" , 820 ) . attr ( "r" , 5 ) . attr ( "fill" , "url(#radgrad)" ) . duration ( 1300 ) . delay (( d , i ) => {

return

6000

  • ( i

40 )

})

Slide 10

Slide 10

D3 INTERPOLATE PATH SIMPLE TRANSITION D3 Chained Transitions https://github.com/pbeshai/d3-interpolate-path

Slide 11

Slide 11

Morphing :

Greensock ADVANCED TRANSITION https://codepen.io/sdras/pen/BodKjP

Slide 12

Slide 12

Morphing ADVANCED TRANSITION

Slide 13

Slide 13

Morphing :

Greensock ADVANCED TRANSITION TweenLite .to( "#circle" , 1 , {morphSVG: ”#square" });

Slide 14

Slide 14

Morphing :

Greensock ADVANCED TRANSITION findShapeIndex( "#square" , "M10 315 L 110 215" );

UTILITIES

Slide 15

Slide 15

Morphing :

Greensock ADVANCED TRANSITION function

flame () {

var tl = new TimelineMax(); tl.add( "begin" ); tl.to(blurNode, 2.5 , { attr: { stdDeviation: 3 } }, "begin" );

var num = 9 ;

for ( var i = 1 ; i <= num; i++) { tl.to(fStable, 1 , { morphSVG: { shape: "#f"

  • I }, opacity: (( Math .random() * 0.7 ) + 0.7 ), ease: Linear.easeNone }, "begin+="
  • i); }

Slide 16

Slide 16

Morphing :

Greensock ADVANCED TRANSITION

Slide 17

Slide 17

FILTERING/REORDERING Greensock

For Complex Shape Interpolations D3

For Chaining With Simple Elements

Slide 18

Slide 18

SHOWING GREATER CONTEXT

Slide 19

Slide 19

SHOWING CONTEXT Reduced Cognitive Load Through Spatial Awareness Kathy Sierra, “Badass: Making Users Awesome”

Slide 20

Slide 20

Using Spatial Awareness To Drive Meaning SHOWING GREATER CONTEXT fallen.io

Slide 21

Slide 21

USE THE SVG’S VIEWBOX AS A CAMERA

Slide 22

Slide 22

Viewbox As A Camera RETAINING CONTEXT

Slide 23

Slide 23

Viewbox As A Camera RETAINING CONTEXT getBBox ();

Slide 24

Slide 24

Viewbox As A Camera RETAINING CONTEXT

Slide 25

Slide 25

Viewbox As A Camera RETAINING CONTEXT codepen.io/sdras/pen/dXoLEJ

Slide 26

Slide 26

Viewbox As A Camera RETAINING CONTEXT

Slide 27

Slide 27

nikon.com/about/sp/universcale

Slide 28

Slide 28

SHOWING CHANGE OVER TIME

Slide 29

Slide 29

Motion As A Time Signifier CHANGE OVER TIME codepen.io/sdras/pen/RZGqxR

//this formats the hour info without a library getCurrentHour(zone) {

let newhr = new

Date ().toLocaleTimeString( 'en' , { hour: '2-digit' , minute: '2-digit' , hour12: true , timeZone: zone })

return newhr },

Slide 30

Slide 30

Scrollytelling CHANGE OVER TIME letsfreecongress.org

Slide 31

Slide 31

Scrollytelling CHANGE OVER TIME nytimes.com/interactive/2015/01/09/sports/the-dawn-wall-el-capitan

Slide 32

Slide 32

Greensock’s Timeline CHANGE OVER TIME codepen.io/sdras/pen/ByEWON

Slide 33

Slide 33

Greensock’s Syntax CHANGE OVER TIME codepen.io/sdras/pen/Wramvo

Slide 34

Slide 34

Greensock’s Timeline CHANGE OVER TIME tl .pause(); // Pause timeline tl .resume(); // Continue playback tl .restart(); // Restart the timeline tl .play(X); // Play from Xs tl .play(-X); // Play Xs from end tl .seek(X); // Go to Xs or 'label' tl .reverse(); // Reverse playback anytime tl .timeScale(x); // Speed up/slow down timeline tl .progress( 0.5 ); // Skip to halfway

Slide 35

Slide 35

Greensock’s Timeline CHANGE OVER TIME github.com/sdras/gsap-player

Slide 36

Slide 36

Scrollytelling Options STORYTELLING IN CODE PIXEL TO PIXEL POINT TRIGGERRED • Skrollr • Map timeline progress to scroll event (semi-manual) • ScrollMagic • ScrollStory • Waypoints • Tr i g g e r s i n g l e t i m e l i n e o ff of scroll event (semi- manual) • ScrollMagic • ScrollStory • GraphScroll

Slide 37

Slide 37

Emotion Attaches To
The Limbic
System STORYTELLING

Slide 38

Slide 38

Emotion Attaches To
The Limbic
System STORYTELLING codepen.io/sdras/pen/YZBGNp coordinates(e) {

this .startArms.progress( 1

  • (e.clientX / walleCoords)).pause(); },

Slide 39

Slide 39

Scrollytelling CHANGE OVER TIME nytimes.com/interactive/2016/07/07/world/americas/bolivia-climate-change-lake-poopo TEXT AND
IMAGE

Slide 40

Slide 40

codepen.io/sdras/pen/dPqRmP

Slide 41

Slide 41

Marrying Text And Image STORYTELLING // use in a timeline call

tl . staggerTo (foo . words ,

0.8 ,

{

rotationY :

60 ,

y :

300 ,

opacity :

0 ,

ease : Power4 . easeIn
},

0.1 ) ;

SPLITTEXT // instantiate new split text var foo

new SplitText( " #bar ",

{ type :" words ",

//optional

wordsClass :" word "

} ) ;

Slide 42

Slide 42

codepen.io/sdras/pen/RNWaMX

Slide 43

Slide 43

codepen.io/sdras/pen/RNWaMX

Slide 44

Slide 44

Storytelling With Interactive Text And Image STORYTELLING

Slide 45

Slide 45

codepen.io/sdras/pen/RNWaMX

Slide 46

Slide 46

REVEALING FOR CLARITY

Slide 47

Slide 47

Motion As Information REVEALING FOR CLARITY

Slide 48

Slide 48

Motion As Information REVEALING FOR CLARITY codepen.io/sdras/pen/qZBgaj .hexagons

path {

opacity : 0 ; } $elements : 2000 ; @for

$i

from

0

to

$elements {

.hexagons

path:nth-child ( #{$i} ) {

$per : $i / 50 ;

animation : 2s

#{$per} s ease hexagons both ; } } @keyframes

hexagons {

100% {

opacity : 1 ; } }

Slide 49

Slide 49

Motion As Information REVEALING FOR CLARITY

Slide 50

Slide 50

Slide 51

Slide 51

Get The Data On The Page, Then Reveal It

Slide 52

Slide 52

antievictionmappingproject.net/ellis.html

Slide 53

Slide 53

banxico.org.mx/mibanxico/capitulo1/

Slide 54

Slide 54

Combine! DATA IN MOTION FILTERING GREATER CONTEXT SCROLLYTELLING REVEALING pudding.cool/2017/03/redraft/

Slide 55

Slide 55

Motion Gives Our Data Another Dimension

Slide 56

Slide 56

THANK YOU! SARAH DRASNER @SARAH_EDO