Git Product home page Git Product logo

weather-status's Introduction

Weather Status ☁️

This project aims to provide a webpage of current weather conditions among various cities, separated by country. In case of finding errors in the entered parameters, its processing is delegated to the OpenWeather API and maintaining the previous flow of the programs, the error obtained is shown as a header in the webpage.

Sources

  1. countries.xml: contains a list of countries.
  2. data.xml: Obtained from calling the GET find cities by circle method from the OpenWeather Map REST API. This method returns, given a geographic coordinate (with latitude and longitude) and a cnt number, a list of the cnt nearest cities with their respective weather metrics.

Usage

In order to use the program, you must first set an environment variable OPENWEATHER_API to the key given by the OpenWeather API. Then, run the following command:

$./tpe.sh cnt latitude longitude

(See Constraints for more information about the parameters).

When executed, tpe.sh will create data.xml with the information obtained by the OpenWeather API. Then, it will execute extract_weather_data.xq to combine the data from data.xml and country.xml, thus generating the file weather_data.xml. Finally, through generate_page.xsl the weather_page.html file is created in the same directory (which is linked to style.css), using weather_data.xml.

Constraints

  • cnt must be an integer between 1 and 50 inclusive
  • latitude must be a real number so that -90.0 < latitude < 90.0
  • longitude must be a real number so that -180.0 < longitude < 180.0

Screenshots

$./tpe.sh 6 -26 -54.43

Screenshot1.png

$./tpe.sh 5 55 55

Screenshot.png

weather-status's People

Contributors

lvittor avatar mbartellini avatar

Watchers

 avatar

Forkers

erodriguezzz

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.