Skip to content

Weather App is a simple and interactive web application that provides current weather information for any city using the OpenWeatherMap API. It displays temperature, humidity, wind speed, and weather conditions with corresponding icons based on the weather type. Users can search for a city to see real-time weather updates.

Notifications You must be signed in to change notification settings

Mohitpatwari/Weather-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather API Project

Overview

This project provides a simple weather application that fetches and displays current weather information for a specified city. It utilizes the OpenWeatherMap API to retrieve weather data and presents it in a user-friendly format.

Features

  • Search for weather by city name.
  • Display temperature, humidity, and wind speed.
  • Show weather conditions with corresponding icons.
  • Handles errors for invalid city names.

Getting Started

Prerequisites

  • A modern web browser (e.g., Chrome, Firefox, Safari)
  • Basic knowledge of HTML, CSS, and JavaScript

Installation

  1. Clone the repository:

    git clone https://github.com/Mohitpatwari/Weather-API.git
    

Navigate to the project directory:

bash cd your-repository

Open the index.html file in your browser:

Simply double-click the index.html file to open it in your default web browser. Configuration

Get an API Key:

Sign up for a free API key at OpenWeatherMap.

Add Your API Key:

Replace the apikey variable in script.js with your own API key. javascript const apikey = "your_api_key_here";

Usage:

Enter a city name in the search input field. Click the search button to fetch weather data. View the current temperature, humidity, wind speed, and weather conditions with icons.

Example:

Error Handling If the city name is not found, an error message will be displayed. Ensure the city name is spelled correctly and try again. Contributing Fork the repository

Create a feature branch:

bash Copy code git checkout -b feature/new-feature

Commit your changes:

bash Copy code git commit -am 'Add new feature'

Push to the branch:

bash Copy code git push origin feature/new-feature Create a new Pull Request

License:

This project is licensed under the MIT License.

Acknowledgements:

OpenWeatherMap API for weather data. GitHub for hosting the code repository.

About

Weather App is a simple and interactive web application that provides current weather information for any city using the OpenWeatherMap API. It displays temperature, humidity, wind speed, and weather conditions with corresponding icons based on the weather type. Users can search for a city to see real-time weather updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published