Code Monkey home page Code Monkey logo

smart_park's Introduction

Welcome To Smart Park!

For our final project, we have developed Smart Park, an app designed to simplify the often frustrating task of finding nearby available parking spots. Urban parking can be a nightmare, but with our app, users can skip the stress of endlessly circling for a spot. Instead, Smart Park recommends parking locations based on proximity and availability. What sets Smart Park apart from other parking apps is its adaptive learning feature. When initially deployed, the app doesn't rely on preexisting map data. Instead, it learns from user behavior, noting where users successfully parked as potential spots it can recommend to other users in the future. As a result of this, our app is adaptable to virtually any location worldwide and can be used to find free parking. Our tech stack uses PostgreSQL with PostGIS for database, Python and flask for our ORM and API, and react.js for our frontend.

Video Demo

  • In this video a demonstration of the is a close free spot is found while cars are being simulated parking and leaving.
databases.mov

Instructions on Running Project

Port References

  • The flask service layer runs on port 5000
  • Frontend runs on port 3000
  • Proxy server runs on port 2000 (it checks to see if the user is on a street when they click the park button)
  • Database is in port 5432, username is user, password is password, and database is called smart_park_db

smart_park's People

Contributors

fkhan000 avatar johnpl-io avatar hengnan avatar

Watchers

 avatar

smart_park's Issues

Updating Database When User Leaves Parking Space

When a user leaves a parking space, we need to query the spots table for any available regions that are sufficiently close to the now freed-up space. These regions would then be merged with the freed-up parking space.

Updating Database When User Parks

When the user parks, we first need to create a new parking region in our database that approximates the region that the user's car takes up. To do this, we can approximate the user's car to be in the shape of a rectangle and take their location to be the top left coordinate. Then we can use the dimensions of the user's car to find the other 3 coordinates.

After that, we need to check if our new parking space overlaps with any of the other regions in our spots table. We should always get only one region from this.

If we subtract off the parked space from the region that contains it which should give us two regions.

If one or both of the regions are sufficiently small then that means that the user either parked right at the edge of the parking edge like at the end of a street or right between two cars so we can merge those hanging regions with the parked space if that happens.

If after this, we still have two regions, then we update the region for the corresponding spot entry and make a new spot entry for the other available region. And if we just have one region, then we just update the corresponding spot entry.

Check if a Parking Space is Available

As the user is searching for a parking space, we would need to repeatedly poll the backend to check if the recommended parking spaces are still available.

Finding Most Preferred Parking Space

Given a user’s location and parking history, find the parking spaces that the user is most likely to prefer. The metric used to score the parking spaces should take into account at least the following factors:

  • The distance between the user and the parking space
  • The distance between the parking space and the closest frequent area that the user tends to park often in

The endpoint should take in how many parking spaces to return as a parameter.

If, as the user is searching for a parking space, one of the parking spaces becomes occupied then from the frontend we would use this endpoint to find the next most preferred available space and replace the occupied spot with the new one.

Creating a List of Parking Spaces For Frontend

For the demo, we might need to indicate what regions the user can park in by creating a box around them. The backend wouldn't have access to this list. It would learn the map as users park. If a spot is occupied, we might need to make it known only when the user tries to park in there and then give an error message saying that the space is currently occupied.

Extracting Patterns from User's Parking History

Given a user’s parking history, we need to be able to extract parking habits and patterns by finding frequent areas that the user tends to park in. This would be used as a factor to determine the desirability of a parking space so it would need to be efficient. One way we could do this is by going through all of the available parking spaces and finding how many times the user had parked within some radius of the available parking space in the past.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.