Skip to content

A modern, feature-rich weather application with stunning visual effects and comprehensive weather data powered by OpenWeather API.

License

Notifications You must be signed in to change notification settings

TacticalReader/WEATHER-WEB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ˜๏ธ SkyCast Weather

A modern, feature-rich weather application with stunning visual effects and comprehensive weather data powered by OpenWeather API.

License JavaScript HTML5 CSS3

โœจ Features

๐ŸŒก๏ธ Weather Information

  • Real-time Weather Data - Current temperature, conditions, and weather description
  • Live Digital Clock - Real-time local date and time display
  • Dual Unit Support - Toggle between Celsius and Fahrenheit with animated switch
  • 5-Day Forecast - Extended weather predictions with daily summaries
  • Hourly Forecast - Next 24 hours detailed weather breakdown
  • Wind Forecast - Comprehensive wind speed and direction data

๐ŸŽจ Visual Excellence

  • Dynamic Backgrounds - Weather-responsive parallax backgrounds with smooth transitions (Day/Night support)
  • Glassmorphism UI - Modern frosted glass design aesthetic
  • Dynamic Weather Visuals - Weather condition icons with vibrant filters and effects
  • Particle Effects - Dynamic particle system matching weather conditions
  • Skeleton Loading - Smooth loading states for better UX

๐Ÿ“Š Advanced Metrics

  • Air Quality Index (AQI) - Real-time air pollution data
  • Pollutant Levels - PM2.5, SO2, NO2, and O3 measurements
  • Interactive Charts - Temperature, humidity, and wind speed visualizations with day/night cycle shading
  • Wind Flow Map - Interactive particle visualization of wind speed and direction
  • Sunrise/Sunset Times - Precise daylight information with countdown
  • Visibility & Pressure - Additional atmospheric data
  • Wind Direction - Cardinal direction indicators

๐Ÿ›ก๏ธ Intelligent Insights

  • Hazard Alerts - Real-time safety warnings for extreme heat, cold, wind, visibility, and air quality
  • Precipitation Analysis - Contextual rain probability with trend indicators (rising/falling), intensity forecasts, and duration estimates
  • Health Recommendations - Actionable advice based on current air quality and weather conditions

๐ŸŽฏ Smart Features

  • Social Sharing - Generate and share downloadable snapshots of current weather
  • City Search - Autocomplete suggestions for quick city lookup
  • Geolocation - Automatic weather detection for current location
  • Favorites System - Save and quickly access favorite locations
  • Country Flags - Visual country identification
  • Toast Notifications - User-friendly status messages
  • Responsive Design - Optimized for all device sizes

๐Ÿš€ Live Demo

Visit the live application: SkyCast Weather

๐Ÿ“ธ Screenshots

(Add screenshots of your application here)

๐Ÿ› ๏ธ Technologies Used

  • HTML5 - Semantic markup structure
  • CSS3 - Modern styling with custom properties, animations, and gradients
  • JavaScript (ES6+) - Core functionality and API integration
  • Chart.js - Interactive weather data visualizations
  • html2canvas - Screenshot generation functionality
  • OpenWeather API - Weather and air quality data provider
  • Google Fonts - Custom typography (Orbitron, Nova Round, Geo)
  • Material Icons - Icon set for UI elements
  • Unsplash - High-quality background images

๐Ÿ“‹ Installation

Prerequisites

  • A modern web browser (Chrome, Firefox, Safari, Edge)
  • OpenWeather API key (free tier available)

Setup Instructions

  1. Clone the repository

    git clone https://github.com/TacticalReader/WEATHER-WEB.git
    cd WEATHER-WEB
    
  2. Get your OpenWeather API Key

    • Visit OpenWeather API
    • Sign up for a free account
    • Generate your API key from the dashboard
  3. Configure API Key

    • Open config.js
    • Replace the existing API key with your own:
      const CONFIG = {
          apiKey: "YOUR_API_KEY_HERE",
          // ... rest of config
      };
  4. Launch the application

    • Open index.html in your web browser
    • Or use a local server:
      # Using Python
      python -m http.server 8000
      
      # Using Node.js
      npx http-server
  5. Access the app

    • Navigate to http://localhost:8000 (or relevant port)

๐Ÿ“ Project Structure

