GithubHelp home page GithubHelp logo

magicvilla / project-weather-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liaback-lowstett/project-weather-app

0.0 0.0 0.0 796 KB

Weather Web App

HTML 6.05% JavaScript 83.61% CSS 10.33%

project-weather-app's Introduction

Weather App

This week's project is to build a weather web app that shows today's weather and temperature, and a 5-day forecast using a weather API.

The problem

We started the project by creating a simple structure in HTML and conntected the js-file. From open weather app we got an API key which we used to get the URL for our weather data. We use dthe fetch() function to load the weather data into our page, and then selected the values we wanted to inject into the DOM from the JSON which comes from the API.

To present the city name the temperature and what type of weather we used variables and used methods such as toFixed() and toLocaleTimeString() to present the data as wanted.

To get the forecast for the next five day we used filter method on the forecast array to only get the info from 12:00 each day.

To change backround color and icons depending on the weahter forecast we used if conditions.

If we had more tome we would change names on classes and IDs to make it more readable. We would also change the color of the text depending on the weater and add more cities.

View it live

https://zealous-nightingale-04ef8c.netlify.app

project-weather-app's People

Contributors

hannapettersson avatar idlefingers avatar jenniedalgren avatar liaback-lowstett 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.