D3 を使って地図を表示する
install†
必要なツールのインストール†
git / gdal / jq / nodejs (topojson)
yum install gdal jq git --enablerepo=epel
git clone https://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh
nvm install 0
source ~/.nvm/nvm.sh
データ準備†
shape のダウンロード†
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip
unzip *.zip
shape => GeoJSON†
ogr2ogr -f GeoJSON -where 'geonunit = "Japan"' japan.geojson ne_10m_admin_1_states_provinces.shp
GeoJSON => TopoJSON†
topojson japan.geojson > japan.topojson