High-Table-Consortium / fullstack-capstone-dockerized

0 stars 3 forks source link

made changes to get attraction algorithm #129

Closed Tumelo2748 closed 3 weeks ago

Tumelo2748 commented 3 weeks ago

Summary of Changes

This pull request introduces a new scoring algorithm for the getAllAttractionSites function in the attraction site controller. The purpose of this enhancement is to dynamically rank tourist attractions based on user preferences, independent of location.

Key Features

  1. Rating Score:

    • Attractions receive points based on their average rating. Higher-rated attractions score more points.
  2. Preference Score:

    • If the attraction's category matches the user's specified preferences (e.g., "Museum" or "Park"), the attraction gains additional points.
  3. Nearby Restaurants Score:

    • Attractions are evaluated based on the average ratings of nearby restaurants. Attractions with higher-rated nearby restaurants receive more points.

Functionality Changes

Testing

Conclusion

This enhancement aims to provide a more personalized experience for users, helping them discover attractions that align with their interests and improving the overall functionality of the application.