webdevjeff.us

Web Developer Jeff George

Weather Widget

A fake weather widget using a real weather API

February 2017

This applet displays accurate weather conditions for the user's locale, provided by the OpenWeatherMap API. It does so by acquiring the user's IP, then his location, and then submitting an API request to OpenWeatherMap.org for that location. It's only "fake" in the sense that it's not an installable widget—it resides only on this page, and can't be installed elsewhere.

Features

  • Displays accurate location and local time
  • Displays an icon depicting current weather conditions
  • Displays local temperature in degrees Fahrenheit or Celsius;
    click on temperature to toggle scale
  • Displays text description of local weather and wind conditions
  • Displays today's sunrise and sunset times
  • Displays icon depicting current moon phase
  • Changes background to reflect current cloud cover and time of day
  • Draggable to any position on the current page