The weather dashboard is a simple JavaScript program to view the weather for the specified city. A month ago I finished the coding bootcamp given by UC Berkeley. It was a fast paced bootcamp teaching front end web development skills. It was a six month course and I learnt about everything from Vanilla JavaScript, Node JS, Express JS, React, GraphQL etc. It was really fun. As part of the bootcamp, I did a simple project every week that helped me process what was taught in class.
Since I already knew JavaScript, jQuery and a little bit of React, it was a bit easy to follow. Even with that, some of the projects proved a bit confusing.
The weather dashboard was one of the easier projects. It is a simple JavaScript program to show the current and the five day weather forecast of a selected city. It was fairly straight forward code.
The program let you search for a city and select the country from the dropdown. The results are displayed on the right side of the page and the cities you search for are shown at the bottom of the search bar in a list. Clicking on the city in the list, automatically shows you the weather for that city on the right. The searched cities are stored using local storage and the results are shown from the local storage when you click on the past searched cities.
I used the weather api from https://api.openweathermap.org/ to get the data for the searched city. The api gives us options to search for the current weather or a 5 day forecast with the latitude and the longitude. This definitely was one of the easier project I did.
Github repo link: https://github.com/cguntur/weather_dashboard
View the demo here – https://cguntur.github.io/weather_dashboard/