前回「地図をいじりたい - My Life as a Mock Quant」の続き 10m-cultural-vectors | Natural Earthにある「Urban Areas」のデータ(人が密集して住んでる都市エリアのデータ)を世界地図の上に重ねてPLOTする方法。 まずは毎度のパッケージのロード。 library(ggplot2) library(maptools) library(rgeos) それから世界地図データの取得(前回同様)とshape fileのダウンロード・解凍・読み込み。 結構時間がかかるので、お茶でも飲んで待ちましょう。 #世界地図データを取得 world.map <- map_data ("world") #shape fileのダウンロード URL <- 'http://www.naturalearthdata.com/http//www.natura
![人口密度の高い箇所を明るくした世界地図を作りたい - My Life as a Mock Quant](https://cdn-ak-scissors.b.st-hatena.com/image/square/044e696b95ceeb904f1535995d1023895e6f4a86/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Ft%2Fteramonagi%2F20120620%2F20120620233524.png)