Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

48
Illustrating data Making charts with Microsoft Excel Preparation Write on board Objectives Identify the best type of chart to communicate a data analysis or story. Outline heuristics for the effective chart design. Create basic charts with Microsoft Excel. - - - - Good morning. Thank you for joining our Instructor Development Program on making charts with Microsoft Excel. I’m excited because today we’re testing out a brand new lesson plan, which we hope to teach to students eventually. So I look forward to your comments in our post-session survey. === December 17, 2013 (Tuesday)

Transcript of Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Page 1: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Illustrating dataMaking charts with Microsoft Excel

Preparation Write on board Objectives Identify the best type of chart to communicate a data analysis or story. Outline heuristics for the effective chart design. Create basic charts with Microsoft Excel. - - - - !Good morning. Thank you for joining our Instructor Development Program on making charts with Microsoft Excel. !I’m excited because today we’re testing out a brand new lesson plan, which we hope to teach to students eventually. So I look forward to your comments in our post-session survey. !=== December 17, 2013 (Tuesday)

Page 2: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Visuals are an innately quick form of communication. ! “Seeing comes before words. And the [baby] looks and recognizes before it can speak.” (Berger, 1972) != = =

Page 3: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

a curved line with every point equal distance from the center

We are able to infer meaning from pictures much more quickly than from text. !Tests show that we can process the visual representation on the left 60,000 times faster than the text on the right. != = = !Source: http://edwardsanchez.me/blog/13589712 !

Page 4: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

fruit <

This phenomenon is known as the picture superiority effect. !Viewing pictures is more easily and frequently recalled than concepts that are learned by viewing the written word. != = = Source: (Wikipedia, Picture Superiority Effect).

Page 5: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

And therein lies the beauty of the chart: !“Charts display series of numeric data in a graphical format. They make it easier to understand large quantities of data and the relationship between the different series.” != = = Source: http://office.microsoft.com/en-us/excel-help/create-a-chart-from-start-to-finish-HP010342356.aspx

Page 6: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Because of our innate visual communication abilities, there is a long history of graphs and charts for conveying data. !Allow me to take you on a historical tour in great moments of charts. !The year is approximately 16,500 BC. Paleolithic era humans in southwestern France painted the Lascaux cave paintings of animals. !These dots on the wall = = = !

Page 7: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

turned out to be maps of the stars and the constellations: Orion, Taurus, and Pleiades. !So one of the earliest forms of visual data communication is maps.

Page 8: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Let’s jump to the 18th Century. This is William Playfair. !Born in 1759 Scotland during the Enlightenment, he was a failed silversmith who then dabbled in a number of different professions. He was an investment broker, a translator, a land speculator, a journalist, and even a blackmailer and convict. !He also found time to be a political economist. = = =

Page 9: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

As an economist, he invented the line chart in 1786. !Here it is: exports and imports between England and a few Nordic countries during the 1700s. !=== Source: Playfair’s trade-balance time-series chart, published in his Commercial and Political Atlas, 1786

Page 10: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

That same year, the first bar chart was born - illustrating Scottish exports and imports from Christmas 1780 to Christmas 1781. === Source: Exports and Imports of Scotland to and from different parts for one Year from Christmas 1780 to Christmas 1781

Page 11: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

And in 1801 he made the delicious innovation of a pie chart. != = = Source: Pie chart from Playfair's Statistical Breviary (1801), showing the proportions of the Turkish Empire located in Asia, Europe and Africa before 1789

Page 12: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Let’s move Stateside to the Civl War Era. !This painting by Francis Bicknell Carpenter in 1864 is of the First Reading of the Emancipation Proclamation of President Lincoln. !If you look to the right, <click> there is a data visualization. = = = !http://en.wikipedia.org/wiki/File:Emancipation_proclamation.jpg

Page 13: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Here it is. Near the end of 1861, with the American Union crumbling, President Lincoln became obsessed with this three feet long visualization. It is a map of the southern states covered with shading, with the darkness of each county reflecting the number of slaves who lived there. !Biographers noted that Lincoln had become obsessed with this infographic. !In it, he saw testimony that the American South was not a uniform bloc. Areas of heavy slavery tended to be secessionist, but the areas in between held the hope of pro-Union sympathy. And in Lincoln’s mind, this map showed the moral terrain of the region and was critical to his war effort planning. !So data visualizations have had an important role in the history of our nation. === Source: http://www.newyorker.com/online/blogs/elements/2013/10/why-abraham-lincoln-loved-infographics.html !Map showing the distribution of the slave population of the southern states of the United States. Compiled from the census of 1860 Drawn by E. Hergesheimer. Engr. by Th. Leonhardt.

Page 14: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

More recently, on August 25, 2012 an infographic left the solar system for the first time carrying a message for intelligent aliens. !On this day, the Voyager I space probe entered interstellar space. !In the space probe, there are the Voyager Golden Records, which are LP records that contain sounds and images selected to portray the diversity of life and culture on Earth. !They were intended for any intelligent extraterrestrial life forms, or for future humans, who may find them. The cover of the record had graphics with instructions for playing these records. === Source: New York Magazine, October 2013