WEATHER-WEB/
โ”œโ”€โ”€ index.html           # Main HTML structure
โ”œโ”€โ”€ style.css           # Styles and animations
โ”œโ”€โ”€ script.js           # Core application logic
โ”œโ”€โ”€ config.js           # API key and configuration
โ”œโ”€โ”€ icons.js            # Weather icon mappings
โ”œโ”€โ”€ particles.js        # Particle effects, hazard analysis, and wind map logic
โ”œโ”€โ”€ LICENSE             # Apache 2.0 License
โ”œโ”€โ”€ README.md           # Documentation
โ”œโ”€โ”€ images/             # Image assets
โ”‚   โ”œโ”€โ”€ weather_icons/  # Weather condition icons
โ”‚   โ””โ”€โ”€ openweather.png # API attribution logo
โ””โ”€โ”€ .github/            # GitHub-specific files

๐ŸŽฎ Usage

Search for a City

  1. Type city name in the search box
  2. Select from autocomplete suggestions
  3. Click search button or press Enter

Use Current Location

  • Click the location icon (๐Ÿ“) to get weather for your current position
  • Allow browser location permissions when prompted

Toggle Temperature Units

  • Use the toggle switch to convert between ยฐC and ยฐF
  • Settings persist across sessions

Share Snapshot

  1. Click the share icon (top right)
  2. Use the native share menu (mobile) or download the image automatically
  3. Share your weather card with friends

Add Favorites

  1. Search for a city
  2. Click the heart icon (โค๏ธ) to add to favorites
  3. Access favorites from the quick-access list below search

View Different Data

  • Click chart buttons (Temp/Humidity/Wind) to switch visualizations
  • Scroll through hourly forecast for detailed hourly data
  • Check 5-day forecast for extended predictions

๐Ÿ”‘ API Features Used

OpenWeather APIs

  • Current Weather API - Real-time weather conditions
  • 5-Day Forecast API - Extended weather predictions
  • Geocoding API - City name to coordinates conversion
  • Air Pollution API - Air quality index and pollutants
  • Weather Icons - Official OpenWeather icon set

๐ŸŽจ Customization

Modify Backgrounds

Edit config.js to change weather-condition backgrounds for day and night:

const CONFIG = {
    // ...
    backgrounds: {
        'Clear': 'YOUR_DAY_IMAGE_URL',
        'Clouds': 'YOUR_DAY_IMAGE_URL',
        // ... add more conditions
    },
    nightBackgrounds: {
        'Clear': 'YOUR_NIGHT_IMAGE_URL',
        'Clouds': 'YOUR_NIGHT_IMAGE_URL',
        // ... add more conditions
    }
};

Change Color Scheme

Modify CSS custom properties in style.css:

:root {
    --celsius-gradient: linear-gradient(to right, #06b6d4, #2563eb);
    --fahrenheit-gradient: linear-gradient(to right, #f97316, #ef4444);
    /* ... customize colors */
}

Adjust Chart Appearance

Configure Chart.js options in script.js under the createChart() function.

๐ŸŒŸ Features in Detail

Dynamic Background System

  • Automatically changes based on weather conditions
  • Separate day/night background sets
  • Smooth cross-fade transitions between states
  • Parallax scrolling effect

Air Quality Monitoring

  • Displays comprehensive AQI status
  • Color-coded quality indicators (Good, Moderate, Unhealthy, etc.)
  • Individual pollutant measurements
  • Health recommendations based on AQI level

Smart Forecast Display

  • Visual temperature trends
  • Precipitation probability
  • Min/Max temperature ranges
  • Weather condition icons for quick recognition

Hazard Interpretation Engine

  • Analyzes multiple weather parameters simultaneously
  • Provides color-coded alerts (Caution, Danger, Severe)
  • Monitors thermal comfort, wind safety, and visibility risks

Precipitation Probability Logic

  • Goes beyond simple percentages
  • Analyzes forecast trends (intensifying vs clearing)
  • Provides human-readable context about rain duration and intensity

๐Ÿ› Troubleshooting

API Key Issues

  • Ensure your API key is active (may take a few hours after generation)
  • Check for typos in config.js
  • Verify API call limits on free tier

Location Not Working

  • Enable location services in browser settings
  • Check HTTPS connection (required for geolocation)
  • Grant permission when prompted

Images Not Loading

  • Check internet connection
  • Verify Unsplash URLs are accessible
  • Check browser console for CORS errors

๐Ÿ“ฑ Browser Compatibility

  • โœ… Chrome/Edge (Chromium) 90+
  • โœ… Firefox 88+
  • โœ… Safari 14+
  • โœ… Opera 76+

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contribution Ideas

  • Add more weather metrics
  • Implement weather alerts
  • Add more language support
  • Improve mobile responsiveness
  • Add weather map integration
  • Create theme customization options

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ง Contact

TacticalReader - @TacticalReader

Project Link: https://github.com/TacticalReader/WEATHER-WEB


โญ Star this repository if you find it helpful!

Made with โค๏ธ by TacticalReader