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
0
200
GTFS with Tidytransit package
Yakitori.R#03(2023/05/27)のLTで話した内容です
nonki1974
May 28, 2023
Tweet
Share
More Decks by nonki1974
See All by nonki1974
TokyoR#84_Rexams
nonki1974
0
170
都道府県別焼き鳥屋ランキングの作成
nonki1974
1
710
Introduction to R
nonki1974
0
300
Introduction to dplyr
nonki1974
0
350
Introduction to ggplot2
nonki1974
1
420
Analyzing PSB tracks with R
nonki1974
0
510
introduction to fukuoka.R @ Fukuoka.LT
nonki1974
0
54
所要時間のヒートマップを作成する
nonki1974
0
380
gtfsr package @ fukuoka.R #11
nonki1974
0
270
Other Decks in Technology
See All in Technology
0→1開発における技術選定において一番大切なこと
bicstone
1
320
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.3k
Data and AI Governance: Existing Challenges and Emerging Trends
scotthsieh825
0
150
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
3
780
シン・Kafka / shin-kafka
oracle4engineer
PRO
7
2.7k
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
24
5.1k
2024/4/26 コンピュータ歴史博物館解説告知
toshi_atsumi
0
200
o11y入門_外形監視を利用したWebアプリケーションへの最適なモニタリング_TechBrew
k5k
3
100
AWS を使う上で知っておきたいオンプレミス知識/aws-on-premise-essentials
emiki
1
4.2k
転移学習とドメイン適応の基礎
kmatsui
2
570
Janus
bkuhlmann
1
490
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Building an army of robots
kneath
300
41k
Thoughts on Productivity
jonyablonski
57
3.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
39
4.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
11
4.6k
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Typedesign – Prime Four
hannesfritz
36
2.1k
We Have a Design System, Now What?
morganepeng
42
6.7k
What's new in Ruby 2.0
geeforr
337
31k
The Invisible Customer
myddelton
114
12k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
115
18k
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!!