Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/phillipdupuis/mbta-api-playground
- Owner: phillipdupuis
- License: mit
- Created: 2019-09-11T13:28:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T06:09:21.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T07:35:39.759Z (about 1 month ago)
- Topics: data-exploration, django, django-rest-framework, mbta-api, pandas, pandas-dataframe, pandas-profiling, python
- Language: Python
- Homepage: https://www.mbta-api-playground.com/
- Size: 1.69 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)