Add real weather forecast visualizations using OpenWeatherMap forecast API#178
Open
awrya-cmd wants to merge 4 commits into
Open
Add real weather forecast visualizations using OpenWeatherMap forecast API#178awrya-cmd wants to merge 4 commits into
awrya-cmd wants to merge 4 commits into
Conversation
Collaborator
|
@awrya-cmd resolve conflicts |
Author
resolved all. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add Real Weather Forecast Visualizations to Analysis Page
Overview
This PR adds weather forecast visualizations to the Analysis page using real forecast data from the OpenWeatherMap 5-Day / 3-Hour Forecast API.
Unlike the initial approach of generating trend data from a single weather snapshot, this implementation uses only actual forecast values returned by the API. No synthetic, estimated, simulated, or fabricated weather data is displayed.
Changes Made
Backend
Modified:
backend/alertsystem.pyfetch_forecast()helper to retrieve forecast data from the OpenWeatherMap Forecast API./weatherendpoint.Frontend
Analysis Page
Modified:
Frontend/Analysis/analysis.htmlAdded a dedicated Weather Trends section.
Integrated Chart.js via CDN.
Added chart containers for:
Styling
Modified:
Frontend/Analysis/analysis.cssChart Rendering
Modified:
Frontend/Analysis/analysis.jsRemoved all synthetic trend generation logic.
Implemented parsing of real forecast data from the API response.
Added dynamic Chart.js rendering for:
Added chart instance cleanup to prevent duplicate overlays.
Added fallback handling when forecast data is unavailable.
Uses real forecast timestamps formatted into readable labels (e.g. "Tue 12 PM", "Wed 12 AM").
Data Accuracy
Testing
Verified
Screenshots
Issue #35