Figure 1. Frequency of 4 different seasonal greetings. Image from Google labs

by George Taniwaki

Google Books is a project sponsored by search engine giant Google to scan the pages of every book available, convert the scans to text using OCR, and make the resulting text corpus searchable. Not withstanding any remaining copyright disputes surrounding the project, Google has reached an agreement with most of the major copyright holders (authors and the publishers that represent them) around the world. So far, Google has scanned over 15 million books, most of which are no longer in print or commercially available. This database is a treasure trove for history scholars.

Last week, Google released a new statistics tool for the Google Books project called the Ngram Viewer. It it simple to use. You simply enter a list of words or phrases separated by a comma (each called an n-gram and is case-sensitive), the language (American English and British English can be searched separately), the date range (starting from 1500 to 2008, though the number of books is sparse before 1780 which makes the early data very spiky), and the amount of moving average smoothing to apply (long trends are easier to see with smoothing, but the individual yearly data is lost).

The Ngram Viewer is the best time series graphing toy I’ve seen.

There have been lots of stories in the press showing interesting trends in the popularity of certain words and phrases in books. For instance, Jennifer Valentino-DeVries of the Wall St. J. shows that Merry Christmas beats Happy Holidays by a big margin.

Slate’s Tom Scocca has been posting an Ngram of the Day on the site comparing the frequency of words like shopping vs salvation and television vs the Bible. He even does a comparison between words and shows the year in which the two cross in popularity. For instance, anxiety passes shame in 1942.

Figure 2. Frequency of “anxiety” vs. “shame”. Image from Google labs

Here’s a couple charts I created for the n-grams “independence” and “rebellion” in U.S. and British English. I have no idea what conclusions to draw from this data, but it is just begs for an explanation based on unfounded speculation. There is a spike in both words in U.S. books in the 1770s, but no spike in British literature. Independence becomes more popular than rebellion in books from both countries after about 1820. The word rebellion has a spike again in the U.S. from 1860 to 1870. The absolute occurrence of both words are similar in the two countries starting around 1900. Independence shows a spike from 1940 to 1942 and another spike around 1968 to 1970.

Figures 3a and 3b. Frequency of “independence” vs. “rebellion”, in British text (top) vs. American (bottom). Images from Google labs.

For the truly hardcore programmer, the n-gram datasets are available for download from Google. Their use is covered under the Creative Commons Attribution 3.0 Unported license.

The next step is for Google to add its Ngram Viewer toolkit to its Public Data Explorer visualization tool (see Mar 2010 blog post) to allow animations and drill down. I can hardly wait.

* * * *

[Update: I rescaled the first two graphs to normalize the time spans from 1700 to 2000.]

Apple iPad, a corporate sales weapon? Image from Apple

by George Taniwaki

Today’s Wall St. J. (subscription required) reports that several medical companies are adopting Apple’s iPad for use by their sales force when calling on doctors. This is a major coup for Apple since pharmaceutical and medical device manufacturers each have thousands of sales people.

Presumably these sales people already have laptop computers that they can use when calling on doctors. So why add an iPad to the arsenal of sales gadgets? The following  anecdote told by Mike Hedges, chief information officer of Medtronic, a manufacturer of implantable heart devices, provides the key.

Mr. Hedges said he had attended a dinner with several cardiologists when one asked about Medtronic’s drug-eluting stent. Normally, the conversation would have shifted to another topic, but one of his salesmen quickly pulled out his iPad with the product information, which kicked off several hours of discussion.

It appears that there may be several factors that can make the iPad (or other slate device) an effective tool for sales. First is the slim form factor. It is easy to pull an iPad from a briefcase without stopping a conversation. It probably can be done with only one hand and avoid the disrupting need to pick up the briefcase, dig through it, and pull out a bulky laptop with a bunch of cords attached to it.

Second is the quick start-up time. Since the iPad is normally in standby mode rather than off, launching takes less than one second. So once it is visible to both the sales person and customer, they don’t just sit waiting for the device to do something useful before letting the conversation continue.

Third is ease of navigation. The sales person can navigate using fat fingers only. There is no need to use fine motor control and manipulate a pointing device, keyboard, or touch pad. Again, the conversation can naturally continue while this is happening.

Finally there is the visual appeal of watching someone use an iPad. The device itself is cool looking. But also appealing is the ability of the sales person to share the view of the desktop with the customer while navigating. This again helps keep the conversation flowing and engages both the sales person and customer when showing a video or other presentation. Compare that to the same scenario using a regular laptop. The screen faces the sales person until the presentation starts running. Then the sales person will rotate the laptop to show it to the customer. Again, the laptop faces one person at a time, and is not conducive to sharing. It supports show and tell, not a natural conversation.

