Skip to content

Releases: plotdb/pdmaptw

pdmaptw v2.4.0

Choose a tag to compare

@zbryikt zbryikt released this 11 Sep 09:50

台灣縣市 / 鄉鎮市區 / 村里界圖,供統計圖表使用。

內容

  • GeoJSON ( 47 檔 ): EPSG:4326 經緯度,真實地理位置。全國一份,另按縣市分檔。
  • SVG ( 47 檔 ): 每區一個 path,id 為行政區代碼、data-name 為名稱,依縣市分組。
  • CSV ( 1 檔 ): 行政區代碼、名稱、標籤定位點與面積對照表。
  • manifest.json: 全部檔案的清單,含層級、範圍、格式、大小、SHA-256 與下載網址。

資料版本

  • 縣市: COUNTY_MOI_1140318 ( 2025-03-18 )
  • 鄉鎮市區: TOWN_MOI_1140318 ( 2025-03-18 )
  • 村里: VILLAGE_NLSC_1150817 ( 2026-08-17 )

注意

SVG 的離島 ( 澎湖、金門、馬祖、釣魚臺、彭佳嶼 ) 位置經過位移,讓統計圖不會有大片空白,
因此不是真實地理位置。需要真實座標請用 GeoJSON。

界線經過簡化以利網頁繪製,不適合用於面積量測或套疊分析;CSV 的 area_km2 由簡化前的原始
界線計算,與內政部公布的土地面積統計仍有數個百分點以內的差異。

授權

原始資料為內政部 / 內政部國土測繪中心所有,依政府資料開放授權條款第 1 版提供;本 release
為其衍生作品,沿用相同授權,使用時請標示來源。產製這些檔案的程式碼為 MIT。

2.3.0

Choose a tag to compare

@zbryikt zbryikt released this 02 Sep 15:07
  • map data now carries the official 行政區代碼 as properties.code ( 5 / 8 / 11 digits for
    county / town / village ), so consumers can join on a stable code instead of the
    Chinese name.
  • add choropleth({data, key, scale, empty}) for filling regions from a value lookup,
    keyed by code or name.
  • meta.source records which government shapefile release each file was built from.
  • rebuild from the current data: county / town COUNTY_MOI_1140318 TOWN_MOI_1140318
    ( 2025-03-18 ), village VILLAGE_NLSC_1150817 ( 2026-08-17 ).
  • drop the ld$ ( @loadingio/ldquery ) runtime dependency: init() now uses native
    Element.closest, so a plain <div> root works with no extra library.
  • fix: simplification could leave a ring degenerate or wound the wrong way, which d3-geo
    reads as covering the whole sphere — one such ring painted the entire map. affected two
    村里 in v2.2.1.
  • fix: 臺中市中區 was filtered out of the town map entirely.
  • fix: filter.ls passed the quantization factor as an object, which silently disabled
    quantization. dist/county/ drops from 28MB to 300KB, and the whole package from
    33MB to 4.1MB.
  • fix: fetch pointed at data.moi.gov.tw, which no longer exists. it now resolves the
    current download url from the data.gov.tw dataset API.
  • fix: convert.ls picked the first .shp in the folder, which is no longer the main
    boundary layer now that the government zips ship supplementary shapefiles.
  • npm run build now runs filter.ls as well, so per-county files stay in sync.
  • past releases and the original shapefiles are kept under archive/.

2.2.1

Choose a tag to compare

@zbryikt zbryikt released this 03 Apr 13:38
  • fix bug: released dist topojson files are not simplified.

2.2.0

Choose a tag to compare

@zbryikt zbryikt released this 02 Apr 11:10
  • generate topojsons for each county (and their corresponding towns)

2.1.1

Choose a tag to compare

@zbryikt zbryikt released this 05 Oct 03:39
  • upgrade devdeps for vulnerabilities fixing

2.1.0

Choose a tag to compare

@zbryikt zbryikt released this 16 Sep 18:09
  • add scale() api for getting map scale

2.0.1

Choose a tag to compare

@zbryikt zbryikt released this 20 Jul 12:35
  • bug fix: SVG element should be created with namespace.
  • upgrade dev dependencies and do audit fix

2.0.0

Choose a tag to compare

@zbryikt zbryikt released this 22 Jan 03:34
  • add browser field in package.json.
  • upgrade modules
  • patch test code to make it work with upgraded modules
  • release with compact directory structure

1.0.0

Choose a tag to compare

@zbryikt zbryikt released this 17 Dec 12:08
  • remove scoping ( scope by build script )
  • patch window only if module doesn't exist
  • tweak API interface: now pdmaptw itself is a constructor
  • construct necessary DOM based on any type of root.
  • map data is now js file so we can easily import.
  • fire hover event instead of callback by popup for hover event.
  • download and rebuild map files
  • upgrade dependencies

0.0.4

Choose a tag to compare

@zbryikt zbryikt released this 23 Jan 02:41
  • remove useless dependency.