Skip to content

Commit c93755c

Browse files
committed
Update README and code to k5cents
1 parent 2feb547 commit c93755c

7 files changed

+33
-34
lines changed

R/api.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ wmata_api <- function(path, query = NULL, ..., level, api_key = wmata_key()) {
3030
query = query,
3131
httr::accept_json(),
3232
httr::add_headers(api_key = api_key),
33-
httr::user_agent("https://github.com/kiernann/metro/"),
33+
httr::user_agent("https://github.com/k5cents/metro/"),
3434
terminate_on = c(400:417)
3535
)
3636
if (httr::http_type(resp) != "application/json") {

R/rail-position.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rail_positions <- function(api_key = wmata_key()) {
6464
)
6565
if (length(dat) == 0) {
6666
warning("Using example data until issue is resolved: ",
67-
"https://github.com/kiernann/metro/issues/16")
67+
"https://github.com/k5cents/metro/issues/16")
6868
example_file <- system.file("TrainPositions.json", package = "metro")
6969
dat <- jsonlite::fromJSON(example_file, flatten = TRUE)[[1]]
7070
}

R/rail-times.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ rail_times <- function(StationCode = NULL, api_key = wmata_key()) {
5151
)
5252
if (length(dat$Monday$FirstTrains[[1]]) == 0) {
5353
warning("Using example data until issue is resolved: ",
54-
"https://github.com/kiernann/metro/issues/15")
54+
"https://github.com/k5cents/metro/issues/15")
5555
example_file <- system.file("jStationTimes.json", package = "metro")
5656
dat <- jsonlite::fromJSON(example_file)[[1]]
5757
}

README.Rmd

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Or install the development version from [GitHub][gh]:
5050

5151
```{r install_github, eval=FALSE}
5252
# install.packages("devtools")
53-
devtools::install_github("kiernann/metro")
53+
devtools::install_github("k5cents/metro")
5454
```
5555

5656
## Key
@@ -62,7 +62,7 @@ The WMATA also provides a [demo key][demo] to try out the various features of
6262
the API. This key should **never** be used in production, it is rate limited and
6363
subject to change at any time.
6464

65-
```{r key}
65+
```{r key, eval=FALSE}
6666
Sys.setenv(WMATA_KEY = "e13626d03d8e4c03ac07f95541b3091b")
6767
```
6868

@@ -122,14 +122,14 @@ metro_lines # rail_lines() for live
122122
[life_link]: https://lifecycle.r-lib.org/articles/stages.html#stable
123123
[cran_badge]: https://www.r-pkg.org/badges/version/metro
124124
[cran_link]: https://CRAN.R-project.org/package=metro
125-
[ga_badge]: https://github.com/kiernann/metro/workflows/R-CMD-check/badge.svg
126-
[ga_link]: https://github.com/kiernann/metro/actions
127-
[cov_badge]: https://img.shields.io/codecov/c/github/kiernann/metro/master.svg
128-
[cov_link]: https://app.codecov.io/gh/kiernann/metro?branch=master'
125+
[ga_badge]: https://github.com/k5cents/metro/workflows/R-CMD-check/badge.svg
126+
[ga_link]: https://github.com/k5cents/metro/actions
127+
[cov_badge]: https://img.shields.io/codecov/c/github/k5cents/metro/master.svg
128+
[cov_link]: https://app.codecov.io/gh/k5cents/metro?branch=master'
129129
[dl_badge]: https://cranlogs.r-pkg.org/badges/grand-total/gluedown
130130
[tidy]: https://en.wikipedia.org/wiki/Tidy_data
131131
[cran]: https://cran.r-project.org/package=metro
132-
[gh]: https://github.com/kiernann/metro
132+
[gh]: https://github.com/k5cents/metro
133133
[demo]: https://developer.wmata.com/products/5475f236031f590f380924ff
134134
[gd]: https://github.com/hypertidy/geodist
135135
[hms]: https://github.com/tidyverse/hms

README.md

+18-19
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ experimental](https://img.shields.io/badge/lifecycle-stable-green)](https://life
1111
status](https://www.r-pkg.org/badges/version/metro)](https://CRAN.R-project.org/package=metro)
1212
![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/gluedown)
1313
[![Codecov test
14-
coverage](https://img.shields.io/codecov/c/github/kiernann/metro/master.svg)](https://app.codecov.io/gh/kiernann/metro?branch=master')
14+
coverage](https://img.shields.io/codecov/c/github/k5cents/metro/master.svg)](https://app.codecov.io/gh/k5cents/metro?branch=master')
1515
[![R build
16-
status](https://github.com/kiernann/metro/workflows/R-CMD-check/badge.svg)](https://github.com/kiernann/metro/actions)
16+
status](https://github.com/k5cents/metro/workflows/R-CMD-check/badge.svg)](https://github.com/k5cents/metro/actions)
1717
<!-- badges: end -->
1818

1919
The goal of metro is to return data frames from the Washington
@@ -31,11 +31,11 @@ install.packages("metro")
3131
```
3232

3333
Or install the development version from
34-
[GitHub](https://github.com/kiernann/metro):
34+
[GitHub](https://github.com/k5cents/metro):
3535

3636
``` r
3737
# install.packages("devtools")
38-
devtools::install_github("kiernann/metro")
38+
devtools::install_github("k5cents/metro")
3939
```
4040

4141
## Key
@@ -59,7 +59,7 @@ Sys.setenv(WMATA_KEY = "e13626d03d8e4c03ac07f95541b3091b")
5959
``` r
6060
library(metro)
6161
packageVersion("metro")
62-
#> [1] '0.9.2'
62+
#> [1] '0.9.3'
6363
```
6464

6565
Functions return data frames for easy analysis.
@@ -69,12 +69,12 @@ next_train(StationCodes = "A01")
6969
#> # A tibble: 6 × 9
7070
#> Car Destination DestinationCode DestinationName Group Line LocationCode LocationName Min
7171
#> <int> <chr> <chr> <chr> <int> <chr> <chr> <chr> <int>
72-
#> 1 6 Glenmont B11 Glenmont 1 RD A01 Metro Center -1
73-
#> 2 6 Shady Grove <NA> Shady Grove 2 RD A01 Metro Center -1
74-
#> 3 8 Glenmont B11 Glenmont 1 RD A01 Metro Center 1
75-
#> 4 8 Glenmont B11 Glenmont 1 RD A01 Metro Center 6
76-
#> 5 6 Shady Grove <NA> Shady Grove 2 RD A01 Metro Center 6
77-
#> 6 6 Shady Grove <NA> Shady Grove 2 RD A01 Metro Center 18
72+
#> 1 6 Glenmont B11 Glenmont 1 RD A01 Metro Center 0
73+
#> 2 8 Friendship <NA> Friendship 2 RD A01 Metro Center 3
74+
#> 3 6 Glenmont B11 Glenmont 1 RD A01 Metro Center 8
75+
#> 4 8 Friendship <NA> Friendship 2 RD A01 Metro Center 10
76+
#> 5 8 Glenmont B11 Glenmont 1 RD A01 Metro Center 15
77+
#> 6 8 Friendship <NA> Friendship 2 RD A01 Metro Center 18
7878
```
7979

8080
### Coordinates
@@ -104,16 +104,15 @@ the UTC time zone (+5 hours).
104104

105105
``` r
106106
bus_position(RouteId = "33")[, 1:8]
107-
#> # A tibble: 7 × 8
107+
#> # A tibble: 6 × 8
108108
#> VehicleID Lat Lon Distance Deviation DateTime TripID RouteID
109109
#> <chr> <dbl> <dbl> <dbl> <dbl> <dttm> <chr> <chr>
110-
#> 1 4611 38.9 -77.0 NA 22 2023-11-10 00:14:31 29636020 33
111-
#> 2 7116 39.0 -77.1 NA 0 2023-11-10 00:14:08 18078020 33
112-
#> 3 4572 38.9 -77.0 NA 14 2023-11-10 00:14:16 29847020 33
113-
#> 4 7111 39.0 -77.1 NA -3 2023-11-10 00:14:08 46929020 33
114-
#> 5 4583 38.9 -77.1 NA 6 2023-11-10 00:14:15 16581020 33
115-
#> 6 7107 38.8 -77.4 NA 32 2023-11-10 00:14:35 6694020 33
116-
#> 7 7134 38.9 -77.0 NA 9 2023-11-10 00:14:30 26108020 33
110+
#> 1 4566 38.9 -77.0 NA 4 2024-03-11 02:50:44 9684010 33
111+
#> 2 7122 38.9 -77.1 NA 6 2024-03-11 02:50:45 1031010 33
112+
#> 3 4794 38.9 -77.1 NA 8 2024-03-11 02:50:44 18769010 33
113+
#> 4 4589 38.9 -77.1 NA 0 2024-03-11 02:50:50 30442010 33
114+
#> 5 4786 39.0 -77.1 NA 8 2024-03-11 02:51:00 10847010 33
115+
#> 6 4781 38.9 -77.0 NA 2 2024-03-11 02:50:43 47206010 33
117116
```
118117

119118
Time values are left in Eastern time and are represented using the class

_pkgdown.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
url: https://kiernann.com/metro
1+
url: https://k5cents.github.io/metro

man/metro-package.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)