by George Taniwaki

If any of you use Windows Live Spaces for your blog, and there must be at least one other person on Earth besides me who does, then you’ve had to tolerate some serious UI issues. For instance, sometimes the Live Spaces interface would appear in Spanish or another foreign language. Who knows why?

A major annoyance occurred a few months ago. The statistics feature, which is very important if you are trying to gauge the amount of traffic to your blog, was removed without notice or explanation. The feature didn’t work very well and was quite limited, but did they (the Windows Live team) have to kill it?

Another problem was the insert picture feature worked erratically. Sometimes high-resolution pictures would get downsampled before they were uploaded. Oftentimes, if you clicked on a thumbnail picture in my blog, it would display a pop-up of another image the same size and resolution as the thumbnail. I tried fixing it sometimes by editing the HTML by hand and uploading the high-resolution picture manually. But sometimes my manual coding wouldn’t work and I couldn’t figure out why. I also had a problem getting embedded videos to display and play.

Creating and editing tables was hard. I use a lot of tables in my blog. I coded my HTML tables by hand, which was tedious and error-prone. Finally, the trackback feature was completely overrun with spam while the comment feature had a CAPTCHA test that was so hard that nobody was leaving comments.

So what are the alternatives? Well, I like WordPress. If I had to do it again, I would probably use it. (I like Google Blogger too. However, as a Microsoft contractor I didn’t want to antagonize my coworkers by using a product from a direct competitor.)

Well, today, Microsoft has announced that it has thrown in the towel and is inviting all Windows Live Spaces users to switch to WordPress. My new blog will be located at https://realnumeracy.wordpress.com. I haven’t had time to migrate my content to this new site yet. I probably won’t be in the mood (or in a coherent state of mind) to do it until next week. At that time, I’ll provide a complete review of the migration tools to convert a Windows Live Spaces site to WordPress.

[Update: There is no transition “tool”. It’s just a one button step. And Live Spaces users have no choice. They must switch to WordPress or their blog will disappear at the end of the year.]

Image from CreativePro using Internet Explorer 8

by George Taniwaki

There is a quote attributed to Frederic Goudy, “Anyone who would letterspace blackletter would steal sheep.” Mr. Goudy felt that the glyphs in Gothic script fonts which are intended to mimic handwritten text, were already perfectly spaced and that it would be a crime to adjust that spacing.

James Felici is one of the world’s leading experts on good typography. But this week’s issue of CreativePro contains an amusingly ironic lesson in bad typography.

Someone, probably not Mr. Felici, tagged all of his HTML special characters and replaced all of his apostrophes with the escape code ‘ which is wrong. It should have been ’ which is the right single quote. ‘ is the escape code for an apostrophe in XML, not HTML. This leaves the text of his article riddled with ' escape code. The ironic example is in the middle of his section about the incorrect use of straight quotes shown in the screenshot at the top of this post.

If you view the page using browsers that interpret XML and display it as HTML, the page will look fine. Specifically, if you use the Firefox, Chrome, or Safari browsers (I didn’t actually check Chrome), it will display as an apostrophe. But if you use Internet Explorer, as over half the population does, then it looks pretty darn ugly. It’s a crime I tell you.

A paper unit price tag. Image from getrichslowly.org

Today’s Tech. Rev. describes an epaper technology developed by Nemoptic that the company hopes will be cheap and efficient enough to be used as disposable unit price tags, replacing the ubiquitous paper unit price tags currently used on store shelves. Very cool.

About 20 years ago, I came up with an idea for wireless shelf tags (just the concept, with no idea how to build a working prototype) and showed it to my mother, who was a manager in a supermarket at the time. Given prices and technology at the time, my thought was the tags would be permanent, not disposable and would require an external power source. I explained to my mother the labor savings from having a tag that could be updated without requiring a clerk to print and attach it. I also explained how the tags would always display the same price as the scanner at the cash register because both would get price information from the same database. (This doesn’t necessarily mean the price is correct though, just consistent.)

Her reaction was interesting.

First, she wanted to know how the tags would be attached to the shelf. I said probably with a couple of screws. She explained to me that the tags had to be easily moved as shelf space needs changed. This is easy to do with paper tags with the current plastic tag holder. She was afraid that securing electronic tags to the shelf would make it too hard to move them.

Then she said the biggest problem with paper tags is not that they need to be updated. It was that they constantly need to be replaced because they are stolen by customers. Really!

Even if my electronic tags were screwed to the shelf and were useless when disconnected from the shelf, they would be an irresistible target for malicious thieves. My mother said that sometimes the only difference between a profitable store and a money losing one (in the same chain) was the amount of shrinkage. So preventing theft and damage is a key consideration in selecting materials used in a retail environment.

In response, I proposed replacing the tag with a bar the full width of the shelf. That way it would never have to be moved. The clerks would “move” a price tag by sliding it along the bar. She then asked how durable the display bar would be. Even if customers couldn’t steal them, she was sure some would attempt to pull them off the shelves.

She also wanted to know how a clerk would move a tag from one shelf to another and how much training the clerks would require to do this. And she wanted to know, how would clerks prevent malicious customers from watching them and then copying those actions themselves throughout the store. The user interface and security issues stopped me from pursuing the idea further.

The advantage of the paper shelf tags was that they were easy to move and cheap to replace. Factors like easy to update and absolute accuracy were not important to her. So even if disposable epaper unit price tags are less expensive than paper ones, they may cost more to implement, if customers take them and you need more of them.

Two examples the new Facebook Questions widget showing related other user questions below the text edit box. Images from Facebook

by George Taniwaki

Facebook has a new application (or widget) currently in beta release called Questions that allows users to post questions and wait for another user to answer it. The questions are categorized into groups and users are shown questions that other people who have similar interests have answered. If you know anything about search and recommendation you realize that Facebook is trying to solve two really hard computing problems simultaneously.

First, how do you categorize the questions? What keywords and contexts do you use? For instance, what weight do you give to the interests of the person asking the question? And how do you categorize those interests? What weight do you give to the length of the question? How do you handle misspelled words? Do you give any weight to the fact that any words are misspelled?

Second, how do you decide which questions to show which user? Should you predict if the potential answerer is actually qualified to answer the question? Is it more important to generate lots of responses or to get the correct response quickly? Or is it actually more important to entertain users with a stream of interesting questions, regardless of whether they answer them? (This would be really hard to predict since Facebook will never get any feedback from users regarding the question they don’t answer.)

Community run Q&A sites are not new. Yahoo! Answers and Answers.com have both been around for years and are quite popular. However, I believe that most of the answers are written by a small group of dedicated users who vie for points and recognition. Facebook’s goal is to engage the entire community, since the longer you stay at their site, the more likely you are to click on some ads.

Anyway, I show two screenshots at the top of this blog post. This may violate some promise I made to Facebook. The widget appears in the right column under the Sponsored links widget. Notice how many of the questions seem to be factual and could be more quickly (and correctly) answered using standard web-based research skills.

If you click on a question in Questions, you will taken to a page showing all the responses for that question. You can then vote yea or nay for any response. The example below shows how introspective Facebook users are.

Question responses. Image from Facebook

Finally, if you click on the Asked about link, you will see a list of all the questions related to that category. Notice the example below for the category “Roots”. As I mentioned above, categorizing questions is tough. And was this question really asked by that Kristin Bell?

Category detail. Image from Facebook

You just got flickrolled. Image by boyshapedbox

by George Taniwaki

The graphic at the top of this blog entry is a couple of years old, but I just saw it and had to laugh. Not just laugh, but ROTFLMAOWPIMP. For those of you who don’t get it, you have to go back to an Internet meme called rickroll. Basically, the idea is to create a hyperlink that claims to link to something relevant, but actually redirects the web browser to the music video of a Rick Astley song “Never Gonna Give You Up.” A story in the New York Times Mar 2008 explains how rickroll is a descendent of duckroll.

OK, enough background. To get the full effect of the chart, you first have to queue up “Never Gonna Give You Up” so that it is playing. Now sing along while you read the legend of the chart. Unfortunately, the pie chart is missing the actual data, but the estimates seem right.

Note that the effect is ruined if you accidentally queue up the Nirvana remix of the song entitled, “Never Gonna Give Your Teen Spirit Up”. And it makes no sense at all if you queue up Lisa Stansfield’s rendition of the Barry White classic “Never, Never Gonna Give You Up” instead.

Check out the other song chart memes posted on Flickr by the friends of boyshapedbox. I guess I’m a social outcast. I understand fewer than half of the song references in these charts. Oh, and here’s the relevant link you must click.