Can an algorithm forecast the site of the next riot? In this accessible talk, mathematician Hannah Fry shows how complex social behavior can be analyzed and perhaps predicted through analogies to natural phenomena, like the patterns of a leopard's spots or the distribution of predators and prey in the wild.