The rise of “data science” as illustrated by examining the McDonald’s menu

Christopher Mims takes a look at “data science” and one of its practitioners:

Before he was mining terabytes of tweets for insights that could be turned into interactive visualizations, [Edwin] Chen honed his skills studying linguistics and pure mathematics at MIT. That’s typically atypical for a data scientist, who have backgrounds in mathematically rigorous disciplines, whatever they are. (At Twitter, for example, all data scientists must have at least a Master’s in a related field.)

Here’s one of the wackier examples of the versatility of data science, from Chen’s own blog. In a post with the rousing title Infinite Mixture Models with Nonparametric Bayes and the Dirichlet Process, Chen delves into the problem of clustering. That is, how do you take a mass of data and sort it into groups of related items? It’s a tough problem — how many groups should there be? what are the criteria for sorting them? — and the details of how he tackles it are beyond those who don’t have a background in this kind of analysis.

For the rest of us, Chen provides a concrete and accessible example: McDonald’s

By dumping the entire menu of McDonald’s into his mathemagical sorting box, Chen discovers, for example, that not all McDonald’s sauces are created equal. Hot Mustard and Spicy Buffalo do not fall into the same cluster as Creamy Ranch, which has more in common with McDonald’s Iced Coffee with Sugar Free Vanilla Syrup than it does with Newman’s Own Low Fat Balsamic Vinaigrette.

This sounds like an updated version of factor analysis: break a whole into its larger and influential pieces.

Here is how Chen describes the field:

I agree — but it depends on your definition of data science (which many people disagree on!). For me, data science is a mix of three things: quantitative analysis (for the rigor necessary to understand your data), programming (so that you can process your data and act on your insights), and storytelling (to help others understand what the data means). So useful skills for a data scientist to have could include:

* Statistics, machine learning (on the quantitative analysis side). For example, it’s impossible to extract meaning from your data if you don’t know how to distinguish your signals from noise. (I’ll stress, though, that I believe any kind of strong quantitative ability is fine — my own background was originally in pure math and linguistics, and many of the other folks here come from fields like physics and chemistry. You can always pick up the specific tools you’ll need.)

* General programming ability, plus knowledge of specific areas like MapReduce/Hadoop and databases. For example, a common pattern for me is that I’ll code a MapReduce job in Scala, do some simple command-line munging on the results, pass the data into Python or R for further analysis, pull from a database to grab some extra fields, and so on, often integrating what I find into some machine learning models in the end.

* Web programming, data visualization (on the storytelling side). For example, I find it extremely useful to be able to throw up a quick web app or dashboard that allows other people (myself included!) to interact with data — when communicating with both technical and non-technical folks, a good data visualization is often a lot more helpful and insightful than an abstract number.

I would be interested in hearing whether data science is primarily after descriptive data (like Twitter mood maps) or explanatory data. The McDonald’s example is interesting but what kind of research question does it answer? Chen mentions some more explanatory research questions he is pursuing but it seems like there is a ways to go here. I would also be interested in hearing Chen’s thoughts on how representative the data is that he typically works with. In other words, how confident are he and others are that the results are generalizable beyond the population of technology users or whatever the specific sampling frame is. Can we ask and answer questions about all Americans or world residents from the data that is becoming available through new data sources?

h/t Instapundit

The legality of a prospective employer asking for your Facebook login information

I’ve seen several stories about this: more employers are asking prospective employees to provide their Facebook login information (or login in front of them) so that they can look over your profile. While this is sure to anger some people, how legal is it?

Questions have been raised about the legality of the practice, which is also the focus of proposed legislation in Illinois and Maryland that would forbid public agencies from asking for access to social networks…

Companies that don’t ask for passwords have taken other steps — such as asking applicants to friend human resource managers or to log in to a company computer during an interview. Once employed, some workers have been required to sign non-disparagement agreements that ban them from talking negatively about an employer on social media…

Giving out Facebook login information violates the social network’s terms of service. But those terms have no real legal weight, and experts say the legality of asking for such information remains murky.

