Created
October 27, 2021 18:01
-
-
Save rafapereirabr/2d8eb860721710e4f631c0f76f6c87ea to your computer and use it in GitHub Desktop.
test gtfs2gps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gtfs2gps) | |
library(gtfsrouter) | |
# original process | |
sp <- system.file("extdata/saopaulo.zip", package ="gtfs2gps") | |
time_gps <- system.time(gps_gps <- gtfs2gps(sp, parallel = T, spatial_resolution = 200)) | |
# convert freq to stoptimes | |
sp_router <- extract_gtfs(filename = sp) | |
time_convertfreq <- system.time( gtfs_router <- gtfsrouter::frequencies_to_stop_times(sp_router) ) | |
write_gtfs(gtfs_router, 'gtfs_router.zip') | |
time_router <- system.time(gps_router <- gtfs2gps('gtfs_router.zip', parallel = T, spatial_resolution = 200)) | |
# compare computin time | |
time_gps | |
(time_router + time_gps) | |
> time_gps | |
user system elapsed | |
7.07 1.47 40.18 | |
> (time_router + time_gps) | |
user system elapsed | |
10.78 2.97 86.29 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment