The Weather Forecast App provides real-time current weather conditions and 5-day weather forecasts for cities worldwide. Built using Python, Streamlit, and OpenWeatherMap API, this application displays dynamic weather data and allows users to visualize forecasts through interactive bar and line graphs.
- Current Weather: Displays temperature, weather conditions, humidity, and wind speed for the selected city.
- 5-Day Forecast: Visualizes weather predictions using bar and line charts for easy interpretation.
- Custom Graphs: Choose between bar and line graphs for forecast data visualization.
- Interactive UI: Intuitive and simple interface for entering city names and switching between graph types.
- Responsive Design: Built for desktop and mobile devices.
- Contact Information: Easy-to-access contact details with social media links in the sidebar.
- Python: Backend logic and data processing.
- Streamlit: Framework for creating an interactive web app.
- Matplotlib & Seaborn: For plotting weather forecast graphs.
- OpenWeatherMap API: Source for real-time weather data.
- dotenv: For environment variable management.
-
Clone the repository:
git clone https://github.com/AkramUllahKhan/weather-forecast-app-streamlit.git
-
Navigate to the project directory:
cd weather-forecast-app-streamlit
-
Create and activate a virtual environment:
python -m venv env source env/bin/activate # For Windows: env\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your environment variable for the API key by creating a
.env
file:echo "WEATHER_API_KEY=your_openweather_api_key" > .env
-
Run the app:
streamlit run app.py
The app fetches real-time weather data from OpenWeatherMap API. You need an API key to access weather data, which should be stored in a .env
file as shown above.
- Add more weather data visualizations.
- Implement location-based weather fetching.
- Improve UI/UX with more customizable features.
For any inquiries, feel free to reach out:
- Email: [email protected]
- GitHub: AkramUllahKhan
- LinkedIn: AkramUllah
This project is open-source and available under the MIT License.