1 / 59

# Visualisation 2012 - 2013 Lecture 4 - PowerPoint PPT Presentation

Visualisation 2012 - 2013 Lecture 4. Visualising Comparisons. Brian Mac Namee Dublin institute of Technology Applied Intelligence Research Centre. Origins. This course is based heavily on a course developed by Colman McMahon ( www.colmanmcmahon.com )

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about ' Visualisation 2012 - 2013 Lecture 4' - nyoko

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Visualisation2012 - 2013Lecture 4

VisualisingComparisons

Brian Mac Namee

Dublin institute of Technology

Applied Intelligence Research Centre

• This course is based heavily on a course developed by Colman McMahon (www.colmanmcmahon.com)

• Material from multiple other online and published sources is also used and when this is the case full citations will be given

www.pinterest.com/brianmacnamee/great-visualisation-examples/

www.pinterest.com/brianmacnamee/terrible-visualisation-examples/

• This week we are going to look at means through which we can visualise comparisons between variable values

• Single variable exploration

• Simple comparisons

• Multi distribution comparisons

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

• A histogram gives us an in-depth view of a single numeric variable

• To construct a histogram:

• Divide the data range into bins

• Count the occurrence frequency of each bin within the data

• Normalize the frequency counts

• Plot a bar graph to show the normalised count for each bin

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

• Note that constructing a density plot requires that the probability density function underlying the data in the histogram is constructed – this takes a bit of work!

• Common approaches include:

• Parzen windows

• Clustering

• Mixture models

From Wikipedia! http://en.wikipedia.org/wiki/Parzen_window

From Wikipedia! http://en.wikipedia.org/wiki/Parzen_window

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

• The histogram is quite possibly your most important visual data exploration tool!!!

50

40

30

20

10

0

OUTLIERS

Values that fall outside quartile ± 1.5*IQR

VARIABLE VALUES

Values displayed for a single variable

50

MAX

Max value below 3rd Q + 1.5*IQR

40

3rd QUARTILE

The value for the 3rd quartile of the variable values

30

MEDIAN

The median value for the variable

20

1st QUARTILE

The value for the 1st quartile of the variable values

MIN

Min value above 1st Q - 1.5*IQR

10

0

• The components of a box plot are:

• A thick dark line at the minimum

• A horizontal lines at the 1st quartiles

• A horizontal lines at the 3rd quartiles

• A whisker down to the low value

• Multiply the IQR by 1.5 to calculate the step

• The low value is the lowest value above the 1st quartile minus the step

• A whisker up to the high value

• The high value is the highest value above the 3rd quartile plus the step

• Any values outside low and high are marked as outliers

• Some important points about a box plot:

• 50% of the data occurs between the lower and upper edges of the box

• The lower 50% of the data occurs below the median

• The upper 50% of the data occurs above the median line in the box.

• The lower 25% of the data occurs between the bottom edge of the box and the bottom edge of the lower whisker

• The upper 25% of the data occurs above the top edge of the box and the top edge of the upper whisker

From Wikipedia! http://en.wikipedia.org/wiki/Probability_density_function

A

B

C

D

E

F

Categories

CATEGORY AXIS

A value is displayed for each category

“Visualize This”, N. Yau, Wiley, 2011

http://shop.oreilly.com/product/0636920022060.do

Average Score

Rating

Edward Tufte, “The Quantittative Display of Information”, 2009

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

http://www.uh.edu/engines/epi1712.htm

http://www.uh.edu/engines/epi1712.htm

http://www.uh.edu/engines/epi1712.htm

http://www.uh.edu/engines/epi1712.htm

William Playfair's "Statistical Breviary,” 1801 via The New York Times

Florence Nightingales’ Crimean War Death Charts via:http://www.uh.edu/engines/epi1712.htm

• Pie charts are the subject of a lot of negative comment

• http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=00018S

• http://www.juiceanalytics.com/writing/the-problem-with-pie-charts/

• The main reason is that their descriptive power is based on our ability to interpret differences in angle

• Pie charts are useful when:

• We have a small number of categories (< 8)

• The values sum to a meaningful whole

• The differences are coarse

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

“Visualize This”, N. Yau, Wiley, 2011http://shop.oreilly.com/product/0636920022060.do

www.informationisbeautiful.net/2009/the-billion-dollar-gram/

• Treemaps were originally designed to handle hierarchical structures – such as disk drives – but can be used for non-hierarchical data

• Treemaps rely on a tiling algorithm to figure out how to position the rectangles

• We will come back to this!

TreeMap page by Ben Schneiderman (TreeMap Pioneer): http://www.cs.umd.edu/hcil/treemap-history/index.shtml

Early paper on TreeMaps: http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?isNumber=4467&arNumber=175815&isnumber=4467&arnumber=175815

Average Score

Rating

Watch out for bar charts that show an average or other aggregate – these can hide a multitude of detail

Average Score

Rating

Multiple box plots are a great way to show multiple distributions

http://blogs.sas.com/content/graphicallyspeaking/2012/02/06/comparative-densities/

http://blogs.sas.com/content/graphicallyspeaking/2012/02/06/comparative-densities/

http://blogs.sas.com/content/graphicallyspeaking/2012/02/06/comparative-densities/

• We often need to create visualisationsto compare values

• There are a range of ways to do this

• Key things to keep in mind are:

• Are you comparing values or proportions?

• Are you comparing single values or distributions?

• Are you comparing across one or many dimensions?