Home | About | Log in | Get The Feed
Warmest Wishes

December

21

2007

For A Safe and Happy Holidays with Loved Ones

By: Clint | Posted in random | | Comments Off
Holiday Goodies – Google Chart API Challenge Charts Explained Part 1

December

19

2007

Ok, so about ten days ago I challenged my readers to solve the following charting problems with the Google API – Bullet Chart, Sparkline and Square Pie. I provided a sample bullet chart but asked if anyone could improve upon it. Unfortunately, only one brave soul, Jeff Donnici, took up the challenge and provided two solutions for Sparklines.

I am inviting Jeff to write his own discourse on how to create sparklines with the Google API, so Jeff, please email me (my email is at the bottom of the right-hand nav) with your description of how to create the sparklines.

 

First, let’s cover some basics of the API.

The API is pretty simple, it’s just a URL with a bunch of query parameters attached to define the chart and its elements. It can also be a bit annoying when you’re encoding the data sets and their associated information. My guess would be that to really get the power out of the API you would want some sort of programmatic interface to it as building the chart request ‘by hand’ can be laborious.

So, components that are used in these examples:

For me, let’s start with the Bullet Chart. The stumbling blocks here are that

  1. The Google Chart API does not support combination charts, or at least not a bar chart / scatter plot combo, which is how I create Bullet Charts in Excel.
  2. The API does not seem to support single data point properties. In other words, I can set the color and width properties for the stack (e.g. series) but not for data points in the stack.

If you remember the Excel example of the Bullet chart, you will recall that we have 3 data series (top, middle, bottom) each with 4 data points to create the basic visualization of the Bullet chart. We then combine into that chart a scatter plot to create the target line. Well this API doesn’t support coloring for a single data point (which is required in the Excel solution) so what does Google offer as a replacement? Well, with the background fill, we can go a linear stripe that will take up some percentage of the chart space – ok, I think I can work with that:

But first things first. Let’s define the chart type:

http://chart.apis.google.com/chart?cht=bhs

  • cht=bhs tells Google that we are working with a horizontal bar chart

 

Next, let’s set the chart size

http://chart.apis.google.com/chart?cht=bhs&chs=250×40

  • Remember, chs wants [width]x[height] in pixels and it’s required

 

While we’re at it, lets go ahead and set the bar width (or height if you prefer)

http://chart.apis.google.com/chart?cht=bhs&chs=250×40&chbh=10,25

  • chbh lets us define that bar width and optionally the spacing between bars. In this example the gap is set to 25 to make sure that the chart fill area shows up around the bar itself.

 

Ok, for the last of the easy bits, let’s go ahead and set the Chart title

http://chart.apis.google.com/chart?cht=bhs&chs=250×40&chbh=10,25&chtt=Homepage+Retention+Rate:+90%

  • Note the plus (+) symbols in the Chart Title text, this tells the API to use a blank space when creating the title

 

On to the data. As noted above, there are 3 options for encoding data – simple, text, and extended. I haven’t really figured out why you would use simple because it’s basically a substitution scheme that feels more annoying than anything. However, in this example we are using text encoding because it allows us to use regular numbers with up to 1/10th precision.

http://chart.apis.google.com/chart?cht=bhs&chs=250×40&chbh=10,25&chtt=Homepage+Retention+Rate:+90%&chd=t:90.0

  • when adding the chart data, you must first tell chd how you are encoding the data (chd=t) and then supply the data itself (:90.0)

The above gives us a basic bar chart:

Now we need to add the elements that will make this look like a Bullet chart and we’re going to get it all done with chart fill!

http://chart.apis.google.com/chart?cht=bhs&chs=250×40&chbh=10,25&chtt=Homepage+Retention+Rate:+90%&chd=t:90.0&chf=c,ls,0,000000,0.50,cccccc,0.25,000000,0.005,efefef,0.245

