Skip to content

fan777/travel-advisory

Repository files navigation

Capstone-1 : Travel Advisory

Demo @ https://travel-advisory.herokuapp.com/


Table of Contents


About The Project

Global travel is not without perils. This project aggregates data from a variety of APIs to construct a cohesive site presenting useful travel information (with up to date advisories and COVID trends) to help a visitor determine if a destination is safe.

Objectives

  • Allows a visitor to view country advisories for travel planning
  • Allows an authenticated visitor to bookmark countries

Getting Started

  • Prerequisites

    • Postgresql installation
    • Python 3.8.5
    • Create an account with Tugo to register for a free API Key
  • Installation

    • Clone the repository
    • Create empty database 'travel' and run seed.py
    • Set up venv and install dependencies from requirements.txt
  • Known Issues

    • The APIs used may occasionally go down or have such slow response triggering a timeout
    • The APIs used may not have data for all countries

Schema

  • Table for users containing username, password, and email
  • Tables for countries, languages, and currencies
  • Country + language mapping table (when a country has more than one widely used language)
  • Country + currency mapping table (when a country has more than one widely used currency)

User Flow

  1. On the entry homepage, the user is presented with a list of countries.
  2. The user may also search for a country from the navbar search box by typing in a country code or country name.
  3. A valid country entry will direct the user to a page with travel advisories and COVID statistics.
  4. Additional country information such as languages and currencies will also be presented.
  5. A user may create an account or login with an existing account.
  6. A valid account will present options to bookmark countries and show those countries on the entry homepage.

Data

Additional Resources

Future Considerations

Chart.js is useful and powerful however my implementation is kludging Javascript into HTML with Jinja variables. To separate responsibilities, the script can be offloaded as a function in a JS file and the canvas can call the function on load, passing in the data as variables. Done!

Finally, since this project relies on so many external APIs with limited or inconsistent behavior, it may be worthwhile exercise to develop a scraper and gather the data directly from government sites (US state department, CIA world factbook, etc) to generate one's own set of data.