Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GTFS with Tidytransit package
Search
nonki1974
May 28, 2023
Technology
330
0
Share
GTFS with Tidytransit package
Yakitori.R#03(2023/05/27)のLTで話した内容です
nonki1974
May 28, 2023
More Decks by nonki1974
See All by nonki1974
TokyoR#84_Rexams
nonki1974
0
220
都道府県別焼き鳥屋ランキングの作成
nonki1974
1
920
Introduction to R
nonki1974
0
370
Introduction to dplyr
nonki1974
0
540
Introduction to ggplot2
nonki1974
1
530
Analyzing PSB tracks with R
nonki1974
0
600
introduction to fukuoka.R @ Fukuoka.LT
nonki1974
0
75
所要時間のヒートマップを作成する
nonki1974
0
590
gtfsr package @ fukuoka.R #11
nonki1974
0
350
Other Decks in Technology
See All in Technology
みんなの「データ活用」を支えるストレージ担当から持ち込むAWS活用/コミュニティー設計TIPS 10選~「作れる」より、「続けられる」設計へ~
yoshiki0705
0
250
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
370
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
600
The Journey of Box Building
tagomoris
4
2.8k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
Hacobu Tech Deck
hacobu
PRO
0
110
QGISプラグイン CMChangeDetector
naokimuroki
1
410
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
0
1.5k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.3k
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
170
AI와 협업하는 조직으로의 여정
arawn
0
450
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
230
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Test your architecture with Archunit
thirion
1
2.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
340
ラッコキーワード サービス紹介資料
rakko
1
3.1M
Navigating Weather and Climate Data
rabernat
0
170
Everyday Curiosity
cassininazir
0
200
HDC tutorial
michielstock
2
630
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Transcript
GTFS with Tidytransit package @nonki1974
None
GTFS General Transit Feed Specification / / /
/
| Zip agency.txt stops.txt routes.txt trips.txt stop_times.txt calendar.txt calendar_dates.txt fare_attributes.txt
fare_rules.txt shapes.txt frequencies.txt transferes.txt feed_info.txt
stop_times.txt
route.txt
Tidytransit package
GTFS https://ckan.odpt.org/dataset/b_bus_gtfs_jp-toei
GTFS -> sf toeibus <- read_gtfs("./ToeiBus-GTFS.zip") # attributionsのidが空になっているので警告が出る # GTFSオブジェクトとして読み込まれず単なるリストになる
# 修正してから as_tidygtfs() 関数で改めてGTFSオブジェクトに変換 toeibus$attributions$attribution_id <- 1:2 toeibus <- as_tidygtfs(toeibus) toeibus <- gtfs_as_sf(toeibus) ggplot(toeibus$shapes) + geom_sf() + theme_minimal() ggplot(toeibus$stops) + geom_sf() + theme_minimal()
None
None
leaflet leaflet() %>% addTiles() %>% addPolylines(data = toeibus$shapes) %>% addMarkers(
data = toeibus$stops, label = toeibus$stops$stop_name )
leaflet
None
Enjoy!!