Online Chat

Use the window below to chat with me (if I'm online ...)

Use the edit nick field above to let me see your name.

cazh1: on Business, Information, and Technology

Thoughts and observations on the intersection of technology and business; searching for better understanding of what's relevant, where's the value, and (always) what's the goal ...

Saturday, January 17, 2009

Hacking the Google Chart API from Excel

a bit of code on a Saturday night ...

I've written before about a simple way to measure and report IT value to the business - quantifying alignment with strategic initiatives  project spend in context. It all culminated with a single, simple slide - numbers, with some Tufte-esque Sparklines thrown in.

Click on the picture for a full-size image!


Well, technologies come and go, and without going into the boring details, I've had to come up with a new way to generate the mini-bar charts along the left side there. It ended up being a relatively straightforward task in Excel VBA - yes, of course the table of data is being driven from a spreadsheet.

Here's the macro that does the trick - I just create a little HTML file that generate the bar charts in series (please excuse the hard-coding) ...

Sub CreateSparklinesDisplayFile()
  
   Dim sOutFile As String
   Dim iStartRow, iStopRow As Integer
   Dim iStartCol, iStopCol As Integer
   Dim i, j As Integer
   Dim sDataString As String

   sOutFile = "C:\Temp\BizUpdates.html"
   iStartRow = 45   ' First row of data to be graphed     <<< Evil hard coding!
   iStopRow = 51    ' Last row of data to be graphed
   iStartCol = 12   ' First column of data to be graphed (includes column of series names
   iStopCol = 24    ' Last column of data to be graphed

   Open sOutFile For Output As #1

   Print #1, "<html><head><title>BizUpdate Sparklines</title></head>"
   Print #1, "<body>"
   Print #1, "<p>Sparklines for last 12-months spend, IT Projects, by Initiative</p>"

   ' Loop thru the lines in the table to generate the separate sparklines

   For i = iStartRow To iStopRow
      Print #1, "<P>" & Cells(i, iStartCol).Value & "</P>"
      Print #1, "<img src='http://chart.apis.google.com/chart?"
      Print #1, "chs=100x35"       ' Size (length x height) of final graphic
  
      sDataString = "&chd=t:"
      For j = (iStartCol + 1) To (iStopCol - 3)
         sDataString = sDataString & Cells(i, j).Value & ","
      Next j
      sDataString = sDataString & "0,0,0|0,0,0,0,0,0,0,0,0"
      For j = (iStopCol - 2) To (iStopCol)
         sDataString = sDataString & "," & Cells(i, j).Value
      Next j
      Print #1, sDataString
 
      Print #1, "&cht=bvs"
      Print #1, "&chbh=a,2"
      Print #1, "&chco=
CCCCCC,FF3300"
      Print #1, "&chds=0,100,0,100'"
      Print #1, "title='" & Cells(i, iStartCol).Value & "' />"
      Print #1, ""
   Next i

   Print #1, "</body>"
   Print #1, "</html>"

   Close #1

End Sub

The output file looks something like this (a simplified version ...)

<html><head><title>BizUpdate Sparklines</title></head>
<body>

<p>Sparklines for last 12-months spend, IT Projects, by Initiative</p>

<P>Cost Reduction</P>
<img src='http://chart.apis.google.com/chart?
chs=100x35
&chd=t:52.25,65.3,72.15,33.15,33.95,33.65,47.7,92.88,79.49,0,0,0|0,0,0,0,0,0,0,0,0,70.57,87.85,55.25
&cht=bvs
&chbh=a,2
&chco=
CCCCCC,FF3300
&chds=0,100,0,100'
title='Cost Reduction' />

<P>Growth</P>
<img src='http://chart.apis.google.com/chart?
chs=100x35
&chd=t:67.05,88.25,85.61,95.25,86.70,55.49,54.75,81.19,65.62,0,0,0|0,0,0,0,0,0,0,0,0,55.65,42.05,18.41
&cht=bvs
&chbh=a,2
&chco=CCCCCC,FF3300
&chds=0,100,0,100'
title='Growth' />

</body>
</html>


Some things I noted when constructing this stuff ...
  • The Google Chart API seems to be picky about the order of the various parameters. I had some troubles getting the charts to work unless I output things just so
  • I can control a lot about these graphs, but I couldn't get rid of the x-axis. Yes, there is a chart type for "sparklines" (cht=ls), but that's for line graphs only
  • I am calling out the last three months spend in the table, so I want to highlight them in the charts, hence the little hiccup in the j loop
I can publish a version of my spreadsheet that puts it all together, just let me know ...

Previously ...

Technorati Tags: , , , , , , , ,


Invisible Technorati Tags: , ,
, ,

Labels: , , , , , , , ,

Thursday, January 15, 2009

Zodiac of Knowledge Capture

The start of a new year gives me a rare chance to measure my knowledge capture output over time. I maintain electronic journals for the various projects I am driving, business units and functional areas I support, and people I work with. This results in a hundred or so separate MS Word documents, with generally the same format - still, it would be quite tedious to take a word count each week to check my outout.

However, at the beginning of the year, I start a new folder and a new set of Word files - which means that after week 1, I have the easiest scenario for figuring out how much data entry for the week. And, since last week was typical, I set out to total up my data entry - starting with tthe personal journal files, but including other media:

Format     Words
=====     ======         
MS Word   15,300 in 22 documents
Notes      3,000
in  4 documents
Blogs      3,100 in  6 entries in 4 blogs
MS Excel     500 in  5 spreadsheets
Notepad      500 in  4 text files
Mind Maps    300 in  7 maps
Twitter      900
Power Point  700 in  5 presentations
Wiki         500 in  2 wikis, 2 different dialects
          ------
          24,800 words in 1 week

Hmm, that sounds like a lot - accoprding to this guy,  I could / should be writing eight books per year ...

But then I though of all of the other formats that I was not counting ... texting via phone, IM over eight different accounts (thanks, Pidgin!), emails over four different accounts  (and four different clients). And what about the code? That wiki item at the end got me thinking; most wiki syntax is faux-HTML, right? But I've also had to do work just this week in HTML, CSS, ASP, SharePoint, VBA, dokuwiki, TiddlyWiki ...

This whole exercise conjured a series of images in my mind, avatars for a new Zodiac of Knowledge Capture ...

Sisyphus: The never ending task of documentation. At times, my "backlog" gets so big, I just file a big chunk away under Future Projects ...

Hercules: Prodigious output should be the expectation, not the exception. The world / your work group is ever-hungry for more structured knowledge, and they don't want to wait thru the backlog - they want stuff now!

Job: Patience is a must - you will write stuff and get no response for months ... but every once in a while, a glimmer of hope. Had a conversation this week with someone who noted my Emotional Intelligence post from 14 months back (!). They had seen a class offering at a local college, and we ended up talking about how applicable the skills are to our jobs.

Mandelbrot:  You need to be facile when plotting and navigating many levels of abstraction. The reader needs to absorb slowly, peel the onion one layer at a time ... but they better be able to drill to the required level of detail!

Pavlov: Repetition - Don't be surprised when you have to repeat, repeat, repeat, over and over, until you get folks used to the idea of going to the wiki, searching the portal, reading the manual.

Deming: Constant Improvement must be in your mind all the time. There is always a better way to get an idea across (which relates to ...)

Xerox: Imitation is the sincerest form of flattery. Let's not lose sight of the goal - capture and transfer knowledge . So, if you see a more effective method of communicating - learn from it!

Tufte
: Clarity in communication is everything. You might think this one should be Strunk, but Tufte drives for clear and effective communication graphically / pictorially, as well as in the written word.

Muse: Don't rule out creativity; you are competing in the market of attention, and you need to capture the mind before it's ready to receive. You also can't always rely on the Same Old Stuff when capturing knowledge; keep experimenting with different tools, take the best, leave the rest.

Cthulhu (CNZ?): Develop skills at multi-tasking, maintaining many threads at once (or multiple arms). Multi-platform, multi-editor, multi-laungauge, multi-markup, etc.

Heisenburg: Be aware that documenting processes can be like measuring them - you will probably introduce some change. This is "stealth process improvement", and might even be manifest laziness (it's easier to document a simplified process ...)

This zodiac needs a twelfth sign - any ideas?

Previously ...

Technorati Tags: , , , , ,
, ,

Invisible Technorati Tags: , , , ,

Labels: , , , , , , , ,

Friday, December 19, 2008

Inspiration, Images, Insight, Imitation, Innovation

Just a quick post on this pre-holiday weekend, with my design-leaning kids out of school / back from college for the holidays, and a general sense of creativity mixed in with the holiday spirit.

Inspiration ...

... can come from many places. Nothing new there, but I like to get inspiration for X from looking at a different kind of Y. Spice up a presentation? Browse a library of web site designs. Capturing a business process? Learn about alternative user interfaces. Brainstorming a new concept? Wander through an image library.

Images

There were more than a few postings over the last few months, regarding Multicolr Search Lab. This site is stunning, both technically (practically defines "intuitive UI") and creatively (very easy to lose yourself in different color combinations). Pick your favorite corporate colors, and even staid corporations could find some interesting CC-licensed photos to liven up their presentations. (Funny, I can't get a decent kelly green option on the site - bummer).

Insight

I've posted before about visualization libraries, but here's one I've found since then - A Beautiful WWW is a great site to monitor if you like visualization technicques, and are willing to surf and experiment. This post is a nice summary of libraries - potentially helpful for presentations, applications, even reports. Next time they ask for Yet Another Ledger Report, you be the one to shoot Old YALR, and replace him with a total page featuring a few Tuftettes (sorry, sparklines).

Imitation

I'm never above a sincere bit of flattery, and often look to other sites for design inspiration. SitePoint and A List Apart will often post about the techniques required to spin your own magic, but they will also refer to plenty of examples - check out this list of 15 sites to browse for some design inspiration (some I've seen before, but PatternTap was a particularly good one!).

Innovation

The most interesting stuff I've stumbled upon lately are innovative mixes of site design, UI, and search - for images. A result set of similar offerings, really ...
  • Pixolu (via) starts with a keyword, and then lets me pick images that are close to a mental image I'm trying to capture. 
  • A little bit quicker, a little less free-association, is the "show similar images" option over at Live Search. Points for speedy response, however.
  • Today's addition (ibid): Google Image Search (that old stand-by) - a new search attribute that limits the results by image style.
All dynamite stuff, but I think I'll rely on Pixolu for my style of stand-up.

Previously ...

Technorati Tags: , , ,


Invisible Technorati Tags: , , , , , ,

Labels: , , ,

Saturday, September 06, 2008

Linkfest: Data Visualization

I'm a long-time fan of effective visualizations, and I've often written about the effective use of visual information when making presentations or communicating complex information. I've subscribed to my share of blogs and feeds on the topic, and have amassed quite a backlog of interesting links ... presented here for your hyperlinking enjoyment ...

Best Blogs

information aesthetics - If you appreciate the good stuff when you see it, and like to see the best (to stimulate your own thinking), this is a great resource

kottke.org - a broad range of topics, but they have posted a lot on information visualizations - this tag link will take to to the latest and greatest

General Reading

Amazing insights into the relationship between information overload and visual thinking (Chuck Frey) - Slipping some mind-mapping in the discussion of the ability of effective visualizations to help comprehension in a saturated environment.

Stunning Examples

Track Hurricanes On Stormpulse (via TechCrunch) - A great example of both historical data visualization and effective analytics interface design

Baby Name Trends (via kottke.org) - A classic web / info applet - Martin Wattenberg's Name Voyager - mau have been surpassed by NameTrends. This one is significant because it's a nice example of sparklines in production.

Other Good Stuff

Info Design Patterns (via information aesthetics) - Sophisticated collection of design patterns

Track-n-Graph (via information aesthetics) - Interesting free web service

Google Visualization API (via information aesthetics) - They're everywhere ...

Facebook Social Network Graph (via information aesthetics) - I've finally put a bit of work into Facebook - I'm beginning to understand it to be a necessary complement to LinkedIn - so this application looks interesting. Of course, I need to get more than three "friends" ...

catalog tree (via information aesthetics) - This site is loaded with a wide variety of infographics - definitely will get the creative juices going

Previously ...

Technorati Tags: , ,

Invisible Technorati Tags: , , , ,

Labels: , , , , ,

Monday, June 16, 2008

Data Visualization: 'Life' of Open Source Projects

Data Visualization: 'Life' of Open Source Projects

Part of the "art" of communicating IT and business abstractions - technical challenges, project roadmaps, budget performance, customer relationships, IT effectiveness - is landing on the right visualization. A picture tells a thousand words, and if you can draw the picture well, your target audience will grasp these concepts quickly, and (potentially) get insights that were otherwise difficult to attain.

I have a large backlog of web links to point to, posts to write that I'll probably start cutting into, now that I've seen this latest bit of visualization ... via Slashdot ...

    A student at UC Davis has created some stunning visualizations of open source software contributions, including Eclipse, Python, Apache httpd and Postgres. From the website: "This visualization, called code_swarm, shows the history of commits in a software project. A commit happens when a developer makes changes to the code or documents and transfers them into the central project repository. Both developers and files are represented as moving elements. When a developer commits a file, it lights up and flies towards that developer. Files are colored according to their purpose, such as whether they are source code or a document. If files or developers have not been active for a while, they will fade away. A histogram at the bottom keeps a reminder of what has come before."

As a developer, I can draw connections between the narration of significant events and the "flow" of objects. I've used these tools/platforms for some time now, and the story told by the animation connects nicely with my understanding of these tools' "personalities" - gives some insight on how they "grew up".

Python: This one fits my understanding of a typical open source project; lots of work by one primary, maybe one or two secondary developers, with fits and starts, bursts of activity. Over a period of time, a limited number of additional authors contribute, and things slowly expand until critical mass is hit, and Python is released to the public. Then, a flurry of activity as the popularity takes off ...


code_swarm - Python from Michael Ogawa on Vimeo.

Apache: I was fascinated to see this project start off as an exercise in documentation - and stay like that for the longest time (code doesn't appear until about a third of the way through the movie). Like Python, Apache is a focused platform/application, and had a fairly concentrated core of developers and modules - unlike ...


code_swarm - Apache from Michael Ogawa on Vimeo.

Eclipse: I watched this movie first, but it belongs last in the To-View list. Eclipse is a wide-ranging platform with a large number of modules/functions - and a correspondingly large number of developers. It's amazing to think that the overall project could maintain such a high-quality, unified vision.


code_swarm - Eclipse (short ver.) from Michael Ogawa on Vimeo.

I'd love to see the Linux video ...

Previously ...

Technorati Tags: , , , ,

Invisible Technorati Tags: , , , , , ,

Labels: , ,