The Department of Justice regards it as a federal crime to enter a social networking site in violation of the terms of service, but during recent congressional testimony, the agency said such violations would not be prosecuted.

But Lori Andrews, law professor at IIT Chicago-Kent College of Law specializing in Internet privacy, is concerned about the pressure placed on applicants, even if they voluntarily provide access to social sites.

So when will we get our first court case that tackles this issue?

I assume these companies have weighed the negative consequences of following these practices. Perhaps the logic goes something like this: if people have nothing to hide online, then there should be no problem having employers see their information. But I can’t imagine this will lead to good publicity for many corporations. Privacy is a big concern to many people and corporations are often seen as the bad guys in the larger battle.

Additionally, don’t employers have other ways to find out information that doesn’t require asking for login information? Perhaps they wouldn’t be able to get at Facebook information but that is not the only way to find out about people. What about asking for more references instead, professional and perhaps personal, and calling those references and asking thorough questions?

I’m also struck by the idea that some employers seem to be very afraid of Facebook and social media. Yes, it can backfire on their corporation or organization. But employees are capable of doing all sorts of dumb things and this is not restricted to Facebook posts.

Obama campaign data mining information for fundraising, voters

Politico reports on how the Obama campaign is using data mining in its quest to win reelection:

Obama for America has already invested millions of dollars in sophisticated Internet messaging, marketing and fundraising efforts that rely on personal data sometimes offered up voluntarily — like posts on a Facebook page— but sometimes not.

And according to a campaign official and former Obama staffer, the campaign’s Chicago-based headquarters has built a centralized digital database of information about millions of potential Obama voters.

It all means Obama is finding it easier than ever to merge offline data, such as voter files and information purchased from data brokers, with online information to target people with messages that may appeal to their personal tastes. Privacy advocates say it’s just the sort of digital snooping that his new privacy project is supposed to discourage…

There’s an added twist for Obama: He’s making these moves at the same moment his administration is pushing the virtues of online privacy, last month proposing a consumer bill of rights to protect it.

This has been brewing for some time: back in July 2011, Ben Smith reported that the Obama campaign was advertising for “Predictive Modeling/Data Mining Scientists and Analysts.”

I really want to ask: what took so long? This is a gold mine for candidates.

I’ll be curious to see how far these hypocrisy charges go. If companies are going to make money off the Internet, don’t they have to have some of these abilities to put information together? Which group do people trust less to have their information: corporations or political parties?

Post political content on Facebook and risk losing friends

Results from a new study show that 18% of adults on Facebook say they have responded to political posts by friends by dropping those friends or blocking their posts:

Eighteen percent of the 2,253 adults surveyed by Pew said they had blocked, unfriended, or hidden a friend on a social network over a political post. It isn’t hard to see why: The Pew survey found that because people who post about politics tend to be very liberal or very conservative, the offending posts are more likely to be out of line with other people’s views. Indeed, only one in four users surveyed by Pew said they “usually” or “always” agree with their friends’ political posts; 73 percent said they only sometimes or never do.

Though most people—roughly two in three—take no action over political posts they disagree with, some 28 percent said they counter with a comment or competing post, another behavior the Pew survey said leads to friends going their own way.

Despite everyone’s apparent distaste for other people’s political views, the survey found most users continue to post their own: 75 percent of adults who use social sites said their friends post political content, and 37 percent said they post at least some of their own.

My interpretation (filtered through my own research): political comments (and some discussion?) are common on Facebook but it doesn’t appeal to everyone and some people can go over the line (either through posting more “extreme” political posts or posting too many political comments).

I would be interested to hear a lot more about this: what is the threshold for appropriate political posts? Why are some users so uninterested in political posts to go so far as to block/drop friends? Are there similar areas of discussion, perhaps religion, that evoke similarly strong reactions from other users?

A new world where weak social ties can spread videos like Kony 2012

The Kony 2012 video has been watched over 65 million times on YouTube. While there has been much commentary about how the video lacks nuance, there is another interesting issue to consider: how exactly did it spread so quickly? One columnist suggests the sociological idea of weak ties provides some insights:

