A sleek and interactive application to view real-time weather updates and timezone-based local time for any city worldwide.
ClimaScope simplifies weather forecasting by providing users with real-time weather updates, including temperature, humidity, wind speed, and more. Alongside weather details, it shows the current local time in the selected city with support for time zones like IST, EST, etc., making it a versatile tool for travelers, businesses, or anyone curious about global weather and time.
- Project Title and Overview
- Project Description
- Features
- Technology Stack
- Preview
- Installation
- Usage
- Configuration
- Testing
- License
- FAQs
- Contact Information
- Fetch real-time weather data for any city worldwide.
- Display local time in multiple time zones (e.g., IST, EST).
- Interactive and responsive user interface for a seamless experience.
- Easy-to-use input form for selecting cities.
- Error handling for invalid city inputs or API issues.
Frontend:
- HTML5, CSS3, JavaScript (ES6)
- Bootstrap for responsive design
Backend:
- Node.js (for API interaction)
- OpenWeatherMap API (for weather data)
Below is the preview of ClimaScope in action:
To set up ClimaScope locally, follow these steps:
-
Clone the repository:
git clone https://github.com/ThakkarVidhi/weather-by-city-time.git cd weather-by-city-time
-
Install the necessary dependencies:
npm install
-
Obtain an API key from OpenWeatherMap and update the
.env
file:const OPENWEATHER_API_KEY = "your_api_key_here";
-
Start the application:
npm start
-
Open
http://localhost:3000/
in your browser to use the app.
Steps to Use ClimaScope:
- Enter the name of a city in the search bar.
- Click "Get Weather" to view real-time weather data and the local time.
- The app will display:
- Temperature, humidity, wind speed, and weather conditions.
- Local time with the city's timezone.
This project uses a .env
file for managing API keys. Update the following key before running the app:
- OPENWEATHER_API_KEY: Add your OpenWeatherMap API key.
To test the functionality of ClimaScope, follow these steps:
- Open the application in your browser.
- Enter a valid city name and verify the weather and time displayed.
- Test error handling by entering invalid city names.
This project is licensed under the MIT License.
Q: What happens if I enter an invalid city name?
A: The app will display an error message stating that the city was not found.
Q: Can I change the temperature unit (e.g., Celsius to Fahrenheit)?
A: The current version supports Celsius by default. You can modify the code in the weather API call to include the units
parameter.
Q: What should I do if the time does not display correctly?
A: Ensure that the city name is entered correctly.
Q: Can I add additional weather metrics?
A: Yes, you can extend the API call to include additional metrics and modify the UI accordingly.
For any questions or feedback, feel free to reach out:
📧 vidhithakkar.ca@gmail.com
🌐 LinkedIn