Cities on Earth evolve in the same way as galaxies in space