Smartphones are digital census takers, creating a more detailed view of society than has ever existed before and doing so in real time. Governed by suitable regulations, anonymised personal data can be used, among many other things, to optimise traffic flows, prevent crime and fight epidemics.