The Weather Dashboard is a web application that provides users with real-time weather updates and forecasts for various locations. It leverages the OpenWeatherMap API to fetch current weather data and uses Leaflet.js for an interactive map display.
- Real-time Weather Updates: Get the latest weather conditions for any city.
- Search Functionality: Enter a city name to retrieve its weather information.
- Forecast Display: View weather predictions for the next few days.
- Interactive Map: Visualize the selected location on an interactive map.
- Search History: Quickly access previously searched locations.
- HTML5
- CSS3 (with custom styles)
- JavaScript (jQuery)
- OpenWeatherMap API
- Leaflet.js (for map rendering)
- Font Awesome (for icons)
- Google Fonts (Lato Font)
- Clone the repository:
git clone https://github.com/your-username/weather-dashboard.git
- Navigate to the project folder:
cd weather-dashboard
- Open
index.html
in your browser.
- Enter a city name in the search box and click the search button.
- View real-time weather conditions and forecasts for the selected location.
- Click on different days in the forecast section to see more details.
- Use the interactive map to explore the selected location visually.
index.html
- The main HTML file containing the UI structure.style.css
- Stylesheet for layout and design.app.js
- JavaScript file handling API requests and UI updates.dummy_data.js
- Sample weather data for testing.geoapify_dummy.js
- Sample geolocation data for testing.
To use this project with real data, you need an OpenWeatherMap API key.
- Sign up at OpenWeatherMap.
- Get your API key.
- Replace the placeholder API key in
app.js
:var apiKey = 'YOUR_API_KEY';
Feel free to contribute to this project by submitting pull requests or reporting issues.
This project is open-source and available under the MIT License.