/weather

4IZ268 | Very simple weather web application

Primary LanguageJavaScriptMIT LicenseMIT

HTML-5 CSS-3 jQuery-3 GitHub

Weather

⚠ No longer maintained nor published

This web application localizes your current or searched position, receives the weather data which is being displayed and visualised. It has been developed as a semestral work as a part of the course 4IZ268 Web Technologies.

Disclaimer: At some point, the application exceeds the request quota for the Google Maps API.

This is also my very first webpage created at 2016 and published now. The webpage is hosted on GitHub Pages.

Course

  • 4IZ268 - Web Technologies stands for the university course of FIS.
  • This application was the 2nd semestral work for this course whereas the first one was a simple static webpage.

Glossary

For those who haven't encountered with the following elementary terms yet:

How it works?

Localization API

An AJAX request is sent to the Localization API https://ipapi.co/json which returns the information in JSON format.

Weather API

The extracted latitude and longitude information is exctracted and passed to the weather API with an API Key as an asynchronous request by https://api.openweathermap.org/data/2.5/weather?lat=0&lon=0&APPID=e523473ac8b78fc0eb0018a092bc08f5 with the following parameters:

  • lat=0 is latitude of 0
  • lon=0 is longitude of 0
  • APPID=e523473ac8b78fc0eb0018a092bc08f5 is my "secret" API key which is required to work. This key should remain secret, however I don't mind to publish it for the educational purposes - feel free to try it out or generate the own key, but don't spam the requests programatically.

Subpages

  • Locate me is the main page which localizes your current position and displays the weather information. You don't need to look out the window anymore!
  • Take a look gives you an opportunity to see the current weather in any city in the world (which is available for the Weather API, however it usually refers to the closest bigger one).
  • My places stores the recently found places with these marked as a favourite ones on the previous subpages.
  • About offers a bried summary about the web application.

Quality check

I have integrated Codebeat and Codacy cloud static analysis services to check the overall code quality out of curiosity.

Licence

MIT License

Copyright (c) 2018 Nikolas Charalambidis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.