Monday, January 13, 2014

KO Your Data with DQ

The decisions you make using data are only as good as the data themselves. When you look at a score in your gradebook, review a report from the state about test scores, or access a national database with discipline data, you're depending on quality data.

There are lots of things that go into building data quality (DQ). Some aspects are more technical---does the student's name use alphabetic characters (no numbers or symbols)? Others are more utilitarian---is the student's name in correct column? Is it spelled correctly? Is "John Smith" the same as "Johnathan Smith" or "Johnny Smith" or "J. Smith"? And some attributes are more about what the data represents---is the score for John Smith really his (and not some other student's)? Is the score in the box from the most recent math assessment (and not the reading assessment)?

Data quality isn't just one person's responsibility. It's everyone's job, whether you're collecting, entering, or using data. It's also a far bigger issue than I can cover in one post. If you're looking for additional resources, check out the Data Quality Campaign. I also advise you to develop your own bullshit detector, because a lot of what going into using data sets is questioning whether or not they make sense. For example, if one school is reporting 60 suspensions a year...and another school in the same district that is the same size is reporting only 2...you might want to ask a few questions.

For today, however, let's talk about a few things you can do in Excel to help with the technical components of data quality.

Excel has several options for cell formatting, including all sorts of customizations you can design. Sometimes, it even tries to be helpful by deciding what format you meant. Perhaps you, too, have been the victim of adding data like 9 - 12 only to have Excel automagically change it to 12-Sep. And when you change the format to specify Text, it further mangles your original entry to 41894 so you have to start all over again. Things like this show you how easy it is for data quality errors to creep into your workbook.

Other times, you may inherit or download a workbook where data quality has not been a priority. At this point, looking for data quality issues becomes a lot like data cleaning.

Now is the time to whip out a few of those functions that you always wondered why they were there: ISTEXT, ISNUMBER, ISNONTEXT, ISLOGICAL, ISBLANK. I know, these seem like "duh" formulas---why do you need a function to tell you whether or not there is text in the cell? Because like our sample above and our list of options, looks can be deceiving.

Here are a couple of examples of how they work. For a full list of IS functions, definitions, and examples, visit this page. Using a formula like ISTEXT or ISNUMBER returns a value of TRUE (Yes, the information in the cell is text/number.) or FALSE (No, the data in the cell isn't text/number.) They are written like this (evaluating whether "Excel Rocks" is text):





And look like this after you hit Enter:





Here's how things look for a FALSE statement using ISNUMBER:





And after:





But let's face it, you're not likely to create an an entirely new table of true/false values and then identify things from there. It's more likely that you would combine these with conditional formatting to highlight the types of data you have.

If you have a data table like this one (data source here):


You can combine these simple statements with some conditional formatting to get a quick visual for your data and easily spot problems.


I've applied two rules to the section of the table with the data. The first identifies numbers and the second text. I chose some fill for the cells, but you could just as easily pick something else.


Remember, Excel can be conflicted about things. For example, the cells with the dashes are formatted as numbers, but Excel is still reading them as text. This is why it's always important to do a quick check for data quality issues either before you submit or before you use a data set.



Depending upon your role, you have some decisions to make. We have cells in our data table that are blue---meaning that they contain text. If these were data I was going to upload to a database or otherwise share, then I need to address these DQ issues. If I'm the database administrator, I might wonder why these cells aren't calculated like the others and need to investigate some code. If these are data that I am going to use for making decisions about where to direct resources for next year, then I'm going to need to find additional information.

Keep in mind that Excel functions a bit like a spell checker in these situations. It can tell you if the right sort of data is in the right spot---but it can't tell you if the names and numbers are the correct ones for those cells. You'll need additional validations for that...or a really good eye and careful work.

Data quality starts with you---from how you enter attendance, label your gradebook, or even type a student's name. But you can use Excel to help you along the way. Building a culture in your school that includes DQ at all stages can lead to better decisions and outcomes.

Tuesday, January 7, 2014

What's the Story, Morning Glory?

The tagline for this blog is Use data to tell your story. In fact, that is also the title of a few presentations I've been doing in 2013 (and am scheduled for in 2014). Whether you use Excel, R stats, Google Apps, or other tools, finding the story in a data set is a complex set of circumstances. Sometimes, you feel like you are trying to divine meaning from a set of numeric entrails. It's often difficult to know where to begin...or, when you're finally at the end, to feel 100% confident that you have honored the best story.

It's important that you be the storyteller. Yes, I know, many of you work in districts where some sort of software will spit out reports for you. Maybe it's your gradebook or benchmark testing. Those reports can be very convenient, but I would like to remind you that they are a developer's idea of what you need---they may not provide the level of insight (or quality of visualization) that supports your work. I know they save time, but with so much riding on the decisions made from these, shouldn't they be all that they can be? Don't settle for this junk. Own your story.

Exhibit OMG: Typical DIBELS Report

But where to start? Whether it's the scores from your gradebook, the annual data dump from state testing, monthly fiscal updates from the business office, or a download from a benchmark testing site, we're all faced with the same question: Now what?

Here's the deal. Working with data is messy. I'm not going to give you any hard and fast rules here ("When you have x data, always do y!"), because frankly, they don't exist. However, we can look at some workflow ideas that will build your capacity to interact with your data. I promise that you won't have to reinvent the wheel everytime. If you know you're going to get DIBELS data every two weeks...and report card scores every six...take the time to figure out your strategies once and then apply them consistently.

So, let's start with the same data set as the previous two posts. It has both categorical (ethnicity; staff and student) and longitudinal (2004 - 2013) data. You may work with a lot of data that has similar features. For example, a gradebook has both categories and time-bound information. So does a fiscal spreadsheet a school business manager might use. You can download the workbook for this post here.

Clean the Data
This idea needs a separate post, but for now, let's just acknowledge that you often get stuck with "dirty data" that you will have to spank into shape. Are the numbers formatted as numbers? Do you have missing data points...and is that okay? Is it organized and labeled, ready for use in charts? What about data quality---are the data valid and accurate? (This last idea is also another post unto itself, which we will save for later.)

Explore the Data
When you have a new-to-you data set, and it's all tidied up and ready for church, make a few different charts. Remember, the reason we make charts and graphs, instead of only using tables, is because we are reducing the cognitive demand while increasing the amount of understanding. By this, I mean that it would be very difficult, at best, to keep all the numbers in the table in your head while simultaneously interpreting the results. A picture really is worth 1000 numbers. 

Which ones, you ask? Do you start with a line chart? A column/bar chart? A scatter plot? You may have to try more than one. I always recommend the Chart Chooser as a starting point.

It's not the only tool out there to help you think through what you might want to look at. You might also like the Visualization Options over at Many Eyes. Or the Classification of Chart Types over at the Excel Charts blog. If you really want a deep dive, bigger ideas than just the charts themselves, read Resonate by Nancy Duarte (it's free!). Find something that helps you think through what you want to show (e.g., part-to-whole, relationships...).

Get in there and make a couple of pictures. At this stage, it's okay if they're ugly---they won't be your final products. You just need to see what story to pull out.

We did this in previous posts. We looked at a column/bar chart using these data and a line chart. They're totes ugly. However, they do show us a couple of things. First of all, we can see that only one population of students has had consistent growth over time (Hispanic), another has had a significant decrease (White), and the rest have remained about the same. For staff, there is not as big of a story, but it echoes what we see with the student data. The number of Hispanic teachers is increasing (3.5 to 4.9%), the number of White staff is decreasing (90.4 to 87.6%), while the rest remain steady.

So, now we have a better idea. We need something that highlights the two changes (or at least one of them for further discussion).


Tell the Tale, Nightingale
A lot of people think making a basic chart is the end. Even if you see what you need to see, be sure to clean them up. Beyond that, extend your thinking about the best way to show the data.

What about a "win-loss" chart for these data?



This is just a basic column/bar chart in Excel, except I've had it plot the overall change, instead of year-by-year. There may be times when we care about the data for in-between years---when we're trying to spot patterns in the fluctuations among groups. But perhaps it's better to just cut to the chase using a chart like this one. The drawback to a chart like this is that it doesn't give you a perspective on the proportions of each population as a part of the whole. Sure, white kids aren't as numerous as before, but what we can't see is that they're still close to 60% of the total.

Or, what do we notice if we plot the data as small multiples?

This type of chart is a combo of several charts, allowing you to make comparisons among groups. (Jon Schwabish has a great tutorial for creating small multiples using Excel.) The big thing here is to keep the axes among all the charts the same and to line up your charts so it is easy to compare across groups. I could have also done this version as a column/bar chart or even separated students from staff. These charts could even be reduced further to sparkline form, and we'd still get the idea. I always find small multiples to be a very busy way to present data, but they do allow you to spot patterns---and, especially, common patterns---much more easily. For example, in every case except White, there is a greater percentage of students than staff for a particular ethnicity.

Which one is the "right" one? No hard and fast answers here. Like any story you tell, you need to consider your audience and purpose. Sometimes, the audience is just you, the teacher, trying to decide where you need to go with your instruction tomorrow. Other times, you are trying to build a case for a school board to allot money for a capital project. Or influence policy. But the students we serve deserve the best stories we can share. Take the time to develop the best one you can.

Bonus Round
Did you know about HelpMeViz? It's a place where you can both give and receive support for data visualization. Go have a look, offer your ideas, or seek feedback on a project of your own.

You might also enjoy accidental aRt, a tumblr devoted to visualizations that turned out a little more interesting than anticipated.

Wednesday, January 1, 2014

When Excel Gives You Lemons, Part II: Line Charts

In our last post, we looked at how to take a default column (bar) chart in Excel. Most of the same "clicks" we used can also be applied to a line chart. Keep in mind that these are not hard and fast rules, just some guidelines to help you along.
  • Add a title with description and label axes, using simple text/numbers.
  • Reduce the data-to-ink ratio by reducing the intensity (e.g lightening up) axis and grid lines, axis labels, and font colors; and, removing tick marks.
  • Use color and data labels to emphasize main points.
If we start with the same data set on the ethnicity of Washington K-12 staff and students from 2004 - 2013, we get this as a default line chart:

Who needs eyebleach? Maybe a unicorn chaser?
I don't like a line chart for these data any more than I liked the basic column/bar graph. There's nothing wrong with using a line chart, per se. It shows all the data points---both categorical and over time. But because of the way our brain automatically assigns differences to groups of items vs. individual, it really draws the eye to the "white" data. And if that was the story we needed to tell, that would be okay...but it isn't. We'll get back to this in another post.

So, let's talk about this line chart for a moment. The default colors here are really a problem. If we're going to display staff and students on the same chart (and there are good reasons not to), then even a basic clean up of the line colors can help the audience make some comparisons between staff and students of a particular ethnic group. I also recommend labeling the lines, instead of using a legend. If we do these things (the bulleted list above and these additions), here's what we get:

Ahhh...that's better.

That's not too shabby. While I still don't like a line chart for these data, I do think that it does a good job of showing the relative proportion of the ethnicities and gives a bit more story. The populations of Asian,  Black, and American Indian students have held fairly steady over the last 10 year and kept their rank (by number) over that time. (I.e., Asians have always had the third largest population of students...Native American the smallest.)

Do we need the marker points and all of the data labels? Personally, I don't think it's necessary with this particular chart. Why not? Because we're not trying to make direct comparisons between the groups. It's not the big idea. That being said, if you wanted to add marker points, I wouldn't fuss. If you really need all the data labels and your chart is looking too busy, consider adding a table with the data for those who need the deets.

Meh.

Again, with less than five minutes of work on a basic chart, you can have a big impact with your message. We still have some digging to do. What is the best way to present these data? What is the "So what?" of student populations rising/declining---do we also need to consider professional development needs of teachers, test scores, geospatial data (is the effect the same throughout the state), and so forth? But all of these start somewhere, usually with a data dump like the one we've used here. The more you do to communicate and present your data effectively, the more clearly the next steps will appear.

Bonus Round
You can download my anatomy of the redesign here. Again, it is not intended as a "Thou shalt...," but is offered to provide a reference of where to click and ideas to consider as you build charts of your own.


Saturday, December 28, 2013

When Excel Gives You Lemons

Earlier this month, I was presenting to a room full of educators. The focus was on all the things that go into communicating effectively with charts. This was certainly no in-depth workshop...we could have spent days kicking around ideas and working through all the questions. It was more of a discussion about why we (in general) do a crap job presenting data when there is so much riding on these.

But, I digress.

After the presentation, someone asked me if I had a "cheat sheet" of what to click in Excel to do some basic tidying up. In other words, if Excel gives you a lemon chart, how do you add a splash of tequila and a dash of salt to make something more palatable? Brilliant idea...and no, I don't have one.

There are lots of great books out there about building effective charts (Read them!), and I won't claim that these can (or should) be condensed into a one-sheet you can post above your desk. But let's say you have five minutes to spend on improving a default chart in Excel. What would you choose? Where do you click on the toolbar? What settings can you change? I'm also going to set aside, for now, how you pick the chart...even though this is really the first step: What story should be told? We'll come back to some tools and resources for that in another post.

So, let's start with some data. You can download the Excel version here. The data are from Washington's Statewide Longitudinal Data System. This table shows the percent of staff and students, identified by ethnicity, for the years 2004 - 2013.



If you select the data and have Excel make you a column graph, here is what you get:
Go home, Excel. You're drunk.


For now, you'll just have to trust me that the line chart version isn't much better, because I want to talk about the options for those sorts of charts in another post. There are a few stories we could pull out of this data set to tell better (e.g. Hispanic students and teachers are the only populations with consistent growth over the past ten years), but sometimes, you have to start with a representation like this so you can figure out where to go with the story.

We're going to accomplish most of our work using the "Chart Tools" in the Excel toolbar--specifically, the Layout tab. If you don't see these, click on the chart and they should appear. You can also right-click on the chart to activate some of the dialog boxes.


Let's start at the top. We could use a title. And, if there's something specific you want people to pay attention to, you can also add a sentence with that information. As you can see, the default is None. (Thanks, Excel.) Personally, I prefer the Above Chart option to keep things clean. Once you select that, a text box will appear and you will be able to add your title. You can also change the font and its appearance. Note that your chart will resize to accommodate the title. If this skews the overall perspective, just drag things around until the ratios are better.


Okay, how are we doing? It's a start. For this title, I un-bolded the text (it will be bold by default) and took the font size down on the second line, as well as lightened the text to a dark gray, making things a bit easier to read. You don't have to go this far.



Let's talk axes next. Add them just as you did your chart title, using the next box on the toolbar. I recommend changing the default (bold) to regular text and lightening it up, too. When it comes to your vertical axis, make the choice to have a horizontal title. Although Excel will dump it in an undesirable spot, we can drag it into place. The thing here is that we're trying to make it easy for your audience to read the axis label. Don't make them tilt their heads like dogs to read sideways text. It doesn't take any more time to label it correctly from the start.

Now, let's move the legend to above (or below) the chart. I prefer to do this because it orders the legend the same way as what's shown in the chart. Like making the axis titles horizontal, doing so with your legend will ease the burden on your audience.

In about 10 clicks, we now have a chart that looks like this:


We still have plenty of time for a few more fixes. Let's attack those axes. Bring up the dialog box.

There are three options I almost always make use of. My purpose here, like un-bolding text and lightening up font colors, is to change up the data-to-ink ratio. That is, if the data are the stars of the show, then make them stand out. The lines and labels are important, but are supporting players. They can still provide value while being part of the background.

For both the horizontal and vertical axes, I remove the tickmarks and change the line color to a light grey. For this chart, I also change the numbering of the vertical axis so there are no digits after the decimal. Our purpose here isn't to have people notice the difference at that level. It may also be useful to play around with the units for the vertical axis. Do we need to have it cross at every 10...or is every 20 or 25 percent enough? I'm leaving things at 10, even though I think it's a bit busy, it also helps provide some better context about the size of the populations and their relative changes.

After I close the dialog box, I also click on the axis itself and lighten the font and reduce its size.

Finally, let's lighten up those gridlines. Some people would argue that you could eliminate them in most cases.

So, another 10'ish clicks, and we've really made some headway.


Yes, it's still a bit of an ugly duckling due to the default color choices of the bars, but if you had to run down the hall to a meeting with this, you'd be okay. You've added lots of context with your labeling, made the overall chart easier to read, and showcased the data.

When you have a style that you like, remember that you can save things as a template. Very handy for those times when you're asked to pull together some data on the fly.


In our next post, we'll take a look at the basic line graph settings. Later, we'll get into choosing a story for this data and exploring some color options. Y'all come back now, ya' here?

Bonus Round
Do you have a few more minutes to play with this chart? Without changing the style of the chart, what else can we do to make it tell the story a bit better? I know, it's a challenge...especially when we should probably spend more time developing a different chart for our story. But let's give it a go. I know many of you are often so pressed for time, you just have to go with the basics.

What about doing something like this?


In this case, select all the columns and change their fill to grey. Then, select the individual bars you want to fill. You can add data labels (and even add supplemental text to show the years) to provide additional context. Finally, delete the chart legend and change the colors in the chart title to match the fill color in the bars. In another 20 clicks, we've helped direct our audience a bit more.

You can download the anatomy of this redesign (pdf) here.

Download Me
In five minutes or less, you can take a basic column/bar chart in Excel and make it more meaningful for your audience. What other formatting would you apply?

Sunday, October 27, 2013

A Tale of Two Tumblrs

As Dickens might have said, had he been around today, "It was the best of viz...and the worst of viz." Or, as my mother might have said, "If you can't be a good example, you'll just have to be a horrible warning." You get the idea.

Two new tumblrs are collecting examples of data visualizations. One, called Thumbs Up Viz, posts examples of visualizations done well. I especially like this one on Kindergarten Readiness by Stephanie Evergreen (excel tutorial here).

by Stephanie Evergreen of Evergreen Data
It hits all the right sweet spots for me. A title that summarizes the chart, with a subhead that provides context. A dot plot that recent research suggests is superior to bar charts. Labels close to the data (which are set on a common scale). Good use of colour. Thumbs up, indeed. For those of you on teh twitters, there is also a #thumbsupviz tag you can follow or use to share your own excellent finds.


At the other end of the spectrum, there is WTF Visualizations for "Visualizations that make no sense." For example...

http://wtfviz.net/image/64871769069

Um, yeah.
There has been some chatter about whether this tumblr is appropriate/productive/okay. Is it just making fun...and if so, maybe that's not very nice. While I agree that if that is the point, it's not very nice. But the educator in me sees opportunity here. I've built many a set of exemplars in my time, and I have to say that bad examples are often better for discussion than good ones. What feedback would you give? How would you change instruction to support better work next time? What would make this visualization "good" and why? Outstanding work makes for great examples and models, but doesn't always lead to the kind of conversation we need about how we work with data. Maybe we need something more like Carto-Critique on Wired?

What do you think? How would you use these to guide your own work?

Friday, May 3, 2013

When a Young Woman's Fancy Turns to Thoughts of Excel

You might remember my Shaggy Dog story this winter about efforts to get an interactive workbook online. Even after I found a solution and did my happy dance, the project got shelved...with the caveat that we could pursue something in the spring. Well, it's spring and we're no closer to being allowed to put the project online; however, this may have been a good thing, because it has given me an opportunity to completely revisit things and derive a more elegant solution.

A couple of weeks ago, David Napoli shared this link to a Metro Style Dashboard by Erik Svensen. And while I couldn't directly use the information (I don't have Excel 2013 yet), it did get me thinking about how to update the look of my project---and more importantly, it let me know that slicers work with the Excel Web App.

Slicers, you ask? If you're new to Excel...or if you are still using a pre-2010 version...you might not have seen these. They go along with pivot tables (a piece of Excel magic that we haven't talked about in this space) to "slice" (filter) your data set into all sorts of views. It's probably easier to show you, so my example is below. It uses the same spreadsheet as the Shaggy Dog.

Start by highlighting the first cell in a table, then from the Insert tab, choose Pivot Table. When prompted, I added the pivot table to a new worksheet. This is the easiest way to wrangle your table, because it will be a dynamic item. Depending upon what you want to look at, the items showing in the table will change.

On the left is my pivot table...to the right of it is a dialog box I can use to build the pivot table. Notice that the headings from my original table (Unit, Category, Title, Description) are in the list of fields. I picked the first three for this project. Excel automatically placed them as rows, but I could drag these into any arrangement or hierarchy that I want.

I should share that this pivot table is unusual in that there are no numbers associated with it. Most people use pivot tables to look at the results of different groups...and this is very handy for teachers looking at student data, too. But for this project, I only have text. We'll talk about building pivot tables for your other data in another post.

Okay, now I can add Slicers. If your pivot table is highlighted, you can insert slicers from the Options tab on the ribbon.
Otherwise, just go to the Insert tab and choose "Slicer." You'll get a dialog box---just like the fields from the pivot table---to choose from. I picked the first two options this time, so here is what Excel gave me:
Slicers are like remote controls for your pivot tables. By clicking on any combination of buttons in the Slicers, you can call up any combination of data from the table. They also can move around in the workbook, meaning we can add them to a reporting tool. The defaults on the Slicers, like most things in Excel, are not very sexy. But, fear not, there are a lot of ways you can dress them up.

Now, I can build a report. I'm not going into the full details in this post, but you can download the workbook if you want to see the innards. With the exception of the pivot table and the interface you see below, it's all the same data set and formulas as the Shaggy Dog. I moved my Slicers and built a simple display.

The slicers are on top, in a two-by-two arrangement. Depending on the buttons selected, the list of items changes. Better yet, you can upload this workbook to a SkyDrive account and put it on the web. Like this:


You can click the "View Full Size Workbook" button in the lower right corner of the window if you don't want to deal with the scrolling. (When you embed workbooks, you can change the size that shows, but we have some other design constraints here based on my blog design.)

This is a very simple application, but you can certainly take it a lot further. The one I (re)built for work has a block of color to show the user how many resources are available. If you used a tool like this to get a view of what was happening across classes (or classrooms), you could also build it out with a variety of charts or other visuals.

It's spring. Get out and play!

Sunday, March 17, 2013

ASCD 2013: Meet the New Data Tools

They're the same as the old data tools. 

I'm at a conference this weekend. It's ASCD's annual conference. For those of you unfamiliar with this organization, it's mission is to develop "programs, products, and services essential to the way educators learn, teach, and lead." It is my all-time favourite conference and the place where I get the greatest amount of professional learning.



Like most conferences, there is an exhibit hall here...a place for vendors to strut their stuff. I like a brisk walk through the aisles. I don't like stopping long enough for a badge scan (and the ensuing spam in my inbox), but it is always good to see what the trends are. Or, if you're like me, keep an eye out for what's happening with data visualization options for education.

Spoiler alert: It isn't pretty.

I should clarify here and say that there are no data viz tools specific to education. Rather, I was looking for software that helps capture and report educational data: gradebooks, course/content management systems, and so on.

The first two things that caught my eye were meant to be more traditional tracking/reporting tools. I talked to reps from each company, asking them about the development process for their products. When I specifically asked who determined what their reports looked like, they said "our software engineers." I pushed a little further---didn't they have anyone with data viz expertise at least provide some input on things? Nope. End of story...so I moved on.

The third vendor had a content management system for teachers to build online lessons. It was connected to a reporting tool that could show the teacher progress, notes, etc. I had a lengthy discussion with a rep here, not because their stuff is particularly good or bad, but rather about the theory that underpins the need for the software. For example, they had previously built a "standards-based gradebook" based on teacher input...only to discover that the tool didn't represent best practices in grading. What had happened was that the teachers wanted to say they were doing that sort of grading, but in name only. The philosophical differences that should have driven the tool didn't get implemented. Ah, a company that is starting to wise up. Their visualizations for teachers were okay---better than I had seen, but nothing that knocked my socks off.

As I was leaving the exhibit hall, I ran across one tool that did. And it pains me to say the name, because there is so much else I do not like about the company...but it's Pearson. Good use of sparklines...well-selected color schemes...even some bean plots to show some of the distributions. Someone has been providing good counsel on what the best charts are to use for the various forms of data in the system, and I applaud that.

I'm still keeping an eye out for additional tools for schools. If you've found a vendor that you think deserves a shout-out, let me know and I'll add them to the list!