Analytics Roundup: infographics and visualizations
By Chris Gemignani
October 29, 2007
Find more about:
census
design
graphics
mapping
movie
nytimes
video
visualization
zipcode
- Visualization for the Masses: Information Graphics and the New York Times
- He explained how a 30-person team creates the impressive infographics and visualizations we see on the newspaper every week.
- information r/evolution movie
- This video explores the changes in the way we find, store, create, critique & share information, a nice video illustration of some of Shirkey's essays.
- demographics by ZIP Code - ZIPskinny
- Colorful visualization comparing demographic attributes of zip codes.
Mapping Phone Data in Four Easy Steps
By Zach Gemignani
October 12, 2007
Find more about:
googleearth
googlemaps
google
howto
mapping
Have you run into this problem: you have a list of phone numbers and associated values which would be best shown geographically to see patterns, but there isn't a clear way to put the data on a map. Maybe you'd like to see a map of customer service calls by call duration or inbound sales by average order size.
I wanted to share how to MacGyver a solution with a piece of twine, bubble gum, Excel, and a free online map tool. To me, this is a nice testament to the simple but powerful data visualizations that can be accomplished without programming skills or expensive applications.
1. Pull out area codes
First I pulled the area codes from my list of phone numbers using the formula below. This simply checks if the phone number starts with 1, then grabs the appropriate three digits for the area code.
=VALUE(IF(LEFT(E7,1)="1",MID(E7,2,3),MID(E7,1,3)))
2. Convert area codes into states
For my purposes, mapping the phone numbers by state was sufficient. Ideally, we would map the phone numbers to precise latitude and longitude coordinates by doing a reverse lookup of addresses then using the Excel geocoding tool.
First I needed a lookup table that could link my list of area codes to states. I wasn't able to track down a good data table, so I grabbed the data from All Area Codes and cleaned it up. Here is a lookup table of area codes by state.
An aside: I have a pet peeve with people who sell data that feels like it should be publicly available. You'll run across these businesses when looking for basic information about ZIP codes, MSAs, or area codes. Here is an example of one of these parasitic businesses.

3. Create your summary data set
I used a pivot table to summarize metrics by state.
4. Create colorized map of the US
Our friend Ducky Sherwood has generously put together a online tool called Mapeteria that will generate a colorized overlay of US states. In Ducky's words: "Want to make a choropleth thematic map (i.e. coloured based on your data) for Canadian provinces, U.S. states, or French départements?" This overlay can be viewed in either Google Maps or Google Earth.
Here's where it gets a little tricky. You will need to provide Mapeteria with a URL to a properly structured CSV file. Posting a CSV file to a web server isn't trivial if you aren't running your own web site. I found one free service called FileDEN that did the job (other suggestions?). Beware all the advertisingand in all likelihood they immediately sold my e-mail address at registration. Nevertheless, you can upload a file here and it will give you a URL which can be used to create your map.
Here's an example of the results:

5 comments
Tony said:
This is somewhat similar to MS MapPoint with the big difference being this one is FREE!
The difference is this one has a bit more eye-appeal. Maybe it's just the pic, but some of the states in white all blend together. It would be nice to see low-light outlines of the states. Also, what if you don't know your geography too well and need to find Nebraska, but aren't sure which one it is? :)
Also, drill-in functionality would be nice to be able to see within a state what the breakdown is.
Eric Moritz said:
I'm sure you know this but the census.gov provides a zip code to lat-long file here:
http://www.census.gov/tiger/tms/gazetteer/zips.txt
Other zip code data can be found here:
http://www.sdc.ucsb.edu/holdings/zip_codes.txt
Ken said:
Zach,
Nice article. One thing that may have made things quicker for you would be to use the "Get External Data" functionality in Excel on a website like this:
http://www.bennetyee.org/ucsd-pages/area.html
In fact, I used that table to re-create the process in our data browser (screencast here: http://www.kirix.com/blog/2007/10/16/mr-macgyver-meet-strata/).
Keep up the great work!
Bob Chatham said:
Good stuff. I've been using the RegEx 5.5 library to extract area codes, country codes etc. (You need to include a reference in your Excel workbook). Here's a sample VBA function:
----
Public Function regExpMatch(s As Variant, Optional p As Variant, Optional n As Variant) As Variant
'Return the nth match to pattern "p" of a regExp; defaults to 1st match if n is omitted
'If pattern p is omitted, defaults to token: "\s*(?:(\d+)|(\w+)|(.))"
'Return #VALUE error if n is greater than the number of matches
'Return NULL string if no match
'Otherwise, return the matched string
'
'------------- Sample patterns
' Country code of phone number: "^\s*\+\s*(\d+)"
Dim myRegExp As RegExp
Dim myMatches As MatchCollection
Dim myMatch As Match
If IsMissing(n) Then n = 1
If IsMissing(p) Then p = "\s*(?:(\d+)|(\w+)|(.))"
Set myRegExp = New RegExp
myRegExp.IgnoreCase = True
myRegExp.Global = True
myRegExp.Pattern = p
Set myMatches = myRegExp.Execute(s)
If (myMatches.Count = 0) Then
regExpMatch = ""
Exit Function
End If
If (myMatches.Count < n) Then
regExpMatch = CVErr(xlErrValue)
Exit Function
End If
regExpMatch = myMatches(n - 1).Value
End Function
-----
Here's a great free tool that works well with Excel data -- just cut and paste date from Excel into their dialogue box. See tutorial for more options.
http://www.gpsvisualizer.com/
http://www.gpsvisualizer.com/tutorials/waypoints.html
Also, useful geolocation/ZIP tools at:
http://zips.sourceforge.net/#dist_calc
Chris Kennedy said:
Thanks for the article. Check out http://pages.google.com/ for random data-hosting needs (esp. for Google Maps).
Add a comment
Analytics Roundup: Free tools for visualizing
By Chris Gemignani
October 9, 2007
Find more about:
flash
mapping
maps
visualization
- Modest Maps
- Modest Maps is a BSD-licensed display and interaction library for tile-based maps in Adobe Flash 7+, written in ActionScript 2.0.
- glTail.rb - realtime logfile visualization
A Boon or a Pest? Google Apps Haiku Contest
By Chris Gemignani
October 4, 2007
Find more about:
excel
googlemaps
humor
We were recently asked to answer some questions about our usage of Google Apps. We’re writing up some business-prosey answers, but poetry is another way of capturing the experience. Here are the questions and our answers in loose haiku.
1) Where are you located?
In Herndon, VA Beside the flowing traffic Grove Street, 555
2) What does your business do?
What are these numbers? Sea of corporate data Juice is your life raft
3) How many people do you employ?
The cat leaps, clawing The coiled bird escapes Seven feathers fall
4) Who are your main competitors?
Thundering feet pound Yet by the rippling puddle The mammal sips uncaring
5) Why did you decide to use Google Apps, and why did you choose Google over other commercial or opensource alternatives?
Spring air warms the tree Talking Heads song can't fight O2 for free
6) What products did it replace and why?
Old friends whither In spring, new shoots grow Excellence in change
7) Are you using the Standard (free) version or Premier (paid) version and why?
The raven's keen eye Gathers all he needs He has no wallet
8) Which applications do you use (Gmail, Talk, Calendar, Docs and Spreadsheets, Page Creator….All?) . Which ones give you the most benefit?
Star, thread, search Dinner for seven at seven Featureful sunrise
9) How many people are using Google Apps and how?
Does the happy frog count Beside the spring bullrushes How many croaks he hears?
10) What benefits have you derived from using the Google Apps? (quantifiable benefits if available)
Deep frozen roots Towering tree, branches drooping A nut in the snow
11) What features of the product do you appreciate most and why?
Was it you or me? Making rash changes Revision history
12) What’s been the overall impact of using the Google Apps?
Hive mind emerges Cicadia-like, a boon? or a pest?
13) Any advice you’d give others in implementing and using Google Apps?
Internet down? Keep a chair warm At local Starbucks
14) Are you using any other Google applications such as Maps? AdWords? AdSense? Please elaborate.
Reroute my route? Cool! Every trip now includes A stop at IKEA
15) What improvements would you like to see in Google Apps that would benefit your business?
A shopping list is useful, but PivotTables sparkle in sunshine
Care to share your experience with Google Apps? We'll highlight the best haiku in a later post.
6 comments | Show all comments only the last 5 are shown
darrell said:
Well that's one way to confuse their search engine, and fluster their business case.
Ever elusive
Juice mocks the google refrain
Categorize this!
art said:
beautiful!
Google Calendar
Synchronize our marching feet -
Left, right...foot falls Fall.
Chris Gemignani said:
Thanks, guys.
Darrell, a cagy and ambiguous play. Nicely done.
Art, nice job extending the futurist/totalitarian theme of our #8.
Tom said:
Talk, talk, talk
Mind, fingers numb
Pop-out or pop-in
Beauteous Archive
Empty inbox
But not gone
Ctrl-x to fire yet misfire
Pine finger neurons eternal
Curse the mouse yet submit
Leap the macro chasm
Find true power
On the other side
Ben Yates said:
Damn, real haiku. You guys are awesome.
Brian said:
Haiku: The chartjunk of language
I think this data would have been clearer in a table format.
:)


0 comments | Add a comment
said: