Inspiration

This project was inspired by the weather script challenge listed for day 1 of LHD: Build.

What it does

Type in the name of any city around the world to look up how the weather is there! (Make sure to type a valid city name!)

How I built it

Using the OpenWeatherMap API, the JS script fetches weather data asynchronously for the city inputted by the user, then returns a small weather app-like widget with some basic weather information. A live "demo" (weather.html) is hosted by GitHub Pages on the microsite linked below, and can be accessed by clicking Day 1: Weather on the homepage.

Challenges I ran into

This was the first time I wrote an async/await script, and I'm also pretty unfamiliar with API calls, so it took quite long to figure out the JS code and to get it working as I wished.

What I'm proud of/what I learned

I'm glad to have learned more about async/await, using APIs, and practicing my JavaScript skills in addition to very basic front-end/web development in this challenge.

What's next for Weather Checker

The functionality is simple enough, so some possibilities would be:

  • Turn this Weather Checker into a full-fledged weather app
  • Modify the script to make use of more of the JSON data fetched from OpenWeatherMap (the API returns lots of information!)
  • Allow a choice of metric or imperial temperature measurements (Celsius or Fahrenheit)
  • Add more styles to improve the aesthetic on the microsite
Share this project:

Updates