Skip to content

open-austin/OneBus-OpenAustin

Repository files navigation

Contributors Forks Stargazers Issues project_license


Logo

OneBus

Discover interesting places you can reach with just one bus ride.
Explore the docs »

Live Site · Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. How It Works
  3. Architecture
  4. Built With
  5. Getting Started
  6. Usage
  7. Roadmap
  8. Contributing
  9. License
  10. Contact
  11. Acknowledgments

About The Project

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

OneBus Screenshot

(back to top)


How It Works

  1. You share your location. OneBus grabs your current latitude and longitude.
  2. Nearby bus stops are found. The app queries for the bus stops closest to you.
  3. 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.
  4. 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).
  5. You explore. Results are shown on an interactive map with filters so you can focus on what matters to you.

(back to top)


Architecture

Data

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.

Backend

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.

Frontend

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.

(back to top)


Built With

(back to top)


Getting Started

Prerequisites

You'll need Python 3 installed.

Installation

  1. Clone the repo
    git clone https://github.com/open-austin/OneBus-OpenAustin.git
  2. Install packages
    pip install -r .\requirements.txt
  3. Run the server
    python .\manage.py runserver --noreload

(back to top)


Usage

Sample API request (running locally):

POST http://127.0.0.1:8000/api/
{
  "latitude": "30.31431458225797",
  "longitude": "-97.73587186057428123"
}

(back to top)


Roadmap

  • 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.

(back to top)


Contributing

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!

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a pull request

(back to top)


License

Distributed under the project license. See LICENSE.txt for more information.

(back to top)


Contact

Your Name - Martin Liu - martincodesthings@gmail.com

(back to top)


Acknowledgments

(back to top)


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors