Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jtrecenti/spgtfs

GTFS da SPTrans.
https://github.com/jtrecenti/spgtfs

Last synced: about 2 months ago
JSON representation

GTFS da SPTrans.

Awesome Lists containing this project

README

        

[![Travis-CI Build Status](https://travis-ci.org/jtrecenti/spgtfs.svg?branch=master)](https://travis-ci.org/jtrecenti/spgtfs)

[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/jtrecenti/spgtfs?branch=master&svg=true)](https://ci.appveyor.com/project/jtrecenti/spgtfs)

# spgtfs

Downloads GTFS data from SPTrans.

## Install

`spgtfs` is not on CRAN yet. To install, you'll need `devtools`.

```r
if (!require(devtools)) install.packages('devtools')
devtools::install_github('jtrecenti/spgtfs')
```

## Usage

To download GTFS data, you'll need to get a login and a password [here](http://www.sptrans.com.br/desenvolvedores/Default.aspx?login).

```r
library(spgtfs)
gtfs_data <- spgtfs_download('', '') %>%
spgtfs_load()

gtfs_data
```

```
Downloading: 12 MB
```

```
# A tibble: 10 × 2
arq data

1 agency.txt
2 calendar.txt
3 fare_attributes.txt
4 fare_rules.txt
5 frequencies.txt
6 routes.txt
7 shapes.txt
8 stops.txt
9 stop_times.txt
10 trips.txt
```