Lightboxing Images in Excel

I received an email out of the blue yesterday asking if its possible to put pictures in Excel comments:

I am working on a media report based on creative templates and wanted to give the end user easy access to a view of the creative and my thought was it would be neat to have the ability to build in a comment like function but with graphics.

As far as I know you can't put images in comments, but maybe we can do better. Web developers have developed a technique called Lightbox that was pioneered by Loresh Dhakar. When you click on a thumbnail the image opens full size in the center of your browser screen and the background is grayed out. Check out an example here.

Can we do the same in Excel? Absolutely. Download these two files to see how.

Excel Lightbox.xls

media.jpg (save to the root of your C:\ drive)

Here's a simple report in Excel Lightbox.Excel Lightbox before showing the image

Clicking the Show button brings up the lightbox view. The image is dismissed by clicking on it.

Excel Lightbox before showing the image

This could be improved and extended in lots of ways. The image could be fetched from a URL. Thumbnails could be automatically generated. I'd love to see your ideas on how to extend this.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

12 comments | Show all comments only the last 5 are shown


November 24, 2006
Chris said:

Del,

Inserting picture comments is actually quite easy--a reader has sent me a wonderful example of how to do it. Now, inserting a thousand comment pictures might not be too wise, but here's the nub of how you do it.
<pre>dim cmt as Comment
dim sFile as String
dim rng as Range</pre>
<pre>
set cmt = rng.AddComment
cmt.Text Text:=""
cmt.Shape.Fill.UserPicture sFile</pre>
sFile is the path to the image, rng is the range you want to add the comment to. If you send me your email, I'll send you a sample spreadsheet.

Chris


November 27, 2006
del c said:

Of course: it's just occurred to me that the actual information itself would be held in the comments, not a reference to a file held safely elsewhere. Nevermind :-)

I'll stick with hypertext references, which is what I used the last time I wanted to use an Excel spreadsheet as a database while also letting my audience easily consult a picture of what the line they were reading was describing.

Now, if your lightbox script technique works to grab an image held on the same medium, but outside the spreadsheet, thus avoiding bloating the spreadsheet file size horribly, that would be what I was thinking of, which would clearly be more elegant than using comment boxes.


November 27, 2006
Chris said:

Del, good news!

<blockquote>
Now, if your lightbox script technique works to grab an image held on the same medium, but outside the spreadsheet, thus avoiding bloating the spreadsheet file size horribly, that would be what I was thinking of, which would clearly be more elegant than using comment boxes.
</blockquote>

That is exactly what the lightbox script does.


December 6, 2006
Jon Peltier said:

Patrick -

"Google is your friend"

Google is one of my best friends, one of my favorite programming tools. But it takes a little imagination, first in thinking of Google; then in thinking "I don't think I can put an image into a comment, but maybe it's possible"; then in thinking of lateral solutions, like the image in a comment vs. the lightbox approach seen here, and the tradeoffs inherent in each (filesize, vba or not, etc.).


December 20, 2006
SkyZ said:

I am Sorry, I cannot Download the File :Excel Lightbox.xls
Could You Send Me a Mail as Attachment?
Thank You Very Much!

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment





Godin, Tufte and Types of Infographics

A few days ago Zach wrote about Seth Godin's take on Edward Tufte. You know you're really onto something when your first three comments include: "Seth Godin is out of his gourd and totally wrong." and "Hallelujah, Seth!!!!!" (note the five exclamation points).

Let's start with some facts:

  • Godin is a provocateur. "I think this is one of the worst graphs ever made," he says about the Napoleon graph. That's hardly a well-reasoned statement—but it makes a point. Personally, I think Godin's in way over his head when talking about what graphs are for.
  • Tufte is a provocateur. "This is, for example, the conclusion of sparkline analysis in Beautiful Evidence, where the idea is to make our data graphics at least operate at the resolution of good typography (say 2400 dpi).", he writes. This provocation is more subtle than his well documented aversion to PowerPoint. He's saying that a computer screen is not an effective tool for data graphics.
  • We are provocateurs, too. Pitting these luminaries against each other with only a brief amount of context is a recipe for delightful blog swirl and discussion.

In a battle between provocateurs it's best to at least keep your sense of humor about you. You should also be careful and clear when defining your terms.

There are at least two categories for infographics: exploratory and explanatory. A great example of exploratory infographics is what Hans Rosling is doing with Gapminder. This shows us that we can use infographics to go on a personal journey of discovery to understand data. I choose what questions to explore and how to represent the data. Exploratory graphics can be quite complex because I maintain a thread of context in my mind as I explore the data. Animation is very useful here to help maintain context while changing dimensions.

Explanatory graphics are at best the distilled product of exploration and at worst, as Tufte often points out, a tool of deception. Explanatory graphics are often used to establish facts to guide a discussion. "We're selling more widgets than wodgets! The widget sales trend is up!". I'm sure this is what Godin is talking about: "I think you're trying to make a point in two seconds for people who are too lazy to read the 40 words underneath."

Tufte has done a great job at increasing awareness of good information display. On the other hand, he promotes graphs that are strongly tied to a specific context—a facet of the data that they are illustrating. For instance, the Minard graph is a story about the survivors of Napoleon's march. It does not directly illuminate the battles fought, or how men died, or the story of the armies that faced Napoleon, or the demographics of his army, or the strategic choices Napoleon faced. While this famous graph illustrates many dimensions, it obscures many others, and we need to be aware about this editorial judgment.

Tufte frustrates on a number of levels. He is enormously influential in business. Businesses send people to his seminars and they come back energized with the essential truthfulness of his message. Yet weeks later those principles are abandoned by the lack of practicality of his message. No one in business is going to design a graph in Adobe Illustrator as he can. They use Excel. Seldom can we spend days or weeks refining and testing a graph. The work must be done and then we move on.

Notes:

The Google Video links here jump directly to a point in the presentation. You can create direct links like this:

http://video.google.com/videoplay?docid=-4101280286098310645#17m26s

The #17m26s appended to the end of the URL jump you to 17 minutes and 26 seconds into the video.

Thanks for all the comments on the previous post, but I wanted to single out Jorge Camoes for a particularly level-headed comment. Thanks.

Some more discussion can be found at Emergent Chaos were Thomas Ptacek has posted an insightful comment.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

3 comments


December 10, 2006
Kurtis said:

You said:
No one in business is going to design a graph in Adobe Illustrator as he can. They use Excel. Seldom can we spend days or weeks refining and testing a graph. The work must be done and then we move on.

I reply:
True, but I created a set of "partially Tufte-fied" graphs and saved them in Excel's graph templates folder. They're templates -- I did the work once and can reuse it over and over.

Is my solution perfect? No: some of Tufte's design recommendations are difficult to do in Excel, which is why I call my templates only partially Tufte-fied. I've found that my incomplete measures are still much easier to read and understand than Excel's default ... and my colleagues agree.

YMMV


December 12, 2006
zaxl said:

Hi, some nice but sad infographics:

Lethal Beauty / The Allure: Beauty and an easy route to death have long made the Golden Gate Bridge a magnet for suicides

http://sfgate.com/cgi-bin/object/article?o=2&amp;f=/c/a/2005/10/30/MNG2NFF7KI1.DTL

You still can add a different color to differentiate by year, but it can be too much information.

regards,


January 22, 2007
zaxl said:

It's me, again. Now with Le Grand Content: "Le Grand Content examines the omnipresent Powerpoint-culture in search for its philosophical potential."

http://www.clemenskogler.net/grandcontent

regards,

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment





Godin's take on Tufte

Seth Godin's presentation at the Gel 2006 conference is a light-hearted romp through things that are "broken—illogical signs, confusing user interfaces, and flawed marketing tactics. Seth and Mark Hurst have an accompanying web site (This is broken) and a list of seven reasons why things end up broken. My favorite: "I'm not a fish" (people who create things but have no ability to put themselves in the position of the user) is at the core of our complaints about poor reporting interfaces.

My favorite part is when Seth takes on Tufte's favorite infographic, Napoleon's March to Moscow:

Tufte is really proud of this graph. He says this is the best graph ever made.

I think he is completely out of his gourd and totally wrong. I think this is one of the worst graphs ever made.

He's very happy because it shows five different pieces of information on three axes and if you study it for 15 minutes it really is worth 1000 words.

I don't think that is what graphs are for. I think you are trying to make a point in two seconds for people who are two lazy to read the forty words underneath

To make me take 15 minutes to study it doesn't make sense. And I thought about it and I was going to jump all over him, then I moved it to this section, 'cause he picked it because it is broken on purpose. For the kind of person that you want to reach, they want to read a complicated, difficult to understand graph and get the satisfaction of figuring it out.

Sometimes the best thing to do it so break it for the people you don't care about and just make it work for the people you do.

I think Seth has it just right. Personally, I can hardly resist a well-constructed infographic, but I have an unnatural interest in data. For the many business users, better to construct information displays that are simple and to the point.

P.S. In the comments, you'll find a thoughtful and heated debate about this graphic and the danger of simplifying information displays. Simon Raybould comments that we might benefit by deconstructing the Minard graphic to make it more accessible to certain audiences. With that same thought in mind, I had set out to find the underlying data for Napoleon's March. I thought it might be an interesting challenge to consider alternative ways to present this information—under the theory that different audiences require different approaches to absorb information. Here is the spreadsheet with the data—thanks to Robert Allison. It comes from this fascinating page that shows a gallery of re-constructions of this famous graphic.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

