Skip to content

priya05-git/Weather-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌦️ 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages