Skip to content

Weather-Report can select a city from a list to retrieve their weather information. Available more than 200.000 locations

Notifications You must be signed in to change notification settings

ioanniskousis/Weather-Report

Repository files navigation

Weather-Report

Contributors Forks Stargazers Issues


Microverse Logo

The Weather-Report Application

This project is part of the Microverse curriculum in JavaScript course!
Explore the docs
Live Version
Report Bug - Request Feature

This is a small Weather-Report application where the user can select a city from a list and retreive the weather information about the requested city. Available more than 200.000 location


Table of Contents

Screen Shots

wr-rain.png


wr-clouds.png


About The Project

The project uses asynchronus flow and follows the MVC principles.
The main control is applied in index.js.
Partially,
- the model for countries is implemented in countriesDB.js creating a data set of countries stored in dist/countries.json
- the model for cities is implemented in citiesDB.js creating a data set of cities stored in dist/cities.json
- the main consept is controlled in index.js
- first a callback function (citySelected) is supplied to the interface elements that represent a city (city buttons)
- the callback receives the requested city.
- calls an asynchronous API fetch procedure provided a callback (cityWeatherArrived) to receive the weather data for the requested city
- the city weather data that arrived are passed to the interface module cityWeatherInterface.js
- the module cityWeatherInterface.js contains procedures to update the interface information with the new data

  • An initial population is performed when the localStorage is empty of Favorites by data held in seed.js.
  • Shorthand commands for creating and accessing elements are used and are held in utils.js.

Application Instructions

  • The application comes with some initial data about the favotires cities held in seed.js file

  • Also, there are 200.000 locations to be invoked

  • The favorite cities list is on the left. Clicking a city button an http request is generated to get information about the weather at the requested city.

favourites

  • the received data are passed to the weather interface (cityWeatherInterface).

weather.png

  • click the units button at the top-right to toggle between Fahrenheit and Celcius
  • play around selecting a particular country's cities and select a city to view their weather

Live Version

GitHub Pages


System Requierments

  • JavaScript Enabled
  • You need to Disable Cross-Origin-Restrictions from your browser if you want to open the index.html from your file system without using a server.

Development

  • Clone the project
  https://github.com/ioanniskousis/Weather-Report.git
  
  Use VSCode and Live Server to show index.html
  Since webpack is used, run 'npm run build' on you terminal before opening

Dependencies

please run

  npm run build

to comply with the dependencies held in package.json


Built With

This project was built using these technologies.

  • JavaScript (ES6)
  • HTML5
  • CSS3
  • webpack
  • APIs
  • Git - GitHub
  • ESLint
  • Stylelint
  • Stickler

Contributors

👤 ​

Ioannis Kousis


Acknowledgements

About

Weather-Report can select a city from a list to retrieve their weather information. Available more than 200.000 locations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published