1. Practical Data Visualization
April 10, 2014
COMPSCI 290-01:
Everything Data
https://iu.box.com/everythingdata
Angela Zoss
Data Visualization Coordinator
Data & GIS Services
6. Evaluate data quality
Query using Facebook API
• Node-link diagram
Kandel, Heer, Plaisant, et al. (2011)
http://dx.doi.org/10.1177/1473871611415994
7. Query using Facebook API
• Node-link diagram
• Matrix display with clustering
Evaluate data quality
Kandel, Heer, Plaisant, et al. (2011)
http://dx.doi.org/10.1177/1473871611415994
8. Kandel, Heer, Plaisant, et al. (2011)
http://dx.doi.org/10.1177/1473871611415994
Query using Facebook API
• Node-link diagram
• Matrix display with clustering
• Matrix display, API return order
Evaluate data quality
9. Kandel, Heer, Plaisant, et al. (2011)
http://dx.doi.org/10.1177/1473871611415994
Query using Facebook API
• Node-link diagram
• Matrix display with clustering
• Matrix display, API return order
5000-item result limit
Silent failure
Evaluate data quality
10. Tell a story
Hans Rosling –The River of Myths
http://www.youtube.com/watch?v=OwII-dwh-bk
http://www.gapminder.org/
12. From Data to Graphic
• What data types are present in the data source?
• How are the variables likely to relate?
• What visualization type seems to be the best fit for
the goal?
13. Matching Data Types to Visual Elements
Mackinlay, J. (1986).Automating the design of graphical presentations of relational
information. ACMTransactions on Graphics,5(2), 110-141.
http://dx.doi.org.proxy.lib.duke.edu/10.1145/22949.22950
14. Example Encoding Ordered Useful values Quantitative Ordinal Categorical Relational
position, placement yes infinite Good Good Good Good
1, 2, 3; A, B, C text labels optional
(alphabetical
or numbered)
infinite Good Good Good Good
length yes many Good Good
size, area yes many Good Good
angle yes medium/few Good Good
pattern density yes few Good Good
weight, boldness yes few Good
saturation, brightness yes few Good
color no few (< 20) Good
shape, icon no medium Good
pattern texture no medium Good
enclosure, connection no infinite Good Good
line pattern no few Good
line endings no few Good
line weight yes few Good
Properties and Best Uses of Visual Encodings
Noah Iliinsky • ComplexDiagrams.com/properties • 2012-06
Visual Encodings
http://complexdiagrams.com/properties
15. Chart Choosers
• Interested in showing composition? Relationship? Distribution?
(What do the charts do well?)
http://extremepresentation.typepad.com/blog/2006/09/choosing_a_good.html
• Chart typically determines position of elements, with some built-in
visual encodings.
• Additional visual encodings can often be added to incorporate more
variables into charts, but beware of overwhelming the audience.
18. Common Visualization Types
• 1D/Linear
• 2D/Planar (incl. Geospatial)
• 3D/Volumetric
• Temporal
• nD/Multidimensional (common charts, etc.)
• Tree/Hierarchical
• Network
Shneiderman, B. (1996).The eyes have it:A task by data type taxonomy for information
visualizations. Proceedings of IEEE Symposium onVisual Languages - Boulder,CO (pp. 336-343).
http://dx.doi.org.proxy.lib.duke.edu/10.1109/VL.1996.545307
See LibGuide (http://guides.library.duke.edu/vis_types) for examples and tools.
26. And don’t make users do “visual math.”
http://eagereyes.org/criticism/visual-math-wrong
http://enb105-2012s-rw.blogspot.com/2012/02/lab-two-mapping-excercise.html
70. Congress data query
SELECT person_id,
type,
MIN(start_date),
MAX(end_date),
gender
FROM person_roles
LEFT JOIN persons ON person_roles.person_id = persons.id
GROUP BY person_id, type;
73. What can Tableau make?
• Maps (symbol, filled)
• Text tables
• Heat maps
a grid representing
variables by size and color
• Highlight tables
a grid representing
variables by text and color
• Treemap
a grid representing
variables by size
• Horizontal bars
• Stacked bars
• Side-by-side bars
• Lines/Area charts
• Lines/Area charts
(discrete)
• Dual lines
• Pie charts
• Scatter plots
• Circle views
• Side-by-side circles
• Dual combination
• Bullet graphs
• Gantt
• Packed bubbles/Word
cloud
• Histogram
74. Tableau Desktop
Windows only (for now).
Free for:
• students
(http://www.tableausoftware.com/academic/students)
• teachers using it in a class, semester license
(http://www.tableausoftware.com/academic/teaching)
Otherwise, can useTableau Public for free (installed in Perkins 226)
77. Data formats
• Confusing number of
choices
• GEXF supports many
program features, but
a pain to write by hand
• Spreadsheet is
convenient and
supports important
features
https://gephi.org/users/supported-graph-formats/
78. In addition to network visualization,
Gephi can calculate:
• Degree (when directed, in-degree and out-degree)
• Diameter
– Betweenness Centrality
– Closeness Centrality
– Eccentricity
• Density
• Clustering/Modularity
80. About D3
• JavaScript library
• Fairly low level; building with rectangles and circles
and lines, instead of pre-made chart structures*
• Basic functioning makes it easy to join HTML
elements with data points
82. D3 Resources
• Interactive DataVisualization for theWeb
http://chimera.labs.oreilly.com/books/123000000
0345
• Tutorial and Cheat Sheet, c. 2012
www.jeromecukier.net/blog/2012/10/15/d3-
tutorial-at-visweek-2012/
• D3Tips andTricks
https://leanpub.com/D3-Tips-and-Tricks/read
83. When to use D3
• Need for unusual, highly customized chart types
(http://bl.ocks.org/mbostock)
• Relatively low number of data points or visible
elements (SVG vs. HTML5 Canvas)
• Impress your friends
96. Visualization Tips: Vector output
• Stats programs aren’t design programs
• Vector output (PDF, SVG, EPS) is easy to edit later
in a vector graphics program like Adobe Illustrator
• Also helps to create high-res for posters, Mediawall,
etc.
97. Design Tips: In a nutshell
Simplify (but not the axis):
• Reduce color
• Focus on major trends
• Consistent style/format/reference system
http://guides.library.duke.edu/topten
98. Pay attention to text in figures
• Horizontal text/bars
• Increase font size
http://bit.ly/figtext
102. See also:
Tufte, E. R. (1990). Envisioning
information.Cheshire, CT:
Graphics Press, p. 28-29, 78.
http://www-958.ibm.com/software/data/cognos/manyeyes/visualizations/china-cdm-projects-by-type-and-regio
Small multiples
105. Design for Non-Designers
Michael Faber, basic graphic design principles
• Learn IT at Lunch, Wednesday,April 9
Follow-up: http://bit.ly/1ktHzRg
• Visualization Friday Forum recording, Spring 2013
http://bit.ly/14oxuIO
106. Good Chart Makeover Examples
The Why Axis chart remakes
http://thewhyaxis.info/remakes/
Storytelling With Data visual makeovers:
http://www.storytellingwithdata.com/search/l
abel/Visual%20Makeover
107. On the web
• Bad examples:
WTFViz, http://wtfviz.net/
• Good examples:
Thumbs UpViz, http://thumbsupviz.com/
• Ask for help:
Help MeViz, http://helpmeviz.com/
108. More on Data Visualization
Visual communication:
http://guides.library.duke.edu/visualcomm
Data visualization:
http://guides.library.duke.edu/datavis/
Top 10 dos and don’ts for charts and graphs:
http://guides.library.duke.edu/topten
111. Brandaleone Family Center for
Data and GIS Services
• Perkins 226
• Open whenever the library is open
• 12 high-powered Dell workstations
• 3 Bloomberg financial workstations
• Various data analysis, GIS, and
visualization software packages
available
http://library.duke.edu/data/about/lab
112.
113. Support Area: Visualizing Data
• GIS (Geographic Information Systems) support
– Workshops on ArcGIS and other online mapping tools
– High powered computers with GIS software
– Expert help from Data & GIS Staff
• Visualization support, more broadly
– Workshops onTableau Public and best practices for
charts, graphs, posters, etc.
114. Walk-in Consulting
…or by appointment:
askdata@duke.edu
http://library.duke.edu/data/about/schedule
115. Workshops
• Typically toward the beginning of the semester
• Covering: data processing/statistical software,
GIS/mapping, visualization
http://library.duke.edu/data/news
• 1-2 hours, often hands-on
http://library.duke.edu/data/guides/
For announcements, sign up for our listserv:
https://lists.duke.edu/sympa/subscribe/dgs-announce
116. Information about Data & GIS Services
• Data collections, LibGuides, etc.
http://library.duke.edu/data/
• Blog (tutorials, announcements, etc.)
http://blogs.library.duke.edu/data/
• E-mail consultations
askdata@duke.edu
• Twitter accounts
@duke_data, @duke_vis
117. Other visualization resources
• Visualization Friday Forum
http://vis.duke.edu/FridayForum/
• Duke Flickr Gallery
http://bit.ly/dukevis
• Student DataVisualization Contest
http://bit.ly/viscontest14
• LINK Mediawall
https://wiki.duke.edu/display/LMW/