busminer
is an R package to support Public Transportation (bus) Data Analysis.
library(devtools)
install_github("analytics-ufcg/gps.stops.matcher")
library(gps.stops.matcher)
It is expected that the GPS data table will be formatted like the example below:
| bus.code| latitude | longitude | date | line.code | | --------|----------:| ---------:| :------------------:| --------: | | AA028 | -25.40741 | -49.25299 | 2015-10-19 07:36:28 | 211 | | AA028 | -25.40733 | -49.25303 | 2015-10-19 07:36:26 | 211 | | AA028 | -25.40704 | -49.25291 | 2015-10-19 07:36:20 | 211 |
It is expected that the GTFS folder contains the following files:
location.data <- prepare.gps.data(bus.gps.csv.file.path = "<your-gps-data-file-path>")
stops.data <- prepare.stops.data(gtfs.folder.path = "<gps-folder-path>")
matches <- match.locations.stops(location.data,stops.data,verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.