Git Product home page Git Product logo

homework-06-weather-app's Introduction

Deployed Here: https://cddeal12.github.io/Homework-06-Weather-App/

Homework-06-Weather-App

This project is a weather and forecast display app that functions on a user's city search. The app is powered by the Openweather api and uses it to call current weather, uv index, and a five-day forecast for the city the user specifies in their search. Additionally, the app saves the cities the user has checked in a list, and clicking on it will automatically search for the city's data again without the need for the user to search manually. The list will not update with the same city twice.

Method

The entire method of populating the page's weather data is contained in a single function, handleWeather(), which takes no arguments but uses global variables and reads the value of the search bar to make a query of the Openweather api with the appropriate city. In the case of the uv index it also takes the city's coordinates from the initial api return and uses them to make another query. For the 5 day forecast the function populates a div with the appropriate information five times, indexing the coresponding day and time from the Openweather five-day forecast api. The function then checks to see whether the city it just displayed has been displayed before by means of checking an array of all the used city names. If the city has not ben used it is added to the list of cities for the user to click on to pull up the information again.

Screenshot

screenshot

homework-06-weather-app's People

Contributors

cddeal12 avatar

Watchers

 avatar

homework-06-weather-app's Issues

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.