This repository was archived by the owner on Aug 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
59 lines (46 loc) · 1.34 KB
/
README.Rmd
File metadata and controls
59 lines (46 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
cache = FALSE,
comment = "#>",
message = FALSE,
error = FALSE,
warning = FALSE,
fig.path = "README/README-",
fig.width=7.3,
fig.height=5,
out.width = '100%'
)
```
## Description
`transitfeedr` is an R package for easily searching and getting GTFS feeds on [Transitfeeds](https://transitfeeds.com/) format.
## Installation
You can install this package from GitHub using the devtools package:
```
if (!require(devtools)) {
install.packages('devtools')
}
devtools::install_github('r-gtfs/transitfeedr')
```
Example Usage
------------------
[](https://travis-ci.com/r-gtfs/transitfeedr)
[](https://cran.r-project.org/package=transitfeedr)
```{r readme-body}
library(dplyr)
library(transitfeedr)
# set the API key
# set_api_key() # uncomment to set api key
# get the feedlist dataframe and filter out NYC subway
feedlist_df <- get_feedlist() %>%
filter(grepl('NYC Subway GTFS', t, ignore.case= TRUE))
```
Read the url with [trread](https://github.com/r-gtfs/trread)
```{r}
library(trread)
# import NYC gtfs feed by sending the url to `import_gtfs`
NYC <- import_gtfs(feedlist_df$url_d)
```