COMPANY : CODTECH IT SOLUTIONS
NAME : LIKHITHA N
INTERN ID : CT06DL625
DOMAIN : PYTHON PROGRAMMING
DURATION : 6 WEEKS
MENTOR : NEELA SANTOSH
The Advanced Weather Dashboard is a comprehensive, interactive, and visually engaging weather data monitoring application developed using Python and Streamlit. It enables users to fetch real-time and forecasted weather data for multiple cities simultaneously, visualize this data through dynamic charts and maps, and download comprehensive reports in CSV, Excel, and PDF formats. The application is ideal for users who want a one-stop solution for monitoring and analyzing weather conditions across different regions quickly and efficiently.
The project integrates several APIs, data processing libraries, and visualization tools to deliver a professional-grade dashboard experience. With support for data export and visual summary, it serves both analytical and reporting needs. Its lightweight and responsive design makes it deployable on local systems or remote servers using platforms like Streamlit Cloud, Heroku, or AWS.
- Fetch real-time weather and 5-day forecasts using the OpenWeatherMap API.
- Allow users to input multiple cities and compare weather data between them.
- Visualize data trends such as temperature, wind speed, and humidity using Plotly charts.
- Display geographical locations using interactive maps powered by Folium.
- Provide export options in multiple formats: CSV, Excel, and PDF.
- Deliver a professional, theme-toggle enabled UI for accessibility and aesthetics.
- Python 3.x β Primary programming language for logic and functionality.
- Streamlit β For building an interactive web application interface.
-
OpenWeatherMap API β Used to fetch current weather and 5-day forecast data.
- Endpoint:
http://api.openweathermap.org/data/2.5/weather - Forecast endpoint:
http://api.openweathermap.org/data/2.5/forecast
- Endpoint:
- requests β For making HTTP requests to the weather API.
- pandas β For managing, cleaning, and processing weather data in tabular format.
- plotly.express β For creating dynamic, interactive plots for weather parameters.
- folium β For embedding interactive maps displaying city locations.
- streamlit-folium β For integrating Folium maps into the Streamlit frontend.
- datetime / time β For timestamp formatting and caching logic.
- fpdf β To generate downloadable PDF reports containing weather summaries.
- base64 & BytesIO β To handle file conversions and downloads within the Streamlit UI.
- Visual Studio Code (VS Code) β Used for writing and debugging code. It supports Python linting, Git integration, and auto-formatting.
- OS: Windows 10
- Accepts comma-separated city names.
- Sanitizes and processes user input to ensure valid API requests.
- Shows current temperature, humidity, wind speed, and weather condition.
- Weather descriptions are formatted in title case for readability.
- Automatically updates every 10 minutes using Streamlit's
@st.cache_data(ttl=600).
-
Retrieves 5-day weather forecast in 3-hour intervals.
-
Converts JSON forecast into a pandas DataFrame.
-
Line charts are generated for:
- Temperature trends
- Wind speed trends
- Humidity variation
-
Bar graphs show city-wise comparison for:
- Temperature
- Humidity
- Wind Speed
- Cloudiness
- Uses Folium to plot the latitude and longitude of each city.
- Includes zoom and pan controls.
- Each marker is labeled with the city name.
-
Users can download the processed weather data in:
- CSV format for Excel or spreadsheet applications.
- Excel (XLSX) format with proper tabular layout.
- PDF format containing each cityβs data as text for offline sharing.
- Theme switcher that allows toggling between light and dark modes using Streamlitβs
st.toggle()feature. - Applies custom CSS for dark background and white text for better readability at night.
-
Clone or download the repository:
git clone <your_repo_link> cd weather_dashboard
-
Install dependencies:
pip install -r requirements.txt
-
Set your API key using Streamlitβs
secrets.toml:-
Create
.streamlit/secrets.tomlwith:OPENWEATHER_API_KEY = "your_actual_api_key"
-
-
Run the app:
streamlit run app.py
-
Open in your browser at
http://localhost:8501.
weather_dashboard/
βββ app.py # Main Streamlit app
βββ requirements.txt # All required libraries
βββ .streamlit/
β βββ secrets.toml # API key for OpenWeatherMap
This dashboard has broad real-world utility across industries:
- Meteorological Research: Compare city-wide forecasts to identify trends or anomalies.
- Travel & Tourism: Help travel planners and tourists check weather across destinations.
- Logistics & Transport: Inform route planning and delivery operations.
- Educational Projects: Demonstrate real-time API use, data visualization, and reporting.
- Corporate Use: Generate location-specific weather reports for field teams or international branches.
- Add precipitation and UV index charts.
- Cache city coordinates to reduce API calls.
- Add date-range-based historical weather visualization using One Call API.
- Integrate with alert systems for weather warnings.
The Advanced Weather Dashboard project is a full-featured, cross-functional application that demonstrates how various modern Python libraries can be combined to create a real-world, production-ready dashboard. With features like real-time data fetching, rich visualizations, map integration, and export tools, it offers a valuable resource for anyone needing timely and accessible weather insights.










