D3 : Data driven documents with Data visualization principles .

22
D3: Data-Driven Documents Michael Bostock, Vadim Ogievetsky and Jeffrey Heer Prepared by : Mohamed Sweelam 1

description

A summary about D3, and the power of using it with referring to some important aspects of data visualization.

Transcript of D3 : Data driven documents with Data visualization principles .

Page 1: D3 : Data driven documents with Data visualization principles .

D3: Data-Driven DocumentsMichael Bostock, Vadim Ogievetsky and Jeffrey Heer

Prepared by : Mohamed Sweelam

1

Page 2: D3 : Data driven documents with Data visualization principles .

2

Sweelam
Dark edge / perhaps for the first time, graphical methods proved crucial in a numberof newinsights
Sweelam
Galileo deal with astronomy
Page 3: D3 : Data driven documents with Data visualization principles .

3

Data Visualization• What is data visualization ?

• Why is data visualization important?

• What is the power of using data visualization ?

Sweelam
Data visualization is the presentation of data in a pictorial or graphical format
Sweelam
Visualizations help people see things that were not obvious to them before. Even when data volumes are very large, patterns can be spotted quickly and easily. Visualizations convey information in a universal manner and make it simple to share ideas with others. It lets people ask others
Sweelam
Understanding and Exploration
Page 4: D3 : Data driven documents with Data visualization principles .

4

Abstract• Data-Driven Documents is a novel representation-transparent approach to visualization for the web.

• D3 enables direct inspection and manipulation of a native representation: the standard document object model (DOM).

• With D3, designers selectively bind input data to arbitrary document elements.

• applying dynamic transforms to both generate and modify content using DOM.

Page 5: D3 : Data driven documents with Data visualization principles .

5

Good Graphic• Presentation ( What to Whom, How and Why ).

• Graphical Display Options:

$ Sorting and Ordering.

$ Adding Model or Statistical Information.

$ Captions, Legends and Annotations.

$ Positioning in Text.

$ Colors.

$ Scales (Using data standardization).

Sweelam
Keep the text in the same page , Don't make user turning the page and go back to see the graph.
Sweelam
Standardize data for :* Understand*Computations
Page 6: D3 : Data driven documents with Data visualization principles .

6

Good Graphic

Page 7: D3 : Data driven documents with Data visualization principles .

7

Introduction• Building visualizations requirements.

• Visualization toolkits problem due to encapsulation

of the DOM with more specialized forms.

• The need of balancing expressiveness, efficiency and accessibility with taking in account three objectives :

$ Compatibility.

$ Debugging.

$ Performance.

Sweelam
Performance / interaction and animation by using transformation with selectively bind input to the element .
Sweelam
Compatiblity / Tools do not exist in isolation, but within an ecosystem of related components. Technology reuse utilizes prior knowledgeand reference materials, improving accessibility
Page 8: D3 : Data driven documents with Data visualization principles .

8

Document Transformers• Browsers Built-In APIs for manipulating the DOM

these interfaces are verbose and cumbersome.

• Enhancing these techniques using smart libraries as JQuery, JS and CSS.

Tree Map

Sweelam
مطوله و مرهقه
Sweelam
A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value.
Page 9: D3 : Data driven documents with Data visualization principles .

9

Graphics Libraries• Low level graphics are tedious for complex visualization tasks as they lack convenient abstractions.

• The lack of supporting debugging is also a problem.

• Toolkit specific scene graph abstractions diminish compatibility and expressiveness.

Sweelam
ممله
Sweelam
Scene graphs are data structures used to organize and manage a variety of media types.
Sweelam
: elements cannot be styled using external style sheets, and graphical effects such as dashed strokes and composite filters may be unusable even if supported natively.
Page 10: D3 : Data driven documents with Data visualization principles .

10

Design• D3 atomic operand is Selection: a filtered set of elements queried from the current document .

• Operators act on selections, modifying content.

• Data joins bind input data to elements, and producing enter and exit sub-selections for the creation.

• Animated transitions are applied by default.

• Numerous helper Modules such layouts and scales simplify common visualization tasks.

Page 11: D3 : Data driven documents with Data visualization principles .

11

Visualization Problem

• The basic problem in visualization still is the physical limitation of computer screens.

• Some solutions are invented to overcoming the restrictions of two-dimensionality:

I. Using virtual reality environment with rotation principle.

II. Project high-dimensional data onto 2-D coordinate system using data-reduction method such as principal component analysis (PCA).

III. Using parallel coordinates system.

IV. Link view displays.

Page 12: D3 : Data driven documents with Data visualization principles .

12A smart technique to interact with micro and macro features

simultaneously.(Focus + Context) 

Sweelam
It can be difficult to observe micro and macro features simultaneously with complex graphs. If you zoom in for detail, the graph is too big to view in its entirety. If you zoom out to see the overall structure, small details are lost. Focus + context techniques allow interactive exploration of an area of interest (the focus) in greater detail, while preserving the surrounding environment (the context).
Page 13: D3 : Data driven documents with Data visualization principles .

13

Selections • Selections are a core concept in D3.

• Based on CSS selectors. Selection in d3 is a filter that manage every element inside the data, It is also serving as namespace.

Page 14: D3 : Data driven documents with Data visualization principles .

14

Data• The data operator binds input data to selected nodes.

• Once data is bound to elements, it is passed to functional operators as the first argument (by convention, d), along with the numeric index (i).

Sweelam
. D3 uses format agnostic processing: data is specified as an array of arbitrary values, such as numbers, strings or objects of folds.
Page 15: D3 : Data driven documents with Data visualization principles .

15

Interaction and Animation • The DOM supports event listeners.

• D3’s focus on transformations simplifies the specification of scene changes in response to user events;

• The major point is events always involves with transformation “Animated transitions” .

Page 16: D3 : Data driven documents with Data visualization principles .

16

Animation

Page 17: D3 : Data driven documents with Data visualization principles .

17

Modules• D3’s kernel achieves flexibility through representational transparency; this also minimizes the library’s conceptual surface area by presenting less to learn.

• “ Don’t get it original , Get it right “ .

• D3’s optional modules encapsulate reusable solutions to common problems like “SVG” module.

Sweelam
SVG :Scalable Vector Graphics
Page 18: D3 : Data driven documents with Data visualization principles .

18

Design Rotation• Unlike Protovis excels at concise specifications of static scenes and it is a declarative language for visualization design with browsers .

• D3’s transformations make dynamic visualizations easier to implement. By adopting immediate evaluation of operators and the browser’s native representation.

Sweelam
Declarative Programming is a style of programming that concentrates on what to do, rather than how to do it.
Page 19: D3 : Data driven documents with Data visualization principles .

19

TransformationProtovis: D3

• Implicitly.

• Changing data and prosperities are slow.

• Re-evaluate all properties, even those whose definitions or input data have not changed.

• Propagate the changes to the intermediate scene graph out to the native SVG.

• Explicitly.

• Specifications are data-driven. • Transformations better enable

dynamic visualizations.

• Eliminate redundant computation touching only the elements and attributes that

need updating.

Page 20: D3 : Data driven documents with Data visualization principles .

20

Immediate EvaluationProtovis D3

• Implicit re-evaluation of properties. this can cause errors if references captured via closure change or disappear.

• Has hidden control flow that is fired when the system crashes .

• Can’t generate arbitrary hierarchical scene graphs because

the hierarchy depth is fixed to the number of nested panels.

• Applies operators to tighten the scope of reference capture,.

for example: D3’s attr operator.

• Reduces internal control flow, moving it up to user code.

• D3’s stateless evaluation allows transforms to be refactored

into functions invoked recursively by the each operator.

Sweelam
A "closure" is an expression (typically a function) that can have free variables together with an environment that binds those variables (that "closes" the expression).
Page 21: D3 : Data driven documents with Data visualization principles .

21

Native RepresentationProtovis D3

• Its choice of graphical primitives, called marks.

• selections can be retrieved from the document at any time.

• Marks are homogeneous: properties have the same meaning across mark types.

• Almost the same work and output , except native elements improve tool compatibility and debugging and slight decrease in notational efficiency.

• uses selectors to identify document elements through a variety of means (such as tag names, class attributes, and associated data).

Ahmed_Gamal
These marks were chosen to satisfy the needs ofcommon chart types: Line for line charts, Wedge for pie charts, andso on.
Page 22: D3 : Data driven documents with Data visualization principles .

22

Thanks