Keegan McGinnis, Ryan Zacharias, Yo Shium Wong
Have you ever wandered around Vancouver and wanted to go to the washroom? I sure have and boy did it not end well. With the help of LISP, all those worries of quickly finding a washroom will go away. LISP is a web-based tool that helps users find washrooms and also review washrooms in the Vancouver area. The front-end is built using React and the back-end uses Django Rest Framework.
React & Bootstrap
Django Rest Framework (sqlite)
- City of Vancouver (https://opendata.vancouver.ca/api/records/1.0/search/?dataset=public-washrooms&q=&facet=type&facet=summer_hours&facet=winter_hours&facet=wheel_access&facet=maintainer&facet=geo_local_area)
- Google Streetview API
Pandas, NumPy
pip install -r requirements.txt
python manage.py runserver
npm install
npm run devstart
(Currently frontend and backend need to be ran and tested separately)
(Additional requirements: Google Streetview API Key with billing, and SQLite Database with City of Vancouver Public Washroom data)
from LISP.models import Rating, Coordinate
import os
import pandas as pd
data = pd.read_json(os.path.join(os.getcwd(),'LISP\\public-washrooms.json'))
bathrooms= pd.DataFrame(columns=['latitude', 'longitude', 'primaryind'])
for i in range(len(data)):
latitude = data['fields'].iloc[i]['geom']['coordinates'][0]
longitude = data['fields'].iloc[i]['geom']['coordinates'][1]
primaryind = data['fields'].iloc[i]['primaryind']
bathrooms.at[i, 'latitude'] = latitude
bathrooms.at[i, 'longitude'] = longitude
bathrooms.at[i, 'primaryind'] = primaryind
bathrooms['latitude'] = bathrooms['latitude'].astype('float64')
bathrooms['longitude'] = bathrooms['longitude'].astype('float64')
for i in range(len(bathrooms)):
bathroom = bathrooms.iloc[i]
coord = Coordinate(latitude=bathroom['latitude'], longitude=bathroom['longitude'])
coord.save()
rating = Rating(primaryind=bathroom['primaryind'], location=coord)
rating.save()
Use the following URL parameters in URL or Postman:
ex: http://127.0.0.1:8000/api/LISP?latitude=-123.103599022256&longitude=49.2778209665246
latitude - -90 to 90
longitude - -180 to 180
- Finish integrating the front-end and back-end together.
- POST for rating system.
- Expand out of Vancouver.