Features β’ Demo β’ Installation β’ Usage β’ API References β’ Contributing
- About
- Features
- Technologies Used
- Installation
- Usage
- API References
- Screenshots
- Project Structure
- Contributing
- License
- Contact
Country & Weather Explorer is a modern, interactive web application that combines country information and real-time weather data in one seamless experience. Built with vanilla JavaScript, this project demonstrates clean code practices, responsive design, and API integration.
- π Comprehensive Information: Get detailed country statistics and current weather conditions
- π¨ Dynamic Backgrounds: Weather-based background themes that change with conditions
- π± Fully Responsive: Perfect experience on desktop, tablet, and mobile devices
- π Dark Mode Support: Toggle between light and dark themes
- β‘ Fast & Lightweight: No heavy frameworks, pure vanilla JavaScript
- π΄ Country Information: Search for any country and get detailed data
- π Comprehensive Stats:
- Population statistics
- Capital city information
- Regional data
- Currency details
- Official languages
- Time zones
- π‘οΈ Visual Elements: National flags and coat of arms
- πΊοΈ Interactive Maps: See country locations on embedded maps
- β Real-Time Weather: Current weather conditions for any location
- π‘οΈ Detailed Metrics:
- Temperature (actual & feels like)
- Humidity levels
- Wind speed & direction
- Atmospheric pressure
- UV index
- Visibility
- Cloud cover
- π¬οΈ Air Quality: Real-time air quality information
- π¨ Dynamic Backgrounds: Background changes based on weather conditions:
- βοΈ Sunny/Clear
- βοΈ Cloudy
- π§οΈ Rainy
- βοΈ Snowy
- βοΈ Thunderstorm
- π«οΈ Foggy/Misty
- π Theme Toggle: Switch between light and dark modes
- π± Responsive Design: Optimized for all screen sizes
- π Smooth Animations: Elegant transitions and effects
- π Smart Search: Search by country name or city
- π Modern Layout: Clean, card-based interface
- π― Intuitive Navigation: Easy-to-use navigation menu
| Technology | Purpose |
|---|---|
| Structure & Markup | |
| Styling & Animations | |
| Functionality & Logic | |
| Typography | |
| Beautiful Alerts |
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Basic understanding of HTML/CSS/JavaScript (for development)
- API keys (see API References)
-
Clone the repository
git clone https://github.com/yourusername/country-weather-explorer.git
-
Navigate to the project directory
cd country-weather-explorer -
Set up API keys
- Open
js/app.js - Add your API keys:
const WEATHER_API_KEY = 'your_weather_api_key'; const COUNTRY_API_KEY = 'your_country_api_key'; // if required
- Open
-
Open 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
-
Start Exploring! π
- Navigate to the Country Explorer section
- Enter a country name in the search box
- Click the Search button or press Enter
- View detailed country information including:
- Flag and coat of arms
- Population and capital
- Languages and currency
- Interactive map
- Go to the Weather Explorer section
- Enter a city or country name
- Click Search Weather
- Get real-time weather data:
- Current temperature
- Weather conditions
- Humidity, wind, pressure
- Air quality index
- Watch the background change to match the weather! π
- Click the π/βοΈ icon in the navigation bar
- Switch between dark and light themes
- Preference is saved automatically
This project uses the following APIs:
- Purpose: Country information
- Documentation: restcountries.com
- Endpoint:
https://restcountries.com/v3.1/ - Free: β Yes
- Authentication: β Not required
- Purpose: Real-time weather data
- Documentation: weatherapi.com
- Free Tier: β Available
- Authentication: β API Key required
- Sign up: Get Free API Key
- Purpose: Interactive maps
- Options:
- Google Maps API
- Leaflet.js with OpenStreetMap
- Mapbox
wether-app/
β
βββ index.html # Landing page
βββ home.html # Main application page
βββ README.MD # Project documentation
β
βββ css/
β βββ styles.css # Main stylesheet
β
βββ js/
β βββ app.js # Application logic
β
βββ assets/ # Images and icons (if any)
βββ images/
βββ icons/
The project uses dynamic weather-based color schemes:
| Weather | Colors |
|---|---|
| βοΈ Sunny | #667eea β #764ba2 |
| βοΈ Cloudy | #bdc3c7 β #2c3e50 |
| π§οΈ Rainy | #4b6cb7 β #182848 |
| βοΈ Snowy | #e6dada β #274046 |
| βοΈ Thunder | #2c3e50 β #000000 |
| π«οΈ Foggy | #757f9a β #d7dde8 |
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your 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 7-day weather forecast
- Implement geolocation for automatic weather detection
- Add more weather animations
- Create country comparison feature
- Add historical weather data
- Implement unit tests
- Add accessibility improvements
- Create mobile app version
Distributed under the MIT License. See LICENSE file for more information.
- REST Countries API for country data
- WeatherAPI.com for weather information
- Google Fonts for Inter font family
- SweetAlert2 for beautiful alerts
- All open-source contributors