/about-the-weather

A weather dashboard that retrieves weather data for cities, with current weather condition and five-day forecast using OpenWeather API. It runs in a browser and features dynamically updated HTML and CSS.

Primary LanguageJavaScriptMIT LicenseMIT

About The Weather

[Unit 6, Server-Side APIs Assignment]

License: MIT


Description

This is a weather dashboard that retrieves weather data for cities. It shows the searched city's current weather condition and five-day forecast using OpenWeather API and uses localStorage to store any persistent data. It runs in a browser and features dynamically updated HTML and CSS.

Interface

This application has the following interface:

image1_interface

GitHub links:

The deployed version can be viewed here: https://jbtiglao.github.io/about-the-weather/.

While the repository can be accessed here: https://github.com/jbtiglao/about-the-weather.


Table of Contents

  1. Title
  2. Description
  3. Installation
  4. Usage
  5. License
  6. Contributing
  7. Tests
  8. Credits
  9. Author
  10. Questions

Installation

Clone my GitHub repository.

To open the application, on Visual Studio Code:

  • Click File, select Open Folder from the drop-down list, and navigate to the cloned repository. Click Open.
  • On the upper left-hand side, click on the Explorer icon, then the repository's index.html file. Click on the .HTML document and choose Open in Default Browser, or the browser of your choice, to open and run the application.

Data from OpenWeather's Current Weather and One Call services are accessed through the creation of an API Key and free subscription to the said services on openweathermap.org.


Usage

For instructions on how to use the application, please refer to the deployed site, as well as the following features and functionalities.

Features and Functionalities

The application has the following features and functionalities:

  1. A search field and search button.

image2_searchfield-and-searchbutton

  • To look for a city's weather condition, enter the city name in the search field and click on the Search button.

image3_search-for-city

  • The city's current weather condition is displayed on the column containing the search result (current weather column).

image4_current-city

  • The city's weather condition for the next five days are displayed below the current weather column.

image5_5-day-forecast

  1. The column containing the city's current weather displays the following information:
  • the current city;
  • date;
  • weather icon that represents the current weather condition;
  • current temperature;
  • current humidity;
  • current wind speed; and
  • current UV index.

image6_current-weather-info

  1. The UV index's color shows whether the condition is favorable or low (green), moderate (yellow), or severe (orange, yellow, or violet).
  • A UV index of 2 or less means the condition is favorable or low and will display a green color.
  • A UV index of 3 to 5 means the condition is moderate and will display a yellow color.
  • A UV index of 6 to 7 means the condition is severe (high) and will display an orange color.
  • A UV Index of 8 to 10 is severe (very high) and will display a red color.
  • A UV index of 11+ is severe (extreme) and will display a violet color.

(Note: A UV Index of 2.1 to 2.99 will still be displayed as green since a UV index is considered to be in the yellow or moderate level only when it reaches 3. The same is true with the UV index of 5.1 to 5.99, which will be displayed as yellow or moderate since the orange level or high UVI starts at 6. The UVI of 7.1 to 7.99 will also be displayed as orange or high because very high or red UVI starts at 8.)

image7_uv-index-chart

image17_uv-index-green

image9_uv-index-yellow

image8_uv-index-orange

image19_uv-index-red

image10_uv-index-violet

  1. When the user views the future weather condition for the current city, the city's weather forecast for the next five days are displayed in five separate columns below the current weather condition. Each of the columns contains the following information:
  • date;
  • weather icon;
  • temperature;
  • humidity; and
  • wind speed.

image16_forecast

  1. When the user enters the name of a city and clicks on the Search button, the city name is saved on the Search History list below the Search button.

image11_search-history

  1. Clicking on a city in the search history will show the city's current weather condition and five-day forecast.

image12_click-on-city

  1. When the application is opened or the page is refreshed, the last searched city with its current weather and five-day forecast will appear.

image13_last-searched-city

image14_open-app

  1. The application is responsive when viewed and accessed using different devices with different-sized screens:

image19_responsiveness

image23_iphone-responsive

image21_ipad-air-responsive

image22_ipad-mini-responsive


License

License used for this project - MIT

For more information on the above license, please see the following website:


Contributing

To contribute to this application: Please email the author for guidelines.


Tests

The OpenWeather APIs, as well as the application's features and functionalities are tested using Chrome Dev Tools and running the application in a browser.


Credits

The following people/resources were consulted and/or utilized in the development of this application:


Author

Jane Tiglao


Questions

For questions or issues, please contact: