Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andredarcie/gtfs-visualizer
Data viewer based on GTFS format.
https://github.com/andredarcie/gtfs-visualizer
draw gtfs gtfs-format gtfs-visualizer js library
Last synced: about 1 month ago
JSON representation
Data viewer based on GTFS format.
- Host: GitHub
- URL: https://github.com/andredarcie/gtfs-visualizer
- Owner: andredarcie
- License: mit
- Created: 2016-08-25T18:24:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-13T19:28:08.000Z (about 8 years ago)
- Last Synced: 2024-08-01T12:11:15.903Z (5 months ago)
- Topics: draw, gtfs, gtfs-format, gtfs-visualizer, js, library
- Language: HTML
- Homepage:
- Size: 939 KB
- Stars: 6
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gtfs - GTFS Visualizer - Library responsible for generating HTML data based on the GTFS format. (Data Viewers)
README
# GTFS Visualizer
*Data viewer for gtfs* [![CodeClimate](https://codeclimate.com/github/AndreNDarcie/gtfs-visualizer/badges/gpa.svg)]
(https://codeclimate.com/github/AndreNDarcie/gtfs-visualizer) [![IssueCount](https://codeclimate.com/github/AndreNDarcie/gtfs-visualizer/badges/issue_count.svg)](https://codeclimate.com/github/AndreNDarcie/gtfs-visualizer):bus: Library responsible for generating HTML data based on the GTFS format. Depends on [this](https://github.com/andredarcie/node-gtfs-api) API.
## GTFS Overview
The General Transit Feed Specification (GTFS), also known as GTFS static or static transit to differentiate it from the GTFS realtime extension, defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" let public transit agencies publish their transit data and developers write applications that consume that data in an interoperable way. *(from google developers)*
Read more about [here](https://developers.google.com/transit/gtfs/).
## Getting started
Clone from github:
git clone [email protected]:andredarcie/gtfs-visualizer.git
cd gtfs-visualizer
Start the database with agency's data:
mongod
Start the [node gtfs api](https://github.com/andredarcie/node-gtfs-api):
node index.js
Configure the `js/settings.js` file
Open the index.html in your browser
(Optional) Gulp task runner
npm install
// Run gulp:
gulp// To run individual tasks:
gulpThis example depends on [Bootstrap](http://getbootstrap.com/), [jQuery](http://jquery.com/),
[Leaflet](http://leafletjs.com/), [typeahead](https://twitter.github.io/typeahead.js/) and [Gulp](http://gulpjs.com/).## Library Functions
### Agencies
- **Draw Agency Stop**: Draws a stop on the map, with the position and agency name.```javascript
Generator.drawAgencyStop(data);
```
![Agency Stop](img/readme/functions/agency-stop.PNG)- **Draw Agency Popup**: Draws a popup on the stop, with the agency's information.
```javascript
Generator.drawAgencyPopup(data);
```
![Agency Popup](img/readme/functions/agency-popup.PNG)### Routes
- **Draw Routes List**: Generates the HTML code a list of routes.```javascript
Generator.drawRoutesList(data);
```
![Routes List](img/readme/functions/routes-list.PNG)- **Draw Shapes**: Draws on the map a line between the points of shape.
```javascript
Generator.drawShapes(data);
```
![Shapes](img/readme/functions/shapes.PNG)- **Draw Stops**: Draws on the map all the stops in a route.
```javascript
Generator.drawStops(data);
```
![Shapes](img/readme/functions/stops.PNG)- **Draw Stops Popup**: Draws a popup on the stop, with the stop information.
```javascript
Generator.drawStopsPopup(stop_id,stop_name,stops_desc);
```
![Shapes](img/readme/functions/stop-popup.PNG)### Plan a Trip
- **Draw Stops Near**: Draw the stops near of other stop.```javascript
Generator.drawStopsNear(data);
```## Result
![GTFS Visualizer](img/readme/gtfs-v.PNG)## License
The gtfs-visualizer is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).