Twitter Sparkline Generator!


The app that everyone’s been waiting for. After months (20 minutes) of coding and Q&A, Data Driven is proud to release Sparkbars! In Twitter! v2.0 You may need to right click and save as an xls to stop the .zip being added. As Twitter now accepts Unicode, we can use the block elements to create a sparkline in our posts (a sparkbar, I suppose would be the right name).

Open the Excel workbook (2003 and 2007), paste up to 140 values in column A, copy the resulting code out to Twitter, remove the extra return marks (?). Try not to be too annoying.

All amusement aside, this is kind of what Tufte originally thought of sparklines to be – a word-size graphic in the middle of a sentence – perhaps even more important when you’re restricted to 140 characters. Enjoy, you crazy tweeters..

April 2011 note: This post remains the most popular on my blog (but least revenue generating…) and the workbook was recently used by the Wall Street Journal for a tweet. I’ve updated the workbook so that the file works in Excel 2003 through 2010, and that the bars can have a non-zero baseline, which is great for closely spaced data. However this does violate design principles of bar charts not having a non-zero axis, so use with care (maybe it’s okay for sparkbars?)

22 Comments


  1. Alex Kerin
    Jun 09, 2010

    V1.1 is already out, with the ability to add a space between bars!!!


  2. Alex Kerin
    Jun 09, 2010

    And as if it couldn’t get any better, now with win/loss charts


  3. Alex Kerin
    Jun 09, 2010

    Oh man, does it get better – it EVEN works on Facebook. Now you can annoy your friends as well as random people on Twitter.


  4. Bryn_officeteam
    Jun 09, 2010

    Interesting use of Microsoft Excel! I am sure many Excel and Twitter users will find this amusing!

    You should share this with the community of Excel users over on Facebook:
    http://www.facebook.com/microsoftexcel

    Thanks,
    Bryn
    MSFT Office Outreach Team


  5. John Munoz
    Jun 09, 2010

    I don’t know about you, but I have only 24 hrs in my day. Where did you find 30?

    Once again, nice work Alex.


    • Alex Kerin
      Jun 10, 2010

      No TV, rainy, you know the rest.


  6. Alex Kerin
    Jun 10, 2010

    Picked up nicely on Twitter – lots of retweets. My fav: Wow… @AlexKerin made sparklines for Twitter. ex: ▁ ▁ ▁ ▃ ▁ ▁ ▄ ▂ █ F-ing brilliant lo-fi info viz.


    • Alex Kerin
      Jun 11, 2010

      And a tweeter who actually used it to produce a real chart, rather than just playing with it:

      Fresh data on world primary energy use by %: Oil 34.77, Coal 29.36, NG 23.76 Nuke 5.47, Hydro 6.63 | spark: █▇▅▁▂ @pkedrosky @alexkerin


  7. Atul
    Jun 10, 2010

    This is great stuff!

    Do you have an Excel version for Excel 2003? Thanks, again.


    • Alex Kerin
      Jun 10, 2010

      I don’t because 2003 can’t concatenate more than 32 values. I could do multiple concatenates – let me post a version


      • Alex Kerin
        Jun 10, 2010

        Version linked in the main text now works in 2003 as well….


  8. Jon
    Jun 16, 2010

    I am impressed. I don’t know exactly why I would need this on Facebook, but I will think of reasons to use it.

  9. [...] a pie chart with 50 segments, doesn’t mean that we should. I recently posted a workbook to create sparklines in Twitter – they are created using text characters so the result is not overly attractive and has low [...]

  10. Not sure if you check your Twitter account, but I had a question on how to use this tool. Would you rather I ask here?


    • Alex Kerin
      Feb 09, 2011

      Dave, ask away, I must have missed your tweet. Apologies.


    • Alex Kerin
      Feb 09, 2011

      Ok, I have a solution: Now posted in the main article

      Uncheck box 5 to get a non-zero axis.

      I had to change the way that resolution is calculated then update the vlookup to have another if statement.

  11. First thank you. Second your comment “5. Bars start at zero (checked for yes, non-zero axis is against design principles, but may be ok for sparkbars)”

    I found that interesting – most sparklines I have seen don’t start at zero. Say like stock prices or the like. I understand a sparkbar is a bar chart not a line chart but in reality the 0-8 icons could be pixel dots forming a line chart (if the ANSI characters worked.)

    I think of this example: °.¸¸.•´¯`


    • Alex Kerin
      Feb 10, 2011

      True, I have an aversion for bar charts with non-zero axis, but I do think it’s fine in this case, especially if you put the range immediately after or before the chart.


  12. Spock
    May 09, 2011

    Very interesting! Line charts coming soon?


    • Alex Kerin
      May 09, 2011

      There’s a chance you could do something very rough with text characters, but it would be great to be able to use an inline google chart…


  13. John Coffey
    May 11, 2011

    Ditto for Google Spreadsheet / Chart version.

    Great work!


  14. Chris Pudney
    May 15, 2011

    Works in Open Office too :) And hey presto!

Leave a Reply