chf (chart fill) takes the following arguments:

  • fill area: background (bg) or chart area (c), in the Bullet chart, we use the chart fill method
  • fill type: solid (s), linear gradient (lg), and linear stripes (ls)
  • angle: angle of the stripe between 0 (horizontal) and 90 (vertical)
  • stripe color and width pairs: color hex value and length expressed as a percentage

If you look at the URL snippet above in bold, you will see that we have defined

  • the background element as "chart fill" (c)
  • the fill type as "linear stripe" (ls)
  • the "angle" as zero
  • The first section is black and extends to 25% of the length
  • The second fill section is the same as the first
  • the third section is also 25% but is a dark gray
  • the fourth section, only 1/2 of 1 percent in width is black – It’s a trick, this is the target line!
  • The last section is 24 & 1/2 percent of the length and is a very light gray

 

That’s it, now we have a functioning bullet chart

I sure wish that I could remove the axes lines, and add data labels to the bar and target line, but oh well.

Ok, I need to take a break as this is quite a long post. In part 2, we will walk through the pie chart solution (which is not that great),

By: Clint | Posted in bullet charts, charts, google, sparklines, visualization | Tagged: , , , | Comments Off
Google Chart API Challange

December

9

2007

I’m not quite sure how long I’ve been ignoring the Google Chart API but I saw it in a post the other day which reminded me, or at least gave me the inkling, that I had seen some discussion of it before.

Well, that was several days ago and I finally had some time to play with it and in a couple of hours created the following bullet chart:

Google Chart API - Bullet Chart Example

So here’s the challange

  1. Create a Better Bullet Chart than the Above
  2. Create a Sparkline
  3. Create a Square Pie Chart

Using the Google Chart API of course.

Once you’ve created your solution, post a link to it here in the comments. For the solutions that we like best, I’ll ask the author to provide a description and instructions to be published here in a follow up post.

Update: 12/15/2007

Jeff Donnici sends us two sparkline examples.

Simple:

With Banded Background:

Update 12/19/2007

Well with only Jeff taking up the challenge after 10 days, here’s the final solution: a so-called square-pie chart. Of the 3 types this is the most poorly supported by the Google API mostly because on bar charts you cannot control the scale of the axes.

Update Feb 29, 2008

Geoff offers us this austere Bullet Chart solution:

And this slightly "dressed up" version:

By: Clint | Posted in bullet charts, charts, google, sparklines, visualization | | 10 Comments »
Sharing the Wealth: Random Excel Tip #4

November

27

2007

Wow! It’s been a really, really long time since I have done one of these. According to WordPress, the last "Sharing the Wealth" post was published on September 27, 2006 – discussing how to store color assigments in VBA. Guess I haven’t been doing a lot of Excel work in the last year!

All that aside, today’s tip is just too obvious not to pass a long, although you may want to file it under ReadTheManual…

Someone asked me today "How can I match rows where the string contains the substring "abc" and total those rows?" Ok, so I’m paraphrasing but this was the question. Being a little rusty I went right along with it and said something like "Right, you can’t use SUMIF because it doesn’t do fuzzy matching."

WRONG! WRONG! WRONG!

After I got off the phone, I hopped into Excel help, not because I thought it would tell me something about SUMIF that I didn’t know but because there might be another formula to help me out or at least a kernel of an idea.

It turns out that SUMIF supports the wildcards ? and * (question mark and asterisk). Furthermore you can match on those characters be prefixing them with a ~ (tilde).

Here are some sample conditions, the appropriate wild-carding and the SUMIF formulae:


CONDITION MATCH EXCEL FORMULA
SUM IF ends with "string" "*string" =SUMIF(A2:A11,"*string",B2:B11)
SUM IF starts with "string" "string*" =SUMIF(A2:A11,"string*",B2:B11)
SUM IF contains "string" "*string*" =SUMIF(A2:A11,"*string*",B2:B11)
SUM IF "string" is preceded by any one character "?string" =SUMIF(A2:A11,"?string",B2:B11)
SUM IF "string" is followed by any one character "string?" =SUMIF(A2:A11,"string?",B2:B11)
SUM IF contains "stringA" OR "stringB" "*stringA*", "*stringB*" =SUM(SUMIF(A2:A11,"*stringA*",B2:B11),SUMIF(A2:A11,"*stringB*",B2:B11))
SUM IF contains "stringC" AND "stringD" "*stringC*", "*stringD*" =SUMIFS(B2:B11,A2:A11,"*stringC*",A2:A11,"*stringD*")

