lucabarattini / Mountain-Shleters-Project

Final Repo of the Mountain Shelters Project
0 stars 0 forks source link

Web Designing Session | Brainstorming on how to effectively structure our web app. #7

Closed lucabarattini closed 8 months ago

lucabarattini commented 9 months ago

We need to figure out the page schema, page layouts, expected UI and UX. On top of that, we shall also understand, which kind of queries and data we want to fetch from the backend and on which page it will be displayed.

TommyStradiotto commented 9 months ago
Index.html (Homepage) --- [Button 1] ---> Lombardia.html
--- Fetch Data ---> Lombardia.csv + mountain_shelters.csv
--- Fetch Data ---> Google Maps API
lucabarattini commented 9 months ago

After conducing the web designing session we decided to preceed with the web scraping algorithm. The structure of our algorithm will follow.

lucabarattini commented 8 months ago

What we have decided to do in the end is the following:

  1. With /cleaned_csv_show on the backend we are querying the function def cleancsv1( ):
  2. This function, is cleaning the Piemonte .csv file and merging it with the .csv file coming from the scraping algorithm
  3. Then, it applies filtering based on several parameters like bathrooms, rooms ecc ...
  4. Then, if the location is entered and the user wants to have the mountain shelters within that range the algorithm computes the specific coordinates of the location entered by the user
  5. Then, the script checks using the haversine formula the distance between the coordinates of the location given by the user and the specific coordinates of the shelter.
  6. If the distance is within the range choosen by the user from the dropdown menu it appends to a list initialised at the beginning the mountain shelters within that range
  7. Last but not least, it displays the shelters within that range.