by Jack Wu
- Nodejs (npm)
- Express
- mapshaper
- d3js
npm install
npm start
- Install Nodejs (ask google)
- Setup a Express project (ask google)
- Install mapshaper
npm install -g mapshaper
- Download map from opendata.gov.tw and then unzip it
https://data.gov.tw/node/7442
- Run command (.shp and .dbf files in the same path)
mapshaper [COUNTY].shp -o encoding=big5 format=topojson [COUNTY].json
- Put the output file in a reachable path from browser (html file)
- /test.html: color varies from population of counties
- /test2.html: color indication and name showing for a county on hover event