An open API service indexing awesome lists of open source software.

https://github.com/sreejabethu/forecasting-weather

Weather Forecasting using OpenWeatherMap API and Random Forest Regressor in Python. Converts temperature data to Fahrenheit, and provides visualizations for actual vs predicted temperatures.
https://github.com/sreejabethu/forecasting-weather

api matplotlib openweathermap-api plotly-python python random-forest regression-analysis visualization weather-forecast

Last synced: 24 days ago
JSON representation

Weather Forecasting using OpenWeatherMap API and Random Forest Regressor in Python. Converts temperature data to Fahrenheit, and provides visualizations for actual vs predicted temperatures.

Awesome Lists containing this project

README

          

# Forecasting-Weather
This project leverages the OpenWeatherMap API and machine-learning techniques to forecast weather temperatures. The project uses historical weather data to train a Random Forest Regressor model, which predicts future temperatures. The forecasted temperatures are converted to Fahrenheit for ease of understanding. The project also provides visualizations to compare actual vs predicted temperatures, allowing for model evaluation and improvement.

## Table of Contents

- [Features](#features)

- [Installation](#installation)

- [Project Structure](#project-structure)

- [License](#license)

### Features

**Weather Data Retrieval:** Retrieves historical weather data from the OpenWeatherMap API.

**Temperature Conversion:** Converts temperature data from Celsius to Fahrenheit for ease of understanding.

**Random Forest Regressor:** Trains a Random Forest Regressor model on historical weather data to predict future temperatures.

**Visualization:** Provides visualizations to compare actual vs predicted temperatures, allowing for model evaluation and improvement.

![2024-07-13](https://github.com/user-attachments/assets/8dd66533-e767-4d52-8578-20bebf21392e)

## Installation
Prerequisites
Python 3.x
Pip (Python package installer)
Libraries

**You will need the following Python libraries:**
requests
pandas
numpy
scikit-learn
matplotlib

## Project Structure

**data**: Contains the historical weather data retrieved from the OpenWeatherMap API
**models**: Holds the trained Random Forest Regressor model
**src**: Contains the source code for the weather forecasting system
**utils**: Holds utility functions for data preprocessing, feature engineering, and visualization
**visualizations**: Contains the visualizations comparing actual vs predicted temperatures

You can install these libraries using pip: **pip install requests pandas numpy scikit-learn matplotlib**

## Run the script
You can run the script from the command line or terminal: python weather_forecast.py

## Set up your environment
Make sure you have Python installed on your machine. You can download it from **python.org**.

- Get your OpenWeatherMap API key
- Sign up at OpenWeatherMap to get a free API key.
- Update the script
- Open the weather_forecast.py file and replace 'your_api_key' and 'your_city' with your actual OpenWeatherMap API key and city name.

## License