Late in 2015, Gilberto Titericz, an electrical engineer at Brazil's state oil company Petrobras, told his boss he planned to resign, after seven years maintaining sensors and other hardware in oil plants. By devoting hundreds of hours of leisure time to the obscure world of competitive data analysis, Titericz had recently become the world's top-ranked data scientist, by one reckoning. "Only when I wanted to quit did they realize they had the number-one data scientist," he says. Petrobras held on to its champ for a time by moving Titericz into a position that used his data skills. But since topping the rankings that October he'd received a stream of emails from recruiters around the globe, including representatives of Tesla and Google.