Not long ago, local communities played a far greater role in everyday Japanese life.