|
|||||||||
d3map の変更点
D3 を使って地図を表示する
* install [#s6a0d11f]
** 必要なツールのインストール [#h9d0bae0]
''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
** データ準備 [#vc12f0a5]
*** shape のダウンロード [#dadb2a01]
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip
unzip *.zip
*** shape => GeoJSON [#fdba9417]
ogr2ogr -f GeoJSON -where 'geonunit = "Japan"' japan.geojson ne_10m_admin_1_states_provinces.shp
*** GeoJSON => TopoJSON [#r7795033]
topojson japan.geojson > japan.topojson
|
|||||||||