This application provides a simple and interactive way to check the weather forecast for the next few days. Users can choose a location, specify the number of forecast days, and view either the temperature trends or sky conditions in an intuitive interface.
The app uses the OpenWeatherMap API to fetch weather data and displays it using Streamlit and Plotly.
- Enter a location to get the weather forecast.
- Select the number of days (up to 5) for which you want to see the forecast.
- Choose between viewing temperature trends or sky conditions (e.g., clear, cloudy, rain).
- Interactive and visually appealing charts using Plotly.
Make sure you have Python installed. You will also need the following Python packages:
streamlitplotlyrequests
You can install them using:
pip install streamlit plotly requests-
Clone the Repository:
git clone <repository-url> cd <repository-directory>
-
Configure the API Key:
Replace
API_KEYinbackend.pywith your OpenWeatherMap API key:API_KEY = "your_api_key_here"
-
Run the Application:
streamlit run app.py
-
Access the App:
Open your browser and go to
http://localhost:8501.
- Make sure your OpenWeatherMap API key is active and has sufficient credits.
- The app can forecast up to 5 days of weather data, each day having 8 data points (3-hour intervals).