Skip to content

phillipdupuis/mbta-api-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBTA API Playground

https://www.mbta-api-playground.com/
Learn how to work with the MBTA V3 API by constructing queries and interacting with the results.

Creating queries

Users can build queries in which they specify:

  • The primary object (ex: Alert, Route, Facility, Vehicle, etc.)
  • The related objects that should also be included in the results
  • The attributes that should be returned for each object
  • Filters for limiting what object instances are returned

Viewing results

Upon executing a query, the user is brought to a results page where they can view:

  • A brief summary of the response (status code, size, and query parameters)
  • A table of the response data
    • It can be downloaded as a CSV file for further analysis
  • A profile report generated by pandas-profiling
    • Users can customize what correlations are calculated
  • The raw response data as pretty-printed JSON
  • Interactive geolocation plots for any objects which have 'latitude' and 'longitude' attributes.
    • These plots are generated using Bokeh

Built With

  • Django
  • Django REST framework
  • Vanilla ES6 JavaScript (the only exception is jQuery was used for showing/hiding modals)

Example: finding facilities which have bike storage or electric car chargers

Creating the query

filtered facility query

Results: Summary

results summary

Results: Table

results table

Results: Report

results report

Results: JSON

results json

Results: Locations

results locations

About

Learn about the MBTA V3 API by building queries and exploring the results

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published