Skip to content

This is a simple weather application that displays real-time weather information for any city using the OpenWeather API. Users can input the name of a city and get the current temperature, humidity, weather description, and an icon representing the current weather conditions.

License

Notifications You must be signed in to change notification settings

DorukhanBekdur/Live-WeatherApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Weather App 🌤️

This is a simple weather application that displays real-time weather information for any city using the OpenWeather API. Users can input the name of a city and get the current temperature, humidity, weather description, and an icon representing the current weather conditions.

Features 🔍

  • 🌡️ Current Temperature: Displays the current temperature for the selected city.
  • 💧 Humidity: Shows the current humidity level of the city.
  • ☁️ Weather Description: Provides a description of the current weather conditions (e.g., clear sky, scattered clouds).
  • 🎨 Dynamic Background Color: Changes the background color based on the weather condition (e.g., blue for cloudy, yellow for sunny).
  • ☀️ Weather Icons: Shows a matching icon for the weather condition.

Technologies Used ✨

  • HTML
  • CSS
  • JavaScript
  • OpenWeather API

How to Use ❓

  1. Clone this repository:

    git clone https://github.com/dorukhanbekdur/live-weather-app.git
    
  2. Clone this repository:

    cd live-weather-app
    
  3. Open index.html in your browser:

  4. Enter the name of a city in the input field and click the "Get Weather" button to see the current weather information.:

Project Structure 🧬

live-weather-app/
├── index.html          # Main HTML file that structures the app interface
├── style.css           # CSS file for styling the weather card and background
├── script.js           # JavaScript file to fetch and display weather data
└── README.md           # Documentation file explaining the app

API Key Setup 🔑

To fetch weather data from the OpenWeather API, you need an API key. Follow these steps to set it up:

  1. Create an OpenWeather Account:

  2. Generate an API Key:

    • Once you’re logged in, navigate to the "API keys" section in your account settings.
    • Generate a new API key and copy it.
  3. Add Your API Key to the Project:

    • Open the script.js file in your project.
    • Locate the following line in the file:
      const apiKey = 'YOUR_API_KEY';
    • Replace 'YOUR_API_KEY' with the API key you copied from OpenWeather:
      const apiKey = 'your_actual_api_key_here';
  4. Save and Run:

    • Save the changes to script.js.
    • Now you’re ready to fetch live weather data! Enter a city name in the app and click "Get Weather" to see the results.

Note: Be sure to keep your API key secure. Avoid sharing it publicly or including it in repositories without protecting it.

Screenshot 📷

Screenshot_2

About

This is a simple weather application that displays real-time weather information for any city using the OpenWeather API. Users can input the name of a city and get the current temperature, humidity, weather description, and an icon representing the current weather conditions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published