Advanced Weather Platform π¦οΈ Welcome to the Advanced Weather Platform, a powerful Streamlit-based web application that delivers real-time, actionable weather insights for professionals in agriculture, transportation, construction, and more. Powered by WeatherAPI.com, this platform provides comprehensive weather data, advanced analytics, and sector-specific decision support, all with a user-friendly, multilingual interface. Features β¨
Real-Time Weather Data: Access current weather conditions for cities worldwide, with "New Delhi, India" as the default location π. Weather Forecasts: View dynamic forecasts for up to 14 days, including temperature, precipitation, wind, and more π . Historical Data: Analyze past weather trends with metrics like Growing Degree Days (GDD) and temperature anomalies π. Interactive Visualizations: Explore data through Plotly charts, heatmaps, and Folium maps πΊοΈ. Sector-Specific Decision Support: Get tailored recommendations for Agriculture πΎ, Transportation π, Construction ποΈ, Energy, Tourism, Emergency Management, and Health. Multilingual Support: Use the platform in English, Hindi, Spanish, or French π. Advanced Analytics: Calculate GDD, heat index, wind chill, Wet Bulb Globe Temperature (WBGT), and precipitation probability using machine learning (RandomForestClassifier) and time-series forecasting (Prophet). Export Options: Download charts, data (CSV/JSON), and decision support reports (LaTeX/text).
Prerequisites π οΈ
Python 3.8 or higher A WeatherAPI.com API key (free tier available) Git (for cloning the repository)
Installation π
Clone the Repository: git clone https://github.com/your-username/advanced-weather-platform.git cd advanced-weather-platform
Set Up a Virtual Environment (recommended): python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
Install Dependencies: pip install -r requirements.txt
Configure the WeatherAPI Key:
Sign up at WeatherAPI.com to get your API key. Store the key in a .env file or Streamlit secrets:echo "WEATHER_API_KEY=your-api-key" > .env
Or in secrets.toml:WEATHER_API_KEY = "your-api-key"
Usage π
Run the Application: streamlit run app5.py
Explore the Platform:
Open your browser to http://localhost:8501. Search for a city (e.g., "Mumbai", "New Delhi") in the sidebar. Navigate tabs (Dashboard, Current Weather, Forecast, etc.) to view data and insights. Customize sector-specific thresholds in the sidebar for tailored recommendations.
Example:
Search for "Mumbai" to view current weather, 7-day forecasts, and agriculture-specific recommendations. Export a decision support report for construction projects in New Delhi.
Project Structure π advanced-weather-platform/ βββ app5.py # Main Streamlit application βββ requirements.txt # Python dependencies βββ README.md # Project documentation βββ .env # Environment variables (not tracked) βββ secrets.toml # Streamlit secrets (optional, not tracked)
Dependencies π¦ See requirements.txt for a complete list of dependencies, including:
streamlit: Web framework pandas: Data manipulation plotly: Visualizations folium: Interactive maps scikit-learn: Machine learning prophet: Time-series forecasting aiohttp: Asynchronous API calls
Install with: pip install -r requirements.txt
Contributing π€ We welcome contributions! To get started:
Fork the repository. Create a new branch (git checkout -b feature/your-feature). Make your changes and commit (git commit -m "Add your feature"). Push to your fork (git push origin feature/your-feature). Open a Pull Request.
Please follow our Code of Conduct and include tests for new features. License π This project is licensed under the MIT License. See the LICENSE file for details. Acknowledgments π
WeatherAPI.com for weather data Streamlit for the awesome web framework Open-source libraries: Plotly, Folium, Prophet, scikit-learn
Contact π¬ For questions or feedback, reach out via GitHub Issues or email [[email protected]]. π§οΈ Stay ahead of the weather with the Advanced Weather Platform! π #WeatherTech #ClimateSolutions #DataDriven #Streamlit #OpenSource