Weather App

  • HTML
  • CSS
  • JS
  • webpack
  • API

DIVE INSIDE

To get used to making API calls and developing a UI based on the information received from them, I created a weather app that uses OpenWeather’s free tier to get information on the current weather conditions as well as forecasted results of the user’s requested location. I also used localStorage so that users can save cities to view later.

A challenge I encountered while developing this app was accounting for the current time, as the hours, day, and week mentioned in the forecast should reflect the timezone of the currently viewed location rather than the client's timezone. Building helper functions for date manipulation, I first received the current time in UTC before converting it based on the location's timezone. Since OpenAI’s free tier was limited to retrieving information for every third hour rather than every hour, this was also considered in finding the closest forecast result.