Nairobi has been ranked the second-worst city in the world with the most traffic congestion.