Excluding the rest of the Mexican economy, Mexico City alone would rank as the 30th largest economy in the world.