Showing posts with label Heat Charts. Show all posts
Showing posts with label Heat Charts. Show all posts

Monday, December 17, 2012

Excellent use of Excel for Heat Mapping of Data

Best quote from the article: "John Nelson's charts and maps on traffic fatalities are a reminder that a good data [visualization] doesn't always require graphic design chops -- or software."

And how!

Check out the rest of the article to see some really lovely heat maps. If you want that powerful pattern recognition factor built right into the human brain to work, feed it visuals like this.

Thought you'd all enjoy,

Excel_Geek


Updated: I forgot to link to some of my own Heat Chart related stuff.

Sunday, February 27, 2011

Heat Charts are so easy in Excel 2007

Before you roll your eyes and say, "Welcome to life after 2003, Excel_Geek," let me just say, "I know, I know." The driver for this project was that I was analyzing my website traffic using my Google Analytics account. I noticed a few things.

One was that "heat chart" or "heat charts" seems to be a pretty popular search term for folks to find me. I've obviously done a couple of heat chart projects, but back when I was still using 2003, so in order to create them with more than four colors (the limit to Conditional Formatting in 2003), I had to do write some VBA code to accomplish it.

Another thing I noticed what the rhythmic up and down of my site traffic. There were a few major spikes -- March Madness season, college football bowl game season, and one recently when @MSExcel mentioned me in their Twitter feed. What I wanted to further analyze, though, was if there was any pattern to traffic patterns based on Day of Week and recency of blog posts.

I combined these two findings and decided to do a heat chart incorporating both Day of Week and recency to blog posts. Here's what the chart itself looks like:



Along the way I used some other favorite techniques along the way: indexing the data (so I'm not sharing my actual web stats...hey, that's my business), a trick to convert a list of dates into a list of days of the week, VLOOKUP using TRUE instead of FALSE (whatever for? right?), and using SUMPRODUCT to create COUNTIFS and SUMIFS functions that will be backward compatible to Excel 2003 and earlier. I highlighted the creation of the heat chart and these other techniques in the source file, which I'll be sharing with my Insiders Subscribers.

Later,

Excel_Geek

Sunday, January 11, 2009

Heat Charts for Crime Stats Analysis

I recently got a request for a $50 Project from Kurt Smith with the San Diego County Sheriff's Department Crime Analysis Unit. (Cool, huh?)

Kurt wanted to apply the heat charting techniques I've posted about before to crime statistics on a Time-of-Day vs. Day-of-Week form. He shot me over some sample data on vehicle thefts. A simple Copy --> Paste Special... --> Values operation later and here's what we've got...



I'm obviously biased, but I think heat charts is a great way to visualize this sort of data, which can tend to get lost in tabular form. In this example, you can easily see the clustering occur just after midnight on the weekends.

The SDSD's apparently got a few Excel geek's on staff, as Kurt tells me that their resident Excel afficianado, Ted, has "...played with it and built some other ranges that approximate standard deviation, 'thirds' and so on from percentiles..." and that they're "...going to begin using it to replace our Excel surface charts for when particular crime types are being reported (we use split times and some aoristic analysis, depending on the crime)..." Whoa...slow down...you're losing me, Kurt.

Kurt also tells me that Lincoln's very own Police Chief Tom Casady is a stats/spreadsheet junky, too. Who knew this? Apparently there's a whole hidden world of Excel geeks: Cops! I'll have to subscribe to Chief Casady's blog.

Excel_Geek Insiders subscribers, I've sent this file out before, but just in case you've lost it, this new version is on it's way.

Later,

Excel_Geek

Monday, January 22, 2007

Heat Charts, Another Creative In-Cell Charting Technique

I recently completed a $50 Project for a client who wanted to create visual "heat charts" from data in a matrix. What's a "heat chart" you ask? Well, basically, it's a color-coded representation of the relative data values contained in a data set. What?

Ok, so say you've got four columns of data in four rows: The columns represent the four seasons of the year, and the rows represent four different cities around the world. The data in the matrix might be the average midday temperature in each of those cities over each of the four seasons. A heat chart would represent this data showing the hottest (highest) value as bright red, and the coldest (lowest) value as deep blue, and everything in between would fall on that spectrum from red to orange to yellow to green to blue. Now, obviously, a heat chart can be used to represent any data, not just temperatures...

Here's a picture so you can see what the heck I mean:


(Click on the image to open it up larger in a new window.)

How's it work? Well, basically I just use some formulas to convert the values in the matrix into an "index" from 0 to 100, where 0 is the lowest value in the chart (or another user-specified minimum value) and 100 is the highest value in the chart (or another user-specified maximum value), and all other values in the chart fall somewhere, proportionately, in between.

Using the values in this "index" version of the chart, (using VLOOKUP) I reference each the RED, GREEN, and BLUE values for the RGB color representing that index value from a predefined COLOR SPECTRUM table.

Then, with a macro in the ThisWorkbook object, I automatically set the background color (using the RGB property in VBA -- i.e. "cel.Interior.Color = RGB(RED_VALUE, GREEN_VALUE, BLUE_VALUE") every time the sheet is changed.

This together with some general cell formatting, data validation, and some other macros to help automate adding and subtracting rows or columns, and there you have it.

Pretty cool if you ask me.

Later,

Excel_Geek