Many years ago, the Stanford sociologist Mark Granovetter published a seminal article in the American Journal of Sociology on the special role of “weak ties” in networks – links among people who are not closely bonded – as being critical for spreading ideas and for helping people join together for action.

An examination of the spread of the Kony video suggests that one weak tie in particular may have been critical in launching it to its present eminence. Her name is Oprah Winfrey and she tweeted: “Have watched the film. Had them on show last year” on 6 March, after which the graph of YouTube views of the video switches to the trajectory of a bat out of hell. Winfrey, it turns out, has 9.7 million followers on Twitter…

In this online world of weak ties, famous tweeters like Oprah Winfrey have more influence than they have ever had before. Even though television shows or movies might be larger cultural works, new developments like Twitter and Facebook allow anyone with some influence to reach a large number of people quickly. With Winfrey located closer to the middle of a global cultural network, her suggestion can resound throughout the world.

The same columnist also considers what might happen as the result of these weak ties. In other words, what does it matter that over 65 million people saw this video?

The really interesting question, though, is whether this kind of development will further ratchet up the pressure on democratic politicians. The last two decades have shown how 24/7 media coverage of foreign atrocities can lead western leaders to morally driven interventionism.

We’ll have to see how this plays out. The Kony video itself claims that these sorts of media efforts work as they already pushed the United States to send 100 military advisers to central Africa. Additionally, they say this happened “because the people demanded it.” But they also suggest their viral efforts are not enough: the video talks about targeting a collection of political and cultural leaders, “20 culture-makers and 12 policy-makers.” Take these figures, such as Oprah Winfrey or Condoleezza Rice, out of the campaign and would as many people, in the public or on Capitol Hill, pay attention? Could just the public put enough pressure on governments through social media or viral videos? Also, the video itself is quite a production (a number of people involved in making it, per the credits on the YouTube video) from an established organization. This is a little different from a 10 year making a video in her bedroom.

This is not to take away from the fact that this videos has reached a tremendous amount of people. But if we want to understand why all those people paid attention, the story is much more complicated. Mass numbers can have an influence but powerful people are more centrally located within social networks and have more influential ties. If Kony 2012 is going to have legs and lead to lasting change, weak ties may not be enough.

SimCity 5 coming soon

It appears that Maxis plans to reboot the SimCity franchise:

Enter SimCity. No really, just SimCity, like when you remake an old-school movie and crib the name unadorned — simple, straightforward, unambiguous. Only this isn’t a remake, it’s “a true rebirth of the franchise,” according to publisher EA and developer Maxis’ press release.

There’s obviously still going to be a drive to make it as accessible as possible, but EA and Maxis claim the reboot “brings the depth of simulation that has been the series hallmark for more than two decades and marries it with next generation accessibility and a robust multiplayer mode, giving players the power to change a world together.”

The emphasis this time appears to be on multiplayer, judging from the initial info-dump. Imagine building “a world that co-exists alongside friends,” in which the choices you make in your city have “long-lasting repercussions that will extend beyond [your] city limits.” You’ll be grappling with “real global challenges such as climate change, the search for renewable resources and natural disasters,” and have to choose “whether to compete or collaborate” with your fellow metropolitan masons.

“Everything you see in the world we sim,” writes EA/Maxis. “Sims in each city will have jobs or can lose them, buy homes, be prosperous or be an economic drain on the city. SimCity is the city builder in which every choice powers real change that affects the character of your city, the state of your region and fellow players within the entire SimCity world. Original fans and newcomers alike will relish the opportunity to build visually and functionally unique cities that take on the character of their choices.”

You can watch the SimCity 5 trailer at the link above.

I grew up playing a lot of SimCity, particularly SimCity 2000 (though I have played plenty of all the other versions). For my money, that version was a great blend of complexity and gameplay. I think the trick for SimCity in the future is rediscovering or updating this balance: making it fun but also making it realistic. To me, the real genius of SimCity was taking real-life situations that we all know (we all live somewhere) and making an interesting game out of it. Along the way, a player would learn some principles about city planning. At the very least, you would learn about different zones and how to connect basic infrastructure (electricity and roads/trains in the original, later including water/pipes and mass transit) to all of the zones. At a more complex level, you could create intricate arrangements of land uses, mixing in civic structures like schools, city hall, parks, stadiums, marinas, and other goodies while having to balance a city budget. All of this could give a player feelings of creativity and control.

I know that people today talk about the “Madden effect” for football fans. The idea here is that through playing a realistic football game, fans learned about the intricacies of the game in a way that they wouldn’t get by watching games on TV or watching highlights on the news or on SportsCenter. For example, Madden players know the difference between different zone schemes in the defensive secondary or different pass routes. Is there a similar effect from SimCity? Would players know the different between a vibrant city and a disjointed place? (This makes me wonder: how many SimCity players built a whole map of suburban sprawl? You could do this in the game but it wasn’t really the point and the maintenance costs, usually per road piece or square of pipes or losing water pressure if it is pumped too far, would make it costly. Were the makers trying to make a point?) Going even further, are SimCity players better civic and social actors after learning more about how the urban world is put together?

Driving today is much safer than in the past

An article (“Safer Passage”) in the latest issue of Time has shows that the fatality rate from driving has dropped a lot over the years. Here is a description of the issue:

America’s roadways are safer than ever. The latest data show that traffic fatalities are at their lowest level since 1949 and that the death rate based on miles traveled is the lowest in history. But technologies such as active safety systems and advanced air bags are being offset by auto safety’s newest enemy: distracted drivers using electronic devices behind the wheel.

“We lost over 3,000 in 2010 to distraction-related crashes,” National Highway Traffic Safety Administration chief David Strickland says. “It’s a heightened risk to the public, and it’s growing exponentially.”

Some of the statistics cited in the story:

1. In 1950, there were 7.2 deaths per 100 million vehicle miles traveled. In 2010, the rate is 1.1. While Americans might be driving more on average today than in 1950 (I couldn’t find figures on this), the fatalities while driving has dropped nearly sevenfold.

2. Here is what causes traffic fatalities: 32% killed by drunk driving, 31% by speeding, 16% by distraction, and 11% by bad weather. It is interesting that much of the current debate about making driving safer deals with cell phones and distractions (see a recent article from the Chicago Tribune about new efforts in Illinois) while it is the third biggest threat. Perhaps policymakers could argue that getting rid of distractions if the cheapest or easier route compared to dealing with the first two issues.

3. According to this CDC report, there were 36,216 deaths in 2009 in motor vehicle accidents for a death rate of 11.8 per 100,000 Americans.

Americans seem willing to accept some risk in driving and generally welcome efforts to make cars safer. And the numbers have gone down quite a bit since 1950: driving is safer. At the same time, the fight over cell phones in cars is just heating up and we need more data to know whether cell phones are more distracting than other features found during driving (passengers, fiddling with the radio/GPS devices, talking to passengers, tiredness). In the end, this may be an odd costs-benefits tradeoff: restricting cell phone use may limit deaths but some will argue that too much is being given up (assuming that only others get in accidents while using cell phones?). Of course, one solution is to simply go to driverless cars but there are other hurdles to overcome there.

Trying to disprove Dunbar’s number on Facebook

One writer tried to disprove Dunbar’s number on Facebook but found that Dunbar was correct after all:

Not for Dunbar, apparently. He was looking for individual interactions. Well, I thought, if that’s all it takes to disprove Dunbar’s number, then that’s what I’ll do: I’ll write personal letters to every one of my 2,000 Facebook friends…

I only made it through 1,000 of my 2,000 Facebook friends. But that was enough. My experiment’s outcome was crystal clear: Dunbar’s number kicked my ass.

In trying to disprove Dunbar’s number, I actually proved it. I proved that even if you’re aware of Dunbar’s number, and even if you set aside a chunk of your life specifically to broaden your social capital, you can only maintain so many friendships. And “so many” is fewer than 200.

Writing my Facebook “friends” had taken over my time. I was breaking plans with real friends to send meaningless messages to strangers. Some of the strangers didn’t respond, and many of those who did respond only confirmed Dunbar’s theory.

Quick examples: When I wrote A. F., a Malaysian magician, he responded: “hey rick i think you might’ve sent me this message by mistake lol.” And when I wrote A.D., a friend of a friend, and asked how things were going, she replied, “Sorrx but do i know you?:)”

The question I want to ask next: so did this writer lose friends over the course of this? If so, was it because the friends did the dropping or the writer decided to pare down his friends list?

While Facebook allows people to have expanded “friendship” networks, it is interesting to consider what would actually happen if someone tried to activate these networks. For example, the friend you once had in third grade and are now are Facebook friends with: what can you reasonably ask that person to do? Respond to a quick message you send them? Catch up with you and talk about what has happened in your lives since you last talked? Help you out of a tough spot? Join a cause you are interested in? Alert you to a job opening that would help you? My guess is that most of these online relationships rarely can be counted on even though they may have a semi-permanent status on Facebook. If this is the case, then perhaps you have hundreds upon hundreds of friends on Facebook but only 150 or so (Dunbar’s number) can be counted as actionable relationships.

This is not necessarily bad for Facebook: perhaps that 150 friends can shift rapidly over time meaning one week someone is a close friend while several months later it is someone else. Or perhaps you don’t actually know which of your friends is part of the 150 until you engage in deeper interaction. To have more social capital, it is helpful to have broader social networks that you can attempt to utilize. Without those connections at all, it is more difficult to find information or produce change.

Modern skeuomorphs are touches of the past in a digital age

Clive Thompson discusses skeumorphs, “a derivative object that retains ornamental design cues to a structure that was necessary in the original” (Wikipedia definition), in a digital world:

Now ask yourself: Why does Google Calendar—and nearly every other digital calendar—work that way? It’s a strange waste of space, forcing you to look at three weeks of the past. Those weeks are mostly irrelevant now. A digital calendar could be much more clever: It could reformat on the fly, putting the current week at the top of the screen, so you always see the next three weeks at a glance…

Because they’re governed by skeuomorphs—bits of design that are based on old-fashioned, physical objects. As Google Calendar shows, skeuomorphs are hobbling innovation by lashing designers to metaphors of the past. Unless we start weaning ourselves off them, we’ll fail to produce digital tools that harness what computers do best.

Now, skeuomorphs aren’t always bad. They exist partly to orient us to new technologies. (As literary critic N. Katherine Hayles nicely puts it, they’re “threshold devices, smoothing the transition between one conceptual constellation and another.”) The Kindle is easy to use precisely because it behaves so much like a traditional print book.

But just as often, skeuomorphs kick around long past the point of reason. Early automobiles often included a buggy-whip holder on the dashboard—a useless fillip that designers couldn’t bear to part with.

I’ve noticed the same thing on my Microsoft Outlook calendar: the default is to show the full month of February even today when I don’t really care to look back at February and would much rather see what is coming up in March. I can alter it somewhat in the options by displaying two months at a time but it still shows all the earlier part of February.

What would be interesting to hear Thompson discuss is the half-life of skeuomorphs. If they are indeed useful for helping users make a transition from an old technology to a new one, how long should the old feature stick around? Is this made more complicated when the product has a broader audience? For example, iPhone users could be anyone from a 14 year old to an 80 year old. Presumably, the 14 year old might want the changes to come more quickly and tends to acquire the newer stuff earlier but the device still has to work for the 80 year old who is just getting their first smartphone and is doing partly so because they only recently became so cheap. How do companies make this decision? Could a critical mass of users “force”/prompt a change?

This is also a good reminder that new technologies sometimes get penalized for being too futuristic or too different. If skeu0morphs are used, users will make the necessary steps over time toward new behaviors and ways of seeing the world. Perhaps Facebook falls into this category. The method of having “friends” all in one category is often clunky but if users had to simply open their information to anyone, who would want to participate? However, by gradually changing the structure (remember we once had networks which were a comforting feature because you could easily place/ground people within an existing community), Facebook users can be moved toward a more open environment.

In general, social change takes time, even if the schedule in recent decades has become more compressed.