Skip to content
Agentmart
Submit a tool

taiwan-garbage

查台北市、新北市與台中市的垃圾車清運點、路線與停靠時間。垃圾車、倒垃圾、垃圾時間、清運點、資源回收車、幾點來、今天有沒有收垃圾的問題適用。免登入,台北用臺北市資料大平臺 CSV,新北用新北市資料開放平臺 JSON,台中用台中市政府資料開放平臺(經 data.gov.tw…

Skill by tahodev

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tahodev-taiwan-garbage

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

查台北市、新北市與台中市的垃圾車清運點、路線與停靠時間。垃圾車、倒垃圾、垃圾時間、清運點、資源回收車、幾點來、今天有沒有收垃圾的問題適用。免登入,台北用臺北市資料大平臺 CSV,新北用新北市資料開放平臺 JSON,台中用台中市政府資料開放平臺(經 data.gov.tw 資源下載)。其他縣市尚未支援;是計畫停靠時間,不是即時 GPS。

Use cases: spreadsheets, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/taiwan-garbage

What's inside

Skill name
taiwan-garbage
Description
查台北市、新北市與台中市的垃圾車清運點、路線與停靠時間。垃圾車、倒垃圾、垃圾時間、清運點、資源回收車、幾點來、今天有沒有收垃圾的問題適用。免登入,台北用臺北市資料大平臺 CSV,新北用新北市資料開放平臺 JSON,台中用台中市政府資料開放平臺(經 data.gov.tw 資源下載)。其他縣市尚未支援;是計畫停靠時間,不是即時 GPS。
License
MIT
Metadata
locale: zh-TW · category: city
Instructions
154 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# taiwan-garbage

> 實測日:2026-09-12(最近一次端對端實測;數值基準日各自標於內文)

查垃圾車清運點與停靠時間。台北市用 data.taipei 的 CSV,新北市用 data.ntpc.gov.tw 的 JSON API,台中市用 newdatacenter.taichung.gov.tw 的資源下載(經 data.gov.tw 資料集 84004),都免登入、免 API 金鑰。三市資料格式完全不同,見各自章節。

## 基本流程

1. 依城市下載對應資料
2. 依行政區、里別、地址或經緯度篩選
3. 用現在時間(Asia/Taipei)找出「下一班車」;新北資料可再依星期幾判斷「今天有沒有收」

## 台北市(data.taipei CSV)

### 1. 下載

```bash
curl -sLm 30 'https://data.taipei/api/dataset/6bb3304b-4f46-4bb0-8cd1-60c66dcd1cae/resource/a6e90031-7ec4-4089-afb5-361a4efe7202/download' -o /tmp/tpe_garbage.csv
```

2026-09-09 實測:HTTP 200、`text/csv`、約 550KB、UTF-8(有 BOM)。這是計畫停靠時間的靜態路線資料,不是即時 GPS;每次使用重新下載即可。

**下載連結的 resource id 可能更換。** 若 404,打開資料集頁 https://data.taipei/dataset/detail?id=6bb3304b-4f46-4bb0-8cd1-60c66dcd1cae ,在頁面原始碼找 `/api/dataset/<資料集id>/resource/<新的resource id>/download` 形式的連結替換。

### 2. 欄位

```
行政區,里別,分隊,局編,車號,路線,車次,抵達時間,離開時間,地點,經度,緯度
```

- `抵達時間` / `離開時間` 是 `HHMM` 字串(例如 `1630` = 16:30)。
- 一個里可能有多個清運點、多個車次。
- `經度` / `緯度` 可拿來算離指定座標最近的清運點。

### 3. 查詢範例

```bash
# 去掉 BOM 後,查某個里的所有清運點
sed '1s/^\xef\xbb\xbf//' /tmp/tpe_garbage.csv > /tmp/g.csv
awk -F',' '$2=="天壽里" {print $10, "抵達", $8, "離開", $9, "(" $6 " " $7 ")"}' /tmp/g.csv

# 找出大安區今天 18:00 之後還會到的點(時間是 HHMM 字串,可直接比字串)
awk -F',' '$1=="大安區" && $8>="1800" {print $2, $10, "抵達", $8}' /tmp/g.csv | sort -t' ' -k3

# 找離指定座標最近的 5 個清運點(以緯度 25.033、經度 121.565 為例)
awk -F',' -v la=25.033 -v lo=121.565 'NR>1 {
  d=($12-la)*($12-la)+($11-lo)*($11-lo); printf "%.8f %s %s %s 抵達%s\n", d, $1, $2, $10, $8
}' /tmp/g.csv | sort -n | head -5
```

「下一班車」的做法:把現在時間(Asia/Taipei)轉成 `HHMM`,篩出同里且 `抵達時間` 大於現在的列,取最早的一班,回報地點、抵達時間、路線與車次。

## 新北市(data.ntpc.gov.tw JSON)

### 1. 下載(分頁)

```bash
curl -sm 30 'https://data.ntpc.gov.tw/api/datasets/EDC3AD26-8AE7-4916-A00B-BC6048D19BF8/json?page=0&size=10000' -o /tmp/ntpc_g0.json
curl -sm 30 'https://data.ntpc.gov.tw/api/datasets/EDC3AD26-8AE7-4916-A00B-BC6048D19BF8/json?page=1&size=10000' -o /tmp/ntpc_g1.json
curl -sm 30 'https://data.ntpc.gov.tw/api/datasets/EDC3AD26-8AE7-4916-A00B-BC6048D19BF8/json?page=2&size=10000' -o /tmp/ntpc_g2.json
jq -s 'add' /tmp/ntpc_g0.json /tmp/ntpc_g1.json /tmp/ntpc_g2.json > /tmp/ntpc_g.json
```

2026-09-09 實測:HTTP 200;全量 26,655 列(page 0/1 各 10,000 列、page 2 有 6,655 列),每頁約 5-7MB。**size 上限 10,000,不給 page 參數只會拿到第一頁**,務必分頁抓到空頁為止。資料量大,短時間內重複查詢請用同一份快取。

### 2. 欄位

| 欄位 | 意義 |
| --- | --- |
| `city` | 行政區(板橋區、新店區…) |
| `village` | 里別 |
| `lineid` / `linename` | 路線編號 / 路線名 |
| `rank` | 停靠順序 |
| `name` | 清運點地點描述 |
| `longitude` / `latitude` | 座標(字串) |
| `time` | 停靠時間 `HH:MM`(字串) |
| `garbagemonday`…`garbagesunday` | 該日是否收一般垃圾(`Y` = 有,空字串 = 無) |
| `recyclingmonday`…`recyclingsunday` | 該日是否收資源回收(`Y` = 有) |
| `memo` | 備註 |

### 3. 查詢範例

```bash
# 板橋區今天晚上 18:00 後還會到的點
jq -r '.[] | select(.city=="板橋區" and .time>="18:00") | "\(.village) \(.name) \(.time) \(.linename)"' /tmp/ntpc_g.json | sort -t' ' -k3 | head

# 星期三有收垃圾的點(garbagewednesday == "Y")
jq -r '.[] | select(.city=="新店區" and .garbagewednesday=="Y") | "\(.village) \(.name) \(.time)"' /tmp/ntpc_g.json | head

# 離指定座標最近且今天(以星期五為例)有收的 5 個點
jq -r --argjson la 25.012 --argjson lo 121.465 '
  [.[] | select(.garbagefriday=="Y")
   | . + {d: ((.latitude|tonumber)-$la)*((.latitude|tonumber)-$la) + ((.longitude|tonumber)-$lo)*((.longitude|tonumber)-$lo)}]
  | sort_by(.d) | .[0:5][] | "\(.city)\(.village) \(.name) \(.time)"' /tmp/ntpc_g.json
```

「今天有沒有收」的做法:把今天星期幾對到 `garbage<english weekday>` 欄位(`monday`~`sunday` 全小寫),`Y` 就是有收;資源回收看 `recycling<weekday>`。注意例假日、國定假日與颱風天的停收異動以新北市政府環境保護局公告為準。

## 台中市(newdatacenter.taichung.gov.tw,經 data.gov.tw 84004)

### 1. 下載

```bash
curl -sm 60 'https://newdatacenter.taichung.gov.tw/api/v1/no-auth/resource.download?rid=68d1a87f-7baa-4b50-8408-c36a3a7eda68' -o /tmp/tc_g.json
```

2026-09-12 實測:HTTP 200、13.7MB JSON 陣列、20,090 列。CSV 版本(4.7MB,UTF-8 有 BOM)rid 是 `3275290e-2375-437e-b7b1-998a4b4907b8`,內容相同,擇一即可。

**要用資源 rid 的 no-auth 下載路徑。** 直接拿資料集 id(84004)打 API 會得到 HTTP 200 但內容是 `{"success":false,"code":401,"s_message":"NO_AUTH"}`——這不是資料過期,是路徑錯誤。資源 rid 若更換,回資料集頁 https://data.gov.tw/dataset/84004 找 `DataDownload` 的 `contentUrl`(頁面原始碼內)替換。資料集標示「不定期更新」,資料本身沒有更新日期欄位。

### 2. 欄位

| 欄位 | 意義 |
| --- | --- |
| `area` | 行政區(全台中 29 區) |
| `village` | 里別 |
| `car_licence` | 車牌號碼 |
| `caption` | 清運點地址描述(**無經緯度**,只有地址文字) |
| `task_type` | 收運方式:`沿街`(19,114 列)、`定點`(957)、`往廠`(19) |

From tahodev/baodao-skill, MIT.

More from tahodev/baodao-skill

Signals

Stars
1
Forks
0
Open issues
1
Last commit (this folder)
Sep 26, 2026 (1 month ago)
Last release
Oct 12, 2026 (15 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from tahodev

Cite this page

taiwan-garbage skill. Agent Mart. https://agentmart.dev/skills/tahodev-taiwan-garbage (last updated 2026-10-24)