17 comments | Show all comments only the last 5 are shown


November 25, 2006
Simon Raybould said:

How about a mid-way compromise? I must admit I've used this graphic on my <a href="http://www.curved-vision.co.uk" rel="nofollow">presentation training skills courses</a> and got mixed responses. Some people think it's fantastic, something it's just awful. (Out of interest, I'm trying to look at their Myerrs-Briggs preferences 'cos I think it could be corellated.)

My current take is that it's got a lot of information and - once you've got your head around it - it's a great piece of work; but there's the rub as has been pointed out... you've got to get your head around it and work at it.

So surely the solution is to deconstruct it and show it incrementally in a series of building slides showing gradually more and more of the graphic? The solution to me would be to have a simple line showing the route but to have the wideline (the graph but) revealed a couple of months at a time, discussing the historical events that caused the width of the line (the number of men) to change.

Just a thought.

Simon


December 6, 2006
Databikkel &raquo; Blog Archive &raquo; Mooie dashboards ontwerpen said:

[...] Juice analytics heeft 1, 2 posts over een videopresentatie van Seth Godin waarin hij de beroemde Napoleon-grafiek, volgens Tufte de beste ooit gemaakt, afkraakt. [...]


February 8, 2007
Analytical Engine &raquo; Say it with Marimekko Charts said:

[...] PS: If you are interested in interesting ways to represent data, check out some recent postings from Juice Analytics (1,2) and Information Aesthetics blog. [...]


October 10, 2007
Mark Roudebush said:

I like Seth Gordin's presentation and thoughts on things being "broken". I think however we're all (Seth included) missing a large point.

Seth says, "I don't think that is what graphs are for. I think you are trying to make a point in two seconds for people who are two lazy to read the forty words underneath"

The idea that he mentions isn't relevant to the example. Napoleon's March is not a "40 word" story. Seth is right in the notion that graphs should help people understand larger amounts of information quickly. This graph takes a very large story/ data set and communicates it much quicker.


February 7, 2008
Matt said:

The ability to read graphs is not only necessary, but it marks high intelligence. Any educated human should be able to interpret data from a well made graph.

The amazing thing about this graph is that I just learned a lot about napoleon's march by reading it. Anyone who criticizes this graph should have second thoughts on the amount of data presented in this amazing piece.

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment





Top Resources for Analysts: Excel, Data Analysis, and Business Intelligence

[This is part two of a two part series. See the first post for resources about charting, visualization, and presentations.]

If you work with data for a living, the following sites are worth a visit (or a subscription) to learn from some of the best, most passionate practitioners. While we're at it, we are handing out our first annual Juicy Awards celebrating contributions to the analytics community. The categories are:

  1. Charts and graphs
  2. Information visualization
  3. Presentations
  4. Excel
  5. Data analysis
  6. Business intelligence

(Items 1, 2, and 3 were covered in part 1)

Here is an OPML file containing the finalists if you want to subscribe to these feeds (right click and save-as)

Juice Resources for Analysts.opml

***

4. Excel

The Juicy goes to Jon Peltier's Excel Page. Jon shares a wide array of detailed descriptions and tutorials on Excel features. He demonstrates a particular passion for Excel charting.

Best of the rest:

  • Process Trends: Kelly O'Day, a FOJ (Friend of Juice) has put together a bunch of tips and tools to help with presenting and working in Excel.
  • Daily Dose of Excel: A multi-author blog focused on advanced Excel capabilities (i.e. lots of Visual Basic) and the new Excel 2007.
  • Andrew's Excel Tips: Andrew demonstrates his exceptional Excel skills in this blog.
  • Tips and Tricks: A huge archive of (mostly) Excel tips.

5. Data analysis (mining, statistical, database marketing)

Winner of the Juicy is KD Nuggets. This is a data mining supercenter--not particularly pretty to look at but offering the data miner a vast directory of resources. You can subscribe to the newsletter here.

Best of the rest:

  • MineThatData: An active and well-researched blog about multichannel markeing and database marketing.
  • Jim Novo's Drilling Down: Not exactly a blog--but Jim does offer lots of fresh content about customer analytics.
  • Data Mining Research: A new find for me, Sandro Saitta reviews books and discusses recent news and applications of data mining.

6. Business intelligence in the enterprise

Winner of the Juicy: Enterprise Data Management, a blog by the VP of Product Marketing at Fair Isaac covering the business intelligence industry and practice. James Taylor has a rare corporate blog that is informative and passionate without feeling like a pitch.