Page 15: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Efficient communication !!Opportunity for instruction and research support digital literacies and scholarly communications !!Data are persuasive

From these stories, we see that the visual representation of data is a quick form of communication that helps us understand the world more deeply because of their analytical insights. !In academic libraries, data visuals can help us communicate effectively and efficiently in the reports we write. !Data visualization is at the intersection of digital literacies and scholarly communication, which are increasingly at play for the instruction and research support services we provide. !And academia is an analytical place, where data and evidence can be very persuasive, and presenting them visually is even more persuasive to promoting your vision or efforts. = = = !

Page 16: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Determine if a chart is needed !Pick the best chart for your data analysis and story !Design the chart for ease of reading and comprehension !Build the chart in Excel

This beginners’ class will help you make charts in Microsoft Excel for your own reports !or to consult with library patrons who are writing up a research project. !By the end of today, you will be able to <point to board> Identify the best type of chart to communicate a data analysis or story. Outline heuristics for the effective chart design. Create basic charts with Microsoft Excel. !To meet these objectives, we are going to explore four steps in building a chart. First, determine if a chart is needed Next, pick the best chart for your data analysis and story Afterwards, design the chart for ease of reading and comprehension Finally, build the chart in Excel and embed in a document

Page 17: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

1. Determine if a chart is needed

Table Chart

for ease of looking up values when the message is contained in the shape of the values

when precise values are required to reveal relationships among the values

Sometimes tables are the best format to present your data, and sometimes charts are better. How do you know when to use a chart? !You use a table for ease of looking up values and when precise values are required !You use a chart when the message is contained in the shape of the values and when you want to reveal relationships among the values = = =

Page 18: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

This beef temperature data are best presented in a table. The precise values need to be shown. And it’s easier to look up the values in a table. = = =

Page 19: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Here are Nick and Nora. Their caretakers wanted to monitor their growth, and created this chart. === Source: http://xiphias.livejournal.com/542646.html

Page 20: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

On the vertical axis is their weight. On the horizontal axis is the date from July to November. !You can see how well Nick and Nora are turning cat food into cat flesh. !The chart is helpful because you can see the shape and the relationships behind the data. For example, the two cats started at the same weight, and then Nick increased his weight at a faster rate than Nora. !There was a slight plateau in September, but afterwards, their weight increased at a similar rate. = = =

Page 21: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Data Table Chart

The birthdate of every student library employee

The rising and falling numbers of student library employees working in each semester from 1995 to present

Important historical events in British Columbia and the year they occurred

The correlation between the number of hours worked by student library employees and their academic success

At the bottom of page 1, we have a quick activity. Review the data and mark with an X whether you would use a table or a chart to represent them. !<click> !Here are the answers. To review, tables are great for looking up precise values. Charts illustrate relationships and shapes. = = =

Page 22: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

2. Pick the best chart for your data analysis and story

Congratulations, you’ve determined a need for a chart. !In step 2, pick the best chart for your data analysis and story. = = =

Page 23: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

What’s your quantitative message?

Value comparison

Time-Series

Ranking

Part-to-Whole

Deviation

Distribution

Correlation

The best chart will match the story you want to tell through your data. !What is your message? What is the relationship you want to display? !In fact, there are seven types of quantitative messages you can express with charts. They differ in how the different values relate to one another. !I’m going to give you some time to review the definitions on page 2 of your handout. !<pause> !Any questions? = = =

Page 24: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Common chart types Histogram

Now let’s look at five commonly used charts. They’re listed on page 3. !With the histogram, there are bins that represent a category, and the area of each bar represents the count of items in that category. = = =

Page 25: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Pie chart 7%8%

10%

11%

29%

35%

In the pie chart, each slice represents a percentage value of the whole pie.

Page 26: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Column/Bar chart

Next is the column chart, which is also known as a bar chart. !The rectangular bars are proportional to the values they represent.

Page 27: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Line chart

0

25

50

75

100

April May June July

In a line chart, data points are in a sequence like time, and they’re connected by lines.

Page 28: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Scatterplot

Finally, the scatterplot displays data points for two variables along the horizontal and the vertical axis scales. !Here is a plot of Old Faithful eruptions where each point shows the time between eruptions and its duration. != = =

Page 29: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

We’ve looked at 7 quantitative messages and 5 common chart types. Let’s match them up on what chart to make for the data story you want to tell. Check out pages 5 and 6 of your handout. !For a nominal comparison, the bar chart helps differentiate the various categories. !Time series are well served by line graphs to track the changes over time. !Ranking relationships benefit from a bar chart for the relative order of the different categories or items. !For part-to-whole relationships, use the bar chart or the pie chart to show the different proportions. = = =

Page 30: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

For deviations, bars can be used to emphasize the negative and positive difference from a reference point. !Frequency distributions are good with histograms. !And finally, scatterplots are good for correlations. The location of the dots encode values of the two different measures on the horizontal and the vertical axis. !To review, there are 7 quantitative messages. And there are five charts that are helpful to communicating these messages. = = =

Page 31: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Before we move to the next step, let’s review the anatomy of a chart. !I’ll give you a couple of seconds to review page 7 of your handout. !<pause> !I want to stress one part. Normally, the horizontal axis represents the independent variable. The independent variable is the measure that the researcher/observer has control over in the research design. In this case, it is date, the researcher picked these dates to observe, he has control over that. But he has no control over the rainfall on those days, that’s Mother Nature’s job. Other examples of independent variables include time or category. !Before we continue, are there any questions about the parts of a chart? = = =

Page 32: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

3. Design the chart for ease of reading and comprehension

In the previous steps, you determined your quantitative message and the best chart to communicate that. !Before we build a chart, let’s look at principles that will help you design your chart for ease of reading and comprehension. !I refer to kaiseki, the traditional multi-course Japanese dinner that is analogous to Western haute cuisine. !Making these small, simple dishes is in fact complex with a lot of principles at play. = = = !

Page 33: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

We’re going to review design heuristics for keeping charts simple so that they are easy to understand. !There is a lot going on in this chart. !There are four scales across. There are lines criss-crossing. They are scores at the bottom. !I’m not sure what all this means. = = =

Page 34: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

The first heuristic is to limit the number of stories you tell with a chart. !Creating separate charts for different narratives can be easier to understand. !Here the earlier chart has been separated into four individual ones. Easier to understand. !Descriptive titles are helpful. Write a title that articulates an analytical insight. Rather than “books checked out by month”, try “more books checked out during the fall semester at the library.” = = =

Page 35: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

5

10

15

20

0 3 6 9 12

Secondly, show the data - make them prominent. I can barely see the data points. = = =

Page 36: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

5

10

15

20

0 3 6 9 12

Much better. The dots are prominent and the lines connect their path. != = =

Page 37: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

5

10

15

20

0 3 6 9 12

Principle 3. I’ve used contrasting colors and I can easily see the different data series. !But I’m confused as to what the axes mean. What do they depict? = = =

Page 38: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Cou

nt o

f litt

er o

n th

e Va

ncou

ver t

est S

kyTr

ain

car

0

5

10

15

20

Hours of operation

0 3 6 9 12

Millennium Line Expo Line Canada Line

Number 4. Use text labels to add detail and clarity. !We’ve labelled the axes with hours of operation and the count of litter on a subway car. There’s a legend at the bottom that explains the different line colors.

Page 39: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

50

100

150

200

April May June July

Principle 5. !Help the reader to read quickly. !Here is a stacked column chart, I have to conduct some mental math to determine the size of the green tops.

Page 40: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

25

50

75

100

April May June July

It’s easier for the reader when we separate the stacked columns and cluster them together like so. != = =

Page 41: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

25

50

75

100

Month

April May June July

Number 6. Let chart junk go. Remove design features that don’t help explain the data. !Here we could remove some of the grid lines for a cleaner look. We could also remove the month label at the bottom since it is redundant. = = =

Page 42: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

25

50

75

100

April May June July

It looks a lot better with these changes.

Page 43: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Cou

nt o

f litt

er o

n th

e Va

ncou

ver t

est S

kyTr

ain

car

0

5

10

15

20

Hours of operation

0 3 6 9 12

Millennium Line Expo Line Canada Line

Principle 7. Explain the data by responding to journalistic questions

Page 44: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Cou

nt o

f litt

er o

n th

e Va

ncou

ver t

est S

kyTr

ain

car

0

5

10

15

20

Hours of operation

0 3 6 9 12

Millennium Line Expo Line Canada Line

Litter on sample Vancouver SkyTrain cars on Dec 17, 2013 Cleaning services needed by 9th hour of operation, particularly on Millennium and Expo lines

I’ve added a title that helps answer some who, what, when, where questions. Litter on sample Vancouver SkyTrain cars on Dec 17, 2013 !I’ve also added a subtitle that articulates an analytical insight. Cleaning services are needed by the 9th hour of operation, particularly on the Millennium and Expo lines. = = =

Page 45: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

17.5

35

52.5

70

April May June July40

80

120

160

200

April May June July

Sample A Sample B

Finally, be consistent to prevent distortions and disorientation. !Use consistent intervals and use similar scales for separate charts that are related. !These two charts in fact … != = =

Page 46: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

0

17.5

35

52.5

70

April May June July

58

70

43

55

40

80

120

160

200

April May June July

5870

4355

Sample A Sample B

illustrate the exact same data, but adjustments to the scale can give a different impression of the two samples. !There you have it, 8 principles for keeping charts easy to read and understand. = = =

Page 47: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

4. Build the chart in Excel and embed in document

Enter data on a worksheet

Insert tab, select chart

Cut and paste chart

With all your prep in the previous 3 steps, let’s build the chart. !I’m going to demo the process. There are basically 3 parts: enter data into a worksheet, click the insert tab, and select a chart, and then cut and paste your chart into another document. = = =

Page 48: Data visualization presentation - Making charts with Excel - with notes - UC Berkeley Library IDP

Identify the

data story. Use Excel;

make visuals simple.

Before I start with the demo, I want to summarize the discussion component quickly in the form of a haiku. !Identify the data story. Use Excel; make simple visuals. != = =