/weather-dashboard

Get the 5-day weather forecast, plus today’s UV index, in your city. Or any city.

Primary LanguageJavaScriptMIT LicenseMIT

weather-dashboard

Description

This is a weather dashboard I developed to learn more about web development using server-side APIs, particularly in this case the OpenWeatherMap API. It also gave me a chance to practice some JavaScript. Based on user input, it uses fetch to retrieve weather data on the inputted city and displays the current weather along with a five-day forecast. The app stores searches using localStorage. If the user clicks on a past search, displayed on the left side of the screen, the weather data for that city will again be displayed.

There's room for improvement here, most obviously in the styling. But the JavaScript could also run a little cleaner. If I have time I'll return to this.

Installation

Download the files and then view the code.

Gif demonstrating the app in action

Usage

Type the name of the city where you'd like to see a weather forecast in the search box on the left side of the screen and click the search button. Search for as many cities as you like. To go back to a previously inputted city's forecast, select the city's name from the list that populates under the search bar.

Credits

Thanks as always to my wife and coding tutor. Here is just a sampling of the websites I used for reference while developing this app: