A phase diagram for bacterial swarming