π¦οΈ Weather Dashboard
A simple and responsive Weather Dashboard built using HTML, CSS, and JavaScript that fetches real-time weather data from the OpenWeatherMap API. Users can search for any city or allow location access to automatically display current weather conditions.
π Features
π Search weather by city name
π Auto-detect weather using browser geolocation
π‘οΈ Displays temperature (Β°C), humidity, wind speed, and weather description
πΌοΈ Dynamic weather icons based on conditions
β³ Loading indicator while fetching data
β Error handling for invalid locations
π¨ Clean and responsive UI with hover animations
π οΈ Technologies Used
HTML5
CSS3
JavaScript (ES6)
OpenWeatherMap API
Boxicons
π Project Structure weather-dashboard/ β βββ index.html βββ images/ β βββ clear.png β βββ cloud.png β βββ rain.png β βββ mist.png β βββ snow.png β βββ overcast.png β βββ 404.png β βββ bg.jpg βββ README.md
βοΈ How It Works
On page load, the app requests your location.
Weather data is fetched using latitude and longitude.
You can also search weather manually by entering a city name.
Weather details and icons update dynamically based on API response.
π API Setup
This project uses the OpenWeatherMap API.
Sign up at OpenWeatherMap
Generate your API key
Replace the API key in the JavaScript file:
const api_key = "YOUR_API_KEY_HERE";
π₯οΈ How to Run the Project
Clone this repository:
git clone https://github.com/your-username/weather-dashboard.git
Open index.html in your browser
Allow location access (optional)
Search for any city π
πΈ Preview
Add screenshots or a GIF here to showcase your project UI.
β Notes
Internet connection is required to fetch weather data
Geolocation must be enabled for automatic location weather
Make sure all images are placed inside the images folder
π License
This project is open-source and free to use for learning and personal projects.
π Acknowledgements
OpenWeatherMap API
Boxicons# Weather detection