Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/phillipdupuis/mbta-api-playground

Learn about the MBTA V3 API by building queries and exploring the results
https://github.com/phillipdupuis/mbta-api-playground

data-exploration django django-rest-framework mbta-api pandas pandas-dataframe pandas-profiling python

Last synced: 20 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# MBTA API Playground
[https://www.mbta-api-playground.com/](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](https://github.com/pandas-profiling/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](https://bokeh.pydata.org/en/latest/docs/user_guide/geo.html)

## 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](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/create_query_facility_with_filters.png)

Results: Summary

![results summary](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/fac_filt_res_summary.png)

Results: Table

![results table](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/fac_filt_res_table.png)

Results: Report

![results report](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/fac_filt_res_report.png)

Results: JSON

![results json](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/fac_filt_res_json.png)

Results: Locations

![results locations](https://github.com/phillipdupuis/mbta-api-playground/blob/master/core/static/core/screenshots/fac_filt_res_locations.png)