狠狠撸

狠狠撸Share a Scribd company logo
用 Ruby 操作 OSM 資料批次匯入:

以 YouBike 微笑單車開放
資料為例
Huei-Horng Yo (hiroshiyui) <hiroshi@ghostsinthelab.org>
本簡報檔案內容,除引用材料另依其個別授權規定,
歡迎諸方大德依 CC BY-SA 条款自由取用。
我爱自行车
我愛 Ruby 程式語言
當然,我愛 OpenStreetMap
我也好愛 YouBike 啊啊啊
开端
尋覓
●

●

找到資料所在:
臺北市公共自行車租借站及價格資料
確定 OSM 有公共自行車可用的 tag :
Tag:amenity=bicycle_rental - OpenStreet
Map Wiki
验证
验证
●

●

●

南港展覽館站有重複的兩筆 YouBike 租賃站資
料
一個應該是自己標定的點位,離實際租賃站有些
微偏離(該處事實上應是自行車停車位…)
一個是符合我所知的實際租賃站所在,但是與我
從北市府拿到的資料,座標的資料精確度卻多了
一位數?
验证
●

●

我開始懷疑是我拿到的資料的座標系統大地基準
問題 (TWD67? TWD97? WGS84?)
打去北市府問是哪種,說要給我回電回覆,結果
沒有下文
验证
验证
●

●

●

對照凌雲市場租賃站的位置,發現北市府提供的
座標資料比較符合我對此站位置的認知(靠近橋
邊)
至此可以假設北市府釋出的這份資料有一定的可
信度
But!
But! 人生就是充滿了各種 But!
●

北市府提供的靜態資料
–
–

●

CSV 版停在今年五月天
JSON 版則停在九月底

偏偏之後 YouBike 多了好幾站
But! 人生就是充滿了各種 But!
●

寫信去問能不能再匯出一份最新的租賃站靜態資
料
–
–

●

叫我去申請「介接臺北市即時交通資訊」
申請機關?統一編號?申請單位印信?

喂,北市府,我只是要一份當下最正確的租賃站
座標資料啊!
呵呵,沒有人理我
●

g0v.tw 座右銘:
–

不要問為何沒有人做這個,先承認你就是「沒有
人」。

–

因為,「沒有人」是萬能的。
自己動手,豐衣足食
●

https://github.com/hiroshiyui/youbike

●

用我最熟手的 Ruby 去撈 YouBike 租賃點資料

●

支援三種格式
–

.CSV (仿北市府提供欄位)

–

.JSON (仿北市府提供欄位)

–

.OSM (可供 JSOM 匯入處理的 XML 格式)
Demo
谢谢!

More Related Content

Featured (20)

PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
PDF
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
PDF
Everything You Need To Know About ChatGPT
Expeed Software
?
PDF
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
PDF
Skeleton Culture Code
Skeleton Technologies
?
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
PDF
Content Methodology: A Best Practices Report (Webinar)
contently
?
PPTX
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
PDF
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
PDF
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
PDF
Getting into the tech field. what next
Tessa Mero
?
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
PDF
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?

用 Ruby 操作 OSM 資料批次匯入:以 YouBike 微笑單車租借站資料為例