As a graduate student at Harvard University, sociologist Kevin Lewis began working with a data set that tracked something that scientists had never really been able to systematically study: the earliest stages of courtship. By studying interactions in online dating, he could probe human flirtation in its natural environment in unprecedented detail.