Algorithm could warn of abuse problems and identify drinking hotspots