Discover interesting places you can reach with just one bus ride.
Explore the docs »
Live Site
·
Report Bug
·
Request Feature
Table of Contents
OneBus is a web app designed to encourage people in Austin, TX to use public transit by showing them all the interesting places they can reach with just a single bus ride. Instead of wondering where the bus can take you, OneBus makes it visual — share your location, and instantly see restaurants, cafes, places of worship, and more that are just one bus away.
Check it out live at onebusaustin.com
- You share your location. OneBus grabs your current latitude and longitude.
- Nearby bus stops are found. The app queries for the bus stops closest to you.
- Reachable stops are calculated. Based on the bus lines available at those nearby stops, OneBus finds every other stop you can reach in one ride.
- Points of interest are surfaced. The app queries for POIs near all those reachable stops and returns them grouped by category (restaurants, cafes, places of worship, and more).
- You explore. Results are shown on an interactive map with filters so you can focus on what matters to you.
Bus stop and route data comes from CapMetro's GTFS feed (General Transit Feed Specification). This data is cleaned and processed to produce a table of all unique bus stops in Austin, each tagged with the bus lines that serve it.
Points of interest are queried using OSMnx, a Python package that pulls POI data from OpenStreetMap. Future iterations will supplement this with additional data scraped from Yellow Pages via Selenium.
The backend is a Django REST API with a single primary endpoint that accepts a user's latitude and longitude and returns:
- All bus stops reachable from the user's location in one ride
- Points of interest near those stops, grouped by category
The API is hosted as an AWS Lambda function. When a user loads the site, a request is sent to Lambda, which spins up the necessary database tables and runs the Python logic to go from user coordinates to a full list of reachable POIs and bus stops.
The frontend is built in React and displays results on an interactive Google Map. Bus stops are shown as dark purple markers and points of interest as light purple markers. Users can filter results by POI category (restaurants, cafes, places of worship, etc.) to narrow down what they want to explore.
The UI was designed in Figma.
You'll need Python 3 installed.
- Clone the repo
git clone https://github.com/open-austin/OneBus-OpenAustin.git
- Install packages
pip install -r .\requirements.txt - Run the server
python .\manage.py runserver --noreload
Sample API request (running locally):
POST http://127.0.0.1:8000/api/
{
"latitude": "30.31431458225797",
"longitude": "-97.73587186057428123"
}
- Yellow Pages scraper via Selenium for expanded POI data
- Backend migration from Render to AWS
See the open issues for a full list of proposed features and known issues.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would improve this project, please fork the repo and create a pull request. You can also open an issue with the tag "enhancement". Don't forget to give the project a star!
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
Distributed under the project license. See LICENSE.txt for more information.
Your Name - Martin Liu - martincodesthings@gmail.com
