Web and JS > GTFS-Js
JavaScript library for working with GTFS data. Additional Information: Unlicense: WSDOT.
GTFS-JS
JavaScript library for working with GTFS data.
Modules
gtfsx conversionUtilsModule converting between object types.
Datafile Agencygtfsx
conversionUtils
Module converting between object types.
conversionUtils.convertDateToDateObject(n) ⇒ Date
Converts a number representing a date returned from GTFS-Exchange into a Date object.
Kind: static method of conversionUtils
Returns: Date - - The date equivalent of the input number.
| Param | Type | Description |
|---|---|---|
| n | number | Date |
A number representing a date. If a date is passed in, that same date is returned. |
Datafile
- Datafile
- Datafile ⏏
- new Datafile(data)
- ~description :
string - ~md5sum :
string - ~file_url :
string - ~agencies :
string - ~filename :
string - ~date_added :
Date - ~uploaded_by_user :
string - ~size :
number
- Datafile ⏏
Datafile ⏏
new Datafile(data)
Represents an element of the datafile array returned from the API endpoint http://www.gtfs-data-exchange.com/api/agency?agency={dataexchange_id}.
| Param | Type | Description |
|---|---|---|
| data | Object |
Values to populate this object's parameters. |
Datafile~description : string
Kind: inner property of Datafile
Datafile~md5sum : string
Kind: inner property of Datafile
Datafile~file_url : string
Kind: inner property of Datafile
Datafile~agencies : string
Kind: inner property of Datafile
Datafile~filename : string
Kind: inner property of Datafile
Example
"abq-ride_20120904_0303.zip"
Datafile~date_added : Date
Kind: inner property of Datafile
Datafile~uploaded_by_user : string
Kind: inner property of Datafile
Datafile~size : number
Kind: inner property of Datafile
Agency
- Agency
- Agency ⏏
- new Agency(data, datafiles)
- static
- .groupByArea(agencies) ⇒
Object.<string, Array.<Agency>>
- .groupByArea(agencies) ⇒
- inner
- ~dataexchange_id :
string - ~feed_baseurl :
string - ~name :
string - ~area :
string - ~url :
string - ~country :
string - ~state :
string - ~license_url :
string - ~dataexchange_url :
string - ~date_added :
Date - ~date_last_updated :
Date - ~is_official :
boolean - ~datafiles :
Array.<DataFile> - ~latestFeedUrl :
string
- ~dataexchange_id :
- Agency ⏏
Agency ⏏
new Agency(data, datafiles)
An object representing an agency that publishes GTFS data to GTFS-Exchange.
| Param | Type | Description |
|---|---|---|
| data | Object |
Data corresponding to class's properties. |
| datafiles | Object.<string, object> |
An array of DataFile objects. |
Agency.groupByArea(agencies) ⇒ Object.<string, Array.<Agency>>
Group an array of agencies by area.
Kind: static method of Agency
Returns: Object.<string, Array.<Agency>> - - Arrays of agencies grouped by area.
| Param | Type | Description |
|---|---|---|
| agencies | Array.<Agency> |
An array of agencies. |
Agency~dataexchange_id : string
Kind: inner property of Agency
Agency~feed_baseurl : string
Kind: inner property of Agency
Agency~name : string
Kind: inner property of Agency
Agency~area : string
Kind: inner property of Agency
Agency~url : string
Kind: inner property of Agency
Agency~country : string
Kind: inner property of Agency
Agency~state : string
Kind: inner property of Agency
Agency~license_url : string
Kind: inner property of Agency
Agency~dataexchange_url : string
Kind: inner property of Agency
Agency~date_added : Date
Kind: inner property of Agency
Agency~date_last_updated : Date
Kind: inner property of Agency
Agency~is_official : boolean
Kind: inner property of Agency
Agency~datafiles : Array.<DataFile>
Kind: inner property of Agency
Agency~latestFeedUrl : string
URL for the most current GTFS ZIP file
Kind: inner property of Agency