From c63f3d9d3b10a996f4148640ae4390051924bd5b Mon Sep 17 00:00:00 2001 From: Flavio Poletti Date: Thu, 17 Oct 2024 17:47:00 +0200 Subject: [PATCH] rename google_transit_nyc_subway.zip to nyc_subway.zip --- R/filters.R | 2 +- R/geo.R | 6 +++--- R/io.R | 2 +- R/plot.R | 2 +- R/raptor.R | 2 +- R/summary.R | 2 +- R/travel_times.R | 2 +- R/validate_gtfs.R | 2 +- ...google_transit_nyc_subway.zip => nyc_subway.zip} | Bin man/cluster_stops.Rd | 2 +- man/filter_stops.Rd | 2 +- man/plot.tidygtfs.Rd | 2 +- man/print.tidygtfs.Rd | 2 +- man/raptor.Rd | 2 +- man/read_gtfs.Rd | 2 +- man/stop_distances.Rd | 2 +- man/stop_group_distances.Rd | 2 +- man/travel_times.Rd | 2 +- man/validate_gtfs.Rd | 2 +- tests/testthat/test-read-gtfs.R | 2 +- tests/testthat/test-spatial.R | 4 ++-- tests/testthat/test-travel_times.R | 2 +- tests/testthat/test-utils.R | 2 +- vignettes/frequency.Rmd | 2 +- vignettes/introduction.Rmd | 2 +- vignettes/servicepatterns.Rmd | 2 +- vignettes/timetable.Rmd | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) rename inst/extdata/{google_transit_nyc_subway.zip => nyc_subway.zip} (100%) diff --git a/R/filters.R b/R/filters.R index 6a1e57f2..28609a03 100644 --- a/R/filters.R +++ b/R/filters.R @@ -8,7 +8,7 @@ #' @export #' @examples \donttest{ #' library(dplyr) -#' local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(local_gtfs_path) #' select_service_id <- filter(nyc$calendar, monday==1) %>% pull(service_id) #' select_route_id <- sample_n(nyc$routes, 1) %>% pull(route_id) diff --git a/R/geo.R b/R/geo.R index 4d1d5f13..9b3bd77b 100644 --- a/R/geo.R +++ b/R/geo.R @@ -13,7 +13,7 @@ #' \dontrun{ #' library(dplyr) #' -#' nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(nyc_path) #' #' nyc$stops %>% @@ -103,7 +103,7 @@ prep_dist_mtrx = function(dist_list) { #' \dontrun{ #' library(dplyr) #' -#' nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(nyc_path) #' #' stop_group_distances(nyc$stops) @@ -185,7 +185,7 @@ stop_group_distances = function(gtfs_stops, by = "stop_name") { #' @importFrom stats kmeans #' @examples \donttest{ #' library(dplyr) -#' nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(nyc_path) #' nyc <- cluster_stops(nyc) #' diff --git a/R/io.R b/R/io.R index ea32c456..740f1d6b 100644 --- a/R/io.R +++ b/R/io.R @@ -17,7 +17,7 @@ #' @seealso [validate_gtfs()], [write_gtfs()] #' #' @examples \dontrun{ -#' local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' gtfs <- read_gtfs(local_gtfs_path) #' summary(gtfs) #' diff --git a/R/plot.R b/R/plot.R index 06041906..eaea9822 100644 --- a/R/plot.R +++ b/R/plot.R @@ -6,7 +6,7 @@ #' #' @examples \donttest{ #' local_gtfs_path <- system.file("extdata", -#' "google_transit_nyc_subway.zip", +#' "nyc_subway.zip", #' package = "tidytransit") #' nyc <- read_gtfs(local_gtfs_path) #' plot(nyc) diff --git a/R/raptor.R b/R/raptor.R index 2d74330e..f539c27d 100644 --- a/R/raptor.R +++ b/R/raptor.R @@ -50,7 +50,7 @@ #' @import data.table #' @export #' @examples \donttest{ -#' nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(nyc_path) #' #' # you can use initial walk times to different stops in walking distance (arbitrary example values) diff --git a/R/summary.R b/R/summary.R index f719c66f..27b000eb 100644 --- a/R/summary.R +++ b/R/summary.R @@ -10,7 +10,7 @@ #' #' @examples \dontrun{ #' path = system.file("extdata", -#' "google_transit_nyc_subway.zip", +#' "nyc_subway.zip", #' package = "tidytransit") #' #' g = read_gtfs(path) diff --git a/R/travel_times.R b/R/travel_times.R index 9b38ae78..9cee7574 100644 --- a/R/travel_times.R +++ b/R/travel_times.R @@ -69,7 +69,7 @@ #' #' # 2) separate filtering and travel time calculation for a more granular analysis #' # stop_names in this feed are not restricted to an area, create clusters of stops to fix -#' nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' nyc <- read_gtfs(nyc_path) #' nyc <- cluster_stops(nyc, group_col = "stop_name", cluster_colname = "stop_name") #' diff --git a/R/validate_gtfs.R b/R/validate_gtfs.R index 86b7a1b9..c3e05ef2 100644 --- a/R/validate_gtfs.R +++ b/R/validate_gtfs.R @@ -60,7 +60,7 @@ #' #> # 2 more variables: validation_status , validation_details #' #' \dontrun{ -#' local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +#' local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") #' gtfs <- read_gtfs(local_gtfs_path) #' attr(gtfs, "validation_result") #' diff --git a/inst/extdata/google_transit_nyc_subway.zip b/inst/extdata/nyc_subway.zip similarity index 100% rename from inst/extdata/google_transit_nyc_subway.zip rename to inst/extdata/nyc_subway.zip diff --git a/man/cluster_stops.Rd b/man/cluster_stops.Rd index fa424f8e..ee3479d8 100644 --- a/man/cluster_stops.Rd +++ b/man/cluster_stops.Rd @@ -39,7 +39,7 @@ which contains the \code{group_col} value and the cluster number. \examples{ \donttest{ library(dplyr) -nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) nyc <- cluster_stops(nyc) diff --git a/man/filter_stops.Rd b/man/filter_stops.Rd index ab1cebf9..fc405346 100644 --- a/man/filter_stops.Rd +++ b/man/filter_stops.Rd @@ -22,7 +22,7 @@ Get a set of stops for a given set of service ids and route ids \examples{ \donttest{ library(dplyr) -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(local_gtfs_path) select_service_id <- filter(nyc$calendar, monday==1) \%>\% pull(service_id) select_route_id <- sample_n(nyc$routes, 1) \%>\% pull(route_id) diff --git a/man/plot.tidygtfs.Rd b/man/plot.tidygtfs.Rd index 532d3b48..0774a232 100644 --- a/man/plot.tidygtfs.Rd +++ b/man/plot.tidygtfs.Rd @@ -20,7 +20,7 @@ Plot GTFS stops and trips \examples{ \donttest{ local_gtfs_path <- system.file("extdata", - "google_transit_nyc_subway.zip", + "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(local_gtfs_path) plot(nyc) diff --git a/man/print.tidygtfs.Rd b/man/print.tidygtfs.Rd index 0672a1fc..8d1fba04 100644 --- a/man/print.tidygtfs.Rd +++ b/man/print.tidygtfs.Rd @@ -21,7 +21,7 @@ validation_result attribute, created with \code{\link[=validate_gtfs]{validate_g \examples{ \dontrun{ path = system.file("extdata", - "google_transit_nyc_subway.zip", + "nyc_subway.zip", package = "tidytransit") g = read_gtfs(path) diff --git a/man/raptor.Rd b/man/raptor.Rd index 03b1a547..6a1ae737 100644 --- a/man/raptor.Rd +++ b/man/raptor.Rd @@ -71,7 +71,7 @@ until it exceeds \code{max_transfers} or all trips in \code{stop_times} have bee } \examples{ \donttest{ -nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) # you can use initial walk times to different stops in walking distance (arbitrary example values) diff --git a/man/read_gtfs.Rd b/man/read_gtfs.Rd index cf82416f..afd47d20 100644 --- a/man/read_gtfs.Rd +++ b/man/read_gtfs.Rd @@ -28,7 +28,7 @@ GTFS specifications. } \examples{ \dontrun{ -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs <- read_gtfs(local_gtfs_path) summary(gtfs) diff --git a/man/stop_distances.Rd b/man/stop_distances.Rd index 13c8c670..3f4436ba 100644 --- a/man/stop_distances.Rd +++ b/man/stop_distances.Rd @@ -25,7 +25,7 @@ among all stops for large feeds should be avoided. \dontrun{ library(dplyr) -nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) nyc$stops \%>\% diff --git a/man/stop_group_distances.Rd b/man/stop_group_distances.Rd index 4c7d71e1..99fdbada 100644 --- a/man/stop_group_distances.Rd +++ b/man/stop_group_distances.Rd @@ -24,7 +24,7 @@ By default calculates distances among stop_ids with the same stop_name. \dontrun{ library(dplyr) -nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) stop_group_distances(nyc$stops) diff --git a/man/travel_times.Rd b/man/travel_times.Rd index 36edccda..5fe1a826 100644 --- a/man/travel_times.Rd +++ b/man/travel_times.Rd @@ -96,7 +96,7 @@ all(tts1 == tts2) # 2) separate filtering and travel time calculation for a more granular analysis # stop_names in this feed are not restricted to an area, create clusters of stops to fix -nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) nyc <- cluster_stops(nyc, group_col = "stop_name", cluster_colname = "stop_name") diff --git a/man/validate_gtfs.Rd b/man/validate_gtfs.Rd index d2408753..20715fec 100644 --- a/man/validate_gtfs.Rd +++ b/man/validate_gtfs.Rd @@ -74,7 +74,7 @@ validate_gtfs(gtfs_duke) #> # 2 more variables: validation_status , validation_details \dontrun{ -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs <- read_gtfs(local_gtfs_path) attr(gtfs, "validation_result") diff --git a/tests/testthat/test-read-gtfs.R b/tests/testthat/test-read-gtfs.R index d7d3f92d..7235bfff 100644 --- a/tests/testthat/test-read-gtfs.R +++ b/tests/testthat/test-read-gtfs.R @@ -14,7 +14,7 @@ test_that("read_gtfs() imports a local file to a list of test_that("reading a real feed", { skip_on_cran() - g_nyc_path = system.file("extdata", "google_transit_nyc_subway.zip", + g_nyc_path = system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs_obj = read_gtfs(g_nyc_path) diff --git a/tests/testthat/test-spatial.R b/tests/testthat/test-spatial.R index 18254012..d166a811 100644 --- a/tests/testthat/test-spatial.R +++ b/tests/testthat/test-spatial.R @@ -149,7 +149,7 @@ test_that("stop_group_distances", { test_that("stop_group_distances real feed", { skip_on_cran() - g_nyc = read_gtfs(system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit")) + g_nyc = read_gtfs(system.file("extdata", "nyc_subway.zip", package = "tidytransit")) x1 = stop_group_distances(g_nyc$stops) @@ -170,7 +170,7 @@ test_that("stop_group_distances real feed", { test_that("stops cluster", { skip_on_cran() - g_nyc = read_gtfs(system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit")) + g_nyc = read_gtfs(system.file("extdata", "nyc_subway.zip", package = "tidytransit")) g_nyc2 <- filter_feed_by_area(g_nyc, c(-74.0144, 40.7402, -73.9581, 40.7696)) x1 = cluster_stops(g_nyc2$stops) diff --git a/tests/testthat/test-travel_times.R b/tests/testthat/test-travel_times.R index fcce5607..1852ed25 100644 --- a/tests/testthat/test-travel_times.R +++ b/tests/testthat/test-travel_times.R @@ -158,7 +158,7 @@ test_that("feed without transfers", { test_that("nyc feed", { skip_on_cran() - nyc_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") + nyc_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(nyc_path) .child_index = which(nyc$stops$location_type == 0) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 820687a0..47aedebe 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -80,7 +80,7 @@ test_that("filter_feed with shapes", { test_that("filter_feed_by_date", { skip_on_cran() - g0 = read_gtfs(system.file("extdata", "google_transit_nyc_subway.zip", + g0 = read_gtfs(system.file("extdata", "nyc_subway.zip", package = "tidytransit")) g1 = filter_feed_by_date(g0, "2018-06-28") g2 = filter_feed_by_date(g0, "2018-10-30") diff --git a/vignettes/frequency.Rmd b/vignettes/frequency.Rmd index dd7b7180..8abe8642 100644 --- a/vignettes/frequency.Rmd +++ b/vignettes/frequency.Rmd @@ -50,7 +50,7 @@ We'll start by importing a snapshot of the NYC MTA's subway schedule, which is i with the package when [installed](https://r-transit.github.io/tidytransit/index.html#installation). ```{r} -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs <- read_gtfs(local_gtfs_path) ``` diff --git a/vignettes/introduction.Rmd b/vignettes/introduction.Rmd index 9d6cbe1a..def0e451 100644 --- a/vignettes/introduction.Rmd +++ b/vignettes/introduction.Rmd @@ -74,7 +74,7 @@ section on "Finding More GTFS Feeds" for more sources of feeds. # nyc <- read_gtfs("http://web.mta.info/developers/data/nyct/subway/google_transit.zip") local_gtfs_path <- system.file("extdata", - "google_transit_nyc_subway.zip", + "nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(local_gtfs_path) ``` diff --git a/vignettes/servicepatterns.Rmd b/vignettes/servicepatterns.Rmd index a5fdf1bd..574c615b 100644 --- a/vignettes/servicepatterns.Rmd +++ b/vignettes/servicepatterns.Rmd @@ -39,7 +39,7 @@ as a sample feed with tidytransit but you can read it directly from the MTA's we that some routes and services have been removed from the feed to reduce package size. ```{r} -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs <- read_gtfs(local_gtfs_path) # gtfs <- read_gtfs("http://web.mta.info/developers/data/nyct/subway/google_transit.zip") ``` diff --git a/vignettes/timetable.Rmd b/vignettes/timetable.Rmd index 96a3a1e8..0c6316e9 100644 --- a/vignettes/timetable.Rmd +++ b/vignettes/timetable.Rmd @@ -26,7 +26,7 @@ We use a feed from the New York Metropolitan Transportation Authority. It is pro sample feed with tidytransit but you can read it directly from the MTA's website. ```{r} -local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") +local_gtfs_path <- system.file("extdata", "nyc_subway.zip", package = "tidytransit") gtfs <- read_gtfs(local_gtfs_path) # gtfs <- read_gtfs("http://web.mta.info/developers/data/nyct/subway/google_transit.zip") ```