A modern, feature-rich weather application with stunning visual effects and comprehensive weather data powered by OpenWeather API.
- 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
- 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
- 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
- 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
- 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
Visit the live application: SkyCast Weather
(Add screenshots of your application here)
- 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
- A modern web browser (Chrome, Firefox, Safari, Edge)
- OpenWeather API key (free tier available)
-
Clone the repository
git clone https://github.com/TacticalReader/WEATHER-WEB.git cd WEATHER-WEB -
Get your OpenWeather API Key
- Visit OpenWeather API
- Sign up for a free account
- Generate your API key from the dashboard
-
Configure API Key
- Open
config.js - Replace the existing API key with your own:
const CONFIG = { apiKey: "YOUR_API_KEY_HERE", // ... rest of config };
- Open
-
Launch the application
- Open
index.htmlin your web browser - Or use a local server:
# Using Python python -m http.server 8000 # Using Node.js npx http-server
- Open
-
Access the app
- Navigate to
http://localhost:8000(or relevant port)
- Navigate to
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
- Type city name in the search box
- Select from autocomplete suggestions
- Click search button or press Enter
- Click the location icon (๐) to get weather for your current position
- Allow browser location permissions when prompted
- Use the toggle switch to convert between ยฐC and ยฐF
- Settings persist across sessions
- Click the share icon (top right)
- Use the native share menu (mobile) or download the image automatically
- Share your weather card with friends
- Search for a city
- Click the heart icon (โค๏ธ) to add to favorites
- Access favorites from the quick-access list below search
- Click chart buttons (Temp/Humidity/Wind) to switch visualizations
- Scroll through hourly forecast for detailed hourly data
- Check 5-day forecast for extended predictions
- 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
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
}
};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 */
}Configure Chart.js options in script.js under the createChart() function.
- Automatically changes based on weather conditions
- Separate day/night background sets
- Smooth cross-fade transitions between states
- Parallax scrolling effect
- Displays comprehensive AQI status
- Color-coded quality indicators (Good, Moderate, Unhealthy, etc.)
- Individual pollutant measurements
- Health recommendations based on AQI level
- Visual temperature trends
- Precipitation probability
- Min/Max temperature ranges
- Weather condition icons for quick recognition
- Analyzes multiple weather parameters simultaneously
- Provides color-coded alerts (Caution, Danger, Severe)
- Monitors thermal comfort, wind safety, and visibility risks
- Goes beyond simple percentages
- Analyzes forecast trends (intensifying vs clearing)
- Provides human-readable context about rain duration and intensity
- 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
- Enable location services in browser settings
- Check HTTPS connection (required for geolocation)
- Grant permission when prompted
- Check internet connection
- Verify Unsplash URLs are accessible
- Check browser console for CORS errors
- โ Chrome/Edge (Chromium) 90+
- โ Firefox 88+
- โ Safari 14+
- โ Opera 76+
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Add more weather metrics
- Implement weather alerts
- Add more language support
- Improve mobile responsiveness
- Add weather map integration
- Create theme customization options
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- OpenWeather - Weather data API
- Unsplash - Background imagery
- Chart.js - Data visualization library
- html2canvas - Screenshot library
- Google Fonts - Typography
- Material Icons - UI iconography
TacticalReader - @TacticalReader
Project Link: https://github.com/TacticalReader/WEATHER-WEB
โญ Star this repository if you find it helpful!
Made with โค๏ธ by TacticalReader