Ok, So the last two are a bit of a trick. We’re using SUM as a parent function to the two SUMIF functions to create the OR operator and the new in Excel 2007 SUMIFS function to match on multiple criteria for the AND operator.  SUMIFS is just like SUMIF but matches on multiple criteria (can be from multiple locatioins too) but notice that the SUM RANGE comes first instead of the CRITERIA RANGE which comes first in the more widely known SUMIF.

Not enough? You can download this sample spreadsheet to see it in action.

This is another in a long litany of my "DUH" moments with Excel, what about you? What’s your biggest DUH moment with Excel? 


Related Posts:

 

By: Clint | Posted in excel | Tagged: , , , , , , , , , | 2 Comments »
twitter meme-tracking

November

1

2007

I use twitter more as an information source than a communication tool. That means that I am largely silent and let all my friends do the talking.
So I’m probably not fulfilling my twitter responsibilities – oh well.

Twitter has some interesting features, one of those being able to track conversations – for instance "track earthquake" will track all tweets on an earthquake. This is a great ‘personal’ meme-tracker but it would be even better if there was a public way to track memes.

It should be simple, just like how replying to tweets evolved on twitter. Twitterers started using @username to denote replies to specific people and the fine folks at twitter formalized it as funcionality so that whenever twitter sees @username the tweet goes into a ‘replies’ bucket – nice.

 

Now, I’m going to suggest that the fine folks at twitter institutionalize public memes. So that anyone could see the discussion on a particular topic.

Here’s what I propose, in addition to being able to do the whole ‘track’ thing for personal meme tracking. Allow ‘tagging’ of tweets via the pound/hash sign ( # ). Any tweets that are marked with #memename could then be aggregated in their own twitter page. Additionally, they could be individually trackable by track #memename.

 

Anyone out there who also uses twitter agree or disagree?

By: Clint | Posted in meme-tracking, Twitter | | 1 Comment »

« Previous entries Next Page » Next Page »

prednisone buy cod watson brand order prednisone on line purchase online prescription prednisone prednisone 10 mg buy prednisone with no rx prednisone overnight cod prednisone ups how to purchase prednisone online without a prescription purchasing prednisone online without prescription overnight prednisone purchasing prednisone without a script how to get a prednisone prescription safety order Paxil order Paxil pharmacy purchase Paxil online without script order Paxil cheap overnight purchase cheap Paxil cod free fedex Paxil fedex no prescription purchase Paxil online with overnight delivery Paxil without prescription shipped overnight express buying Paxil over the counter buy Paxil without a rx overnight shipping Paxil overnight delivery fed ex how to order Paxil online without a rx order Paxil overnight cheap purchase online Paxil without prescription purchase Paxil online no membership buy Paxil 40 mg online buy cheap fedex Cytotec prednisone with free fedex overnight purchase prednisone visa buy 40 mg accutane online without prescription how to purchase Lasix online without a prescription website design software download download bluetooth software buying rediker software bitcomet software download software educational prices plagiarism software to buy for parents fedex Crestor overnight without a prescription buy spyware software sony ericsson software downloads graphic software cheap discount for webwatcher software discount on ezfiling software tally software download cheap software downloads accounting software downloads iden software download discounted student software lowest price on 2008 tax software wilcom software download adobe connect pricing Online us prednisone cheap mac adobe oem software Lasix buy online in stock download a free of creative suite 5.5 design premium purchase xenical without prescription to ship overnight xenical 120 mg online cheap Maxalt usa buy cheap Maxalt online free consult prescription Zithromax where to purchase Valtrex no prescription no fees purchase Valtrex online online overnight shipping valtrex buy valtrex in mexico valtrex 1000 mg (no prescriptions needed for Buspar|buy Buspar with no prescription|online pharmacies Buspar|Buspar cheap|buy Buspar without rx|purchase rx Buspar without|Buspar purchase online|purchase Buspar online without rx|purchase Buspar free consultation|buy Buspar Online|buy Buspar american express|buy Buspar Online|buy cheap Buspar with dr. prescription|Buspar side effects|fedex Buspar without priscription|overnight Buspar without a rx|order cheap overnight Buspar|Buspar toronto|uk order Buspar|Buspar no doctors prescription|Buspar mexico|Buspar order|no prescription Buspar with fedex|order generic Buspar|buy Buspar without rx from us pharmacy|prezzo Buspar|Buspar 10mg|Buspar from canada|purchasing Buspar without a script|buy Buspar australia|purchase Buspar visa without prescription|online purchase Buspar|buy Buspar no perscription cod|buy Buspar drugs|buy Buspar with visa|buy Buspar without rx needed|buy Buspar without prescription|buy Buspar no prescription low cost|purchase buy cheap generic Buspar how to buy Nolvadex without a prescription i want a Nolvadex prescription ms works 2011 buy online rx Lasix without cheap order rx Lasix purchase 10mg accutane 40 mg overnight delivery Nolvadex same day delivery Bupropion buy on line buy synthroid mail buy buy synthroid online pharmacy risperidone Nolvadex compare at Bridgend Accutane 20mg mexico purchase Lasix paypal without prescription order online zithromax without prescription zithromax delivered cod fedex purchase no perscription Nolvadex Nolvadex without prescription overnight shipping order Nolvadex now buy Nolvadex online without prescription Nolvadex without rx cheap buy Nolvadex cod next day delivery buy zithromax offshore no prescription fedex order 250 mg zithromax overnight delivery zithromax without rx medications zithromax generic fedex no prescription buy zithromax no scams online pharmacy cod zithromax purchase zithromax amex online without rx Orlistat online order finpecia to buy buy mail order Orlistat where can i buy Valtrex without a rx cheap generic Finpecia generic finpecia online finpecia usa finpecia 1mg maxalt without a presciption purchase Valtrex pay pal online without rx buy genuine Buspar Buspar purchased online without prescription buy prednisone online without a prescription prednisone with no perscription overnight shipping best buy valtrex comprar Crestor generico Valtrex free consultation u.s. pharmacy Valtrex online no perscription fedex buy cheap Zithromax order buy Zithromax online where can i purchase Buspar no rx buy Arimidex without a rx Arimidex suppliers buy online without a prescription cheap Cytotec Cytotec cost best buy adobe flash for web editing adobe forms buy no perscription Buspar rosetta stone software price adobe photoshop lightroom 2 adobe acrobat palm pocket pc adobe acrobat buy accutane 40 mg discount Crestor purchase online buy microsoft access 2003 upgrade canada Tamsulosin office 2003 oem slipstream sp1 office 2007 recycle mac adobe upgrade ordering Crestor without a script buy Crestor on line Crestor without prescription adobe acrobat courses installing office 2003 over 2007 order Orlistat overnight Orlistat order online Orlistat buy adobe photoshop cs3 updates Autocad 2011 Slow Autocad 2010 Review after effect 9 physical page frame e0b884e0b8b7e0b8ad buy Flomax without rx license code hack strata design Windows 2000 Service Pack 3 Windows 7 Upgrade Student Price buy Valtrex no prescriptions Flomax online no prescription order Buspar order amex how to purchase Valtrex online without a prescription order Orlistat without rx from us pharmacy wordperfect x4 professional oem Buspar online Proscar online where to purchase cheap Flomax no rx belvedere ice room whistler full edius pro 4.6 download visual studio 2010 download full version ars longa vita brevis occasio praeceps photoshop 7elements training dvds torrent mental ray standalone 2012 order Crestor no visa purchase Prednisone online without prescription price nuance omnipage 17.1 Buy Fincar amex buy quicken software android acdsee buy cheap valtrex online free consult cd microsoft office 2007 Flomax overnight cod Valtrex best buy Flomax cheap buy Zithromax with a visa buy Flomax now virtual dj software pro 7 download buy Tamsulosin online no prescription want to buy Buspar in usa cheap way of windows7 license Buspar no prescription where can i buy Maxalt without prescription Valtrex bestellen order overnight Zithromax Amitriptyline by mail Zithromax purchase cheap online prednisone prednisone fedex 3d home architect broderbund windows 7 64bit sql server 2008 r2 datacenter Photoshop 2 Windows For Students Download Free Adobe Reader 9.0 photoshop old version download Orlistat tablets purchase Valtrex amex online without prescription purchasing Valtrex online without prescription Buy Cheap Windows online valtrex Windows 98 achat Buspar Prednisone no prescription to buy buy in Zithromax uk best buy accutane 40 mg valtrex prices Autocad Educational Version Upgrade Microsoft Office 2003 To 2007 generic Buspar usa adobe audition2 buy in Valtrex uk web application microsoft office mini photo resizer download generic Prednisone usa finpecia overdose purchase Valtrex without prescription from us pharmacy purchase Cytotec without rx needed fedex Prednisone overnight without a rx prednisone with no perscription overnight shipping Windows 7 Ultimate 64 Bit Student Discount Discount Microsoft WindowsLightroom 2 Windows 7Ms Office StandardPhotoshop Cs5 UpgradeComputer Monitors For SaleWindows Xp InstallSuite Microsoft OfficeAutocad Version 2007Adobe Acrobat 9.0 Standard DownloadIe8 Download For Windows 7Adobe Paint ShopMicrosoft Service Pack 2Free Download Adobe AcrobatStudent And Teacher EditionManage ImageAdobe Acrobat 7 Pro DownloadVista Home Premium To Windows 7 UltimateWindows 7 Home Premium Upgrade OemAdobe Creative Suite 5 Master Collection Student And Teacher EditionBuy Adobe Photoshop Lightroom 3Ms Office 2010 Home And StudentCompare Photo SoftwareMicrosoft Office Word Viewer 2010Windows 7 Upgrade Student Discount ProfessionalWindows 7 Updates DownloadCreative Suite WebAdobe Reader VistaMicrosoft Windows 7 Home Premium Upgrade 64 BitPhotoshop 2Ie8 Download For Windows 7Photoshop 2009Suite Microsoft OfficeMicrosoft Office 2007 VersionUpgrade Windows Vista To 7Autocad Lt 2010Autocad 2010 Best PriceDownload Acrobat Reader 8 buy Flomax cod next day delivery buy generic Valtrex pills Buspar overnight cod ordering Valtrex over the counter buy Valtrex diet pills what does Valtrex look like Proscar rezept order Proscar cheap overnight Cytotec canada purchase Cytotec cod next day delivery buy Prednisone with visa Prednisone buy Prednisone purchase Proscar without rx to ship overnight Valtrex no doctors prescription buy cheapest valtrex Valtrex perscription from s online chemical name buy Cytotec buy finpecia no prescriptions finpecia wholesale buy Cytotec quantity buy genuine finpecia finpecia free consultation fedex overnight delivery Buy Finpecia 1 mg online microsoft vista price cut window bottom repairing windows windows archive microsoft window update microsoft keyboard 4000 buy oregon cheap used pos software windows mobile 5 software where to buy microsoft office professional 2007 sp3 windows xp window vista ultimate microsoft office 2003 pro oem discount no prescription Orlistat Rosuvastatin overnight cheap Flomax online buspar online no perscription fedex design landscape software sec discounted cash flow software windows science cvs server windows