Best of the rest:

  • Andy on Enterprise Software: Thoughts on data warehousing, business intelligence, and performance management from an industry insider.
  • Hired Brains knowledge repository: Here is a great group of articles and white papers about business analytics by Neil Raden.
  • Steve Krause Blog: Written by the VP of Analytic Product, CNET Channel. An interesting read covering a wide range of current topics, including commentary on the use and misuse of data.
  • Data Doghouse: "Unleashing observations on the business and technology of performance management, business intelligence, and data warehousing."
  • IT Toolbox nurtures a blog farm with dozens of IT-related blogs. Here is the section on business intelligence.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

7 comments | Show all comments only the last 5 are shown


November 9, 2006
James Taylor said:

I'm honored - I do try hard to be useful and I am glad you think I succeed! I thoroughly enjoy your blog also so keep up the good work.


December 4, 2006
Gregory Piatetsky-Shapiro said:

I usually enjoy reading your blog, but your Juicy award to KDnuggets doubled the enjoyment. Will work on making it more pretty to look at.


December 20, 2006
Dave said:

Great suggestions. Here's one for you... Use Grazr to allow us all to preview the feeds you're recommending:

http://grazr.com/config.html

You can imbed grazr in a webpage.

Not sure if this code will work in as a ccomment.

<a href="http://grazr.com/gzpanel.html?file=http://www.juiceanalytics.com/downloads/JuiceResourcesforAnalysts.opml" rel="nofollow"></a>


December 29, 2006
About James Taylor said:

[...] Top Resources for Analysts: Excel, Data Analysis, and Business Intelligence [...]


January 11, 2008
Indonesian Heritage said:

Great i never thought before .. thank you

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment





Finding zip codes close to an address

Just got an email from someone we work with:

I'm researching options for being able to find zip codes within a specific distance from a location. Thus far I've found a couple of desktop applications, ZIP Code Download’s Lookup GXE and Xionetic’s ZIPFind Deluxe, both for about $200.

I was curious if you had any experience or thoughts on either of those, or if you had any other product suggestions for this functionality. As an example, we’re looking to be able to define an audience consisting of contacts with ZIP codes between 20 and 30 miles from Chicago.

This is a pretty common problem. The applications referenced don't seem to bring a lot to the table. Why not stick with the tools you already know. Geocoded zip code lists aren't hard to find (the Yahoo Geocoder, for instance, lets you build your own).

So, here's an Excel-based tool that lets you enter a US address and returns zip codes within a certain number of miles of that address.

Find Zip Codes within Distance.zip

Address lookup is courtesy of the free Yahoo geocoder.

Note: This tool was updated to use the new Yahoo geocoding service.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

7 comments | Show all comments only the last 5 are shown


November 7, 2006
Daren Richardson said:

Awesome tool.

At first I tried playing with it a bit to see the number of zip codes around me.
Okay that was great, but not all that useful to me.

After a bit of playing with it, I noticed that the coordinates that it produced were in x,y format. Plugging that into a x/y scatter graph, unlocked some of the key extra hidden usefulness of this utility.

By adding a simple x/y graph, and extending the ranges on the returned coordinates, one could graph 50, 250, 1000, or up to 32,000 data points of zipcodes.

At lower levels, it showed the metropolitan areas around my city. Very neat! After a while, I managed to graph the United States (with Alaska) using solely returned data points. how cool?

If you'd like, I could post a file with generated scatter graph. It might be an awesome add-on to that tool.


March 7, 2007
Michael said:

Very nice tool - thanks! Are you aware of any similar tool(s) that works for Canada?


July 24, 2007
Jason Curilla said:

Awesome Tool! Thanks a ton. Is there anyway you can use the tool with UK Zip Codes?

Thanks again


January 9, 2008
zip codes said:

I would recommend http://www.zipcodesmapped.com/ for any US zip code map.
You can use this to find any US zip code maps. You can search by (City, State OR Zip). they have all the maps showing zip codes and major mile streets in all of the united states. The service is free. Search for five Digit Zip Code and find the Maps for all 50 states. A Free ZIP Code Finder which can do wonders for you. <a href="http://www.zipcodesmapped.com/"> Zip codes </a>


February 5, 2008
zip map said:

I would recommend http://www.zipmap.info/ for any US zip code map.
You can use this to find any US zip code maps. You can search by (City,

State OR Zip). they have all the maps showing zip codes and major mile

streets in all of the united states. The service is free. Search for five

Digit Zip Code and find the Maps for all 50 states. A Free ZIP Code Finder

which can do wonders for you. <a href="http://www.zipmap.info/"> Zip Map</a>

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment