OsmHackTW / address-TW

open data set of government released address nodes
1 stars 1 forks source link

Some rows don't adhere to the CSV header #5

Open jaller94 opened 1 week ago

jaller94 commented 1 week ago

Starting in line 112, there's an additional column in the file 新北市門牌位置數值資料-20240709-street-special.csv. The line does not match the fields from the CSV header. This makes CSV parsing impossible.

https://github.com/OsmHackTW/address-TW/blob/45dbfbebc0c7e2834258ab5637aab8afb495665f/New%20Taipei/%E6%96%B0%E5%8C%97%E5%B8%82%E9%96%80%E7%89%8C%E4%BD%8D%E7%BD%AE%E6%95%B8%E5%80%BC%E8%B3%87%E6%96%99-20240709-street-special.csv#L112

When parsing by commas, we get the following data for row 111 (correct amount of commas) and 112 (one comma too many):

Map(14) {
  "addr:TW:dataset": "168887",
  "source": "新北市政府",
  "addr:couontry": "TW",
  "addr:city": "新北市",
  "addr:district": "新莊區",
  "addr:hamlet": "光華里",
  "addr:neighbourhood": "027",
  "addr:street": "民安西路",
  "addr:housenumber": "384號",
  "addr:floor": "11",
  "addr:unit": "1A",
  "addr:full": "新北市新莊區光華里027鄰民安西路384號十一樓之1A室",
  "x_3826": "293211.945100",
  "y_3826": "2766972.0470000",
}
Map(14) {
  "addr:TW:dataset": "168887",
  "source": "新北市政府",
  "addr:couontry": "TW",
  "addr:city": "新北市",
  "addr:district": "金山區",
  "addr:hamlet": "美田里",
  "addr:neighbourhood": "021",
  "addr:street": "中山路",
  "addr:housenumber": "A區",
  "addr:floor": "395號",
  "addr:unit": "11",
  "addr:full": "6",
  "x_3826": "新北市金山區美田里021鄰中山路395號A區十一樓之6",
  "y_3826": "313797.382454",
}
jaller94 commented 1 week ago