Git Product home page Git Product logo

weather-dashboard's Introduction

Weather Dashboard

Overview

This project for UCB Extension Full Stack Bootcamp is a interactive weather dashboard using server side API's to give you the current weather, your search history and a five day forcast for the city entered in the input. The search input will return an alert if it receives a city that is not valid.

Dashboard Image

Technologies used:

  • HTML
  • CSS
  • JavaScript
  • Jquery (very little)
  • Bootstrap
  • Open Weather Map API
  • Local Storage

API Calls

This appication makes 2 api calls.
The first uses the city name and gives some information about current weather. To get the extended and daily information for the city, I needed to do a second call using the Longitude and Latitude pulled from the first call. I used

Current Weather

The current weather shows the temp, humidity, windspeed and UV Index. The UV Index will dynamically change colors based on how severity of the ultraviolet rays. I simply changed the bootstrap class tags to change background color for the span. The current weather is displayed by creating an element, using innerHTML to fill in the contents, and appending the child.

Forecast

I was able to display the 5 day forcast very similarly to the current weather. The forecast displays and icon for the weather, the temp, date and humidity. The only difference was I used a for loop to make an element for each day.

Search History

The search history uses local storage to display the cities that have already been searched for. It logs the search into local storage after it returns a result to insure you dont save a bogus search that does not return data. When the page loads, or after a search it will append the previous searches using for loop that adds an LI element, applies innerHTML and then uses appendchild. I made these a link to search for the previous result again. Duplicates do not show up by using a new Set.

weather-dashboard's People

Contributors

ngdino avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.