Git Product home page Git Product logo

em_weather's Introduction

Weather Forecast Web App

Overview

This project is a web application that displays the current weather and forecasts for the next two days. The design is optimized for small screens, adhering to the Digital Audio Broadcasting (DAB) standard.

Features

  • Current Weather: View the current weather conditions.
  • Two-Day Forecast: Get forecasts for the next two days.
  • Responsive Design: Adapted to smaller screens, following the DAB standard.

How to Use

Requirements

  1. AEMET API Token: You need to obtain an API token from the AEMET OpenData platform.
  2. Municipality Code: Obtain the municipality code for the location you want to get weather information for from SEPE.

Setup

  1. Clone the repository:

    git clone https://github.com/diegofpb/em_weather.git
  2. Navigate to the project directory:

    cd em-weather
  3. Open em-weather.html in your web browser, and add the following query params:

    • token: Your AEMET API Token
    • municipioId: The Municipality Code.

    For example, with token XXXX and the municipality code of Madrid (28079):

    http://127.0.0.1:3000/em-weather.html?municipioId=28079&token=XXXX

    You will get the following rendered HTML:

    Preview rendered HTML of Madrid

    Note that the HTML file will be rendered instantly, but not the weather data, since these have to be obtained from calls to the AEMET API, and it can take up to 10 seconds to answer the request in certain cases. If it is intended to obtain an image of such information, it is recommended to give a delay of approximately 10 seconds.

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (Fetch API for API requests)

License

This project is licensed under the MIT License.

Acknowledgments

em_weather's People

Contributors

diegofpb avatar

Watchers

 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.