Spatial agglomeration and specialization in emerging markets