Skip to content

osman-haider/Globle-Temperature

Repository files navigation

Global Temperature Prediction Project

This repository contains a project that predicts global temperatures based on latitude, longitude, year, month, day, latitude direction (north or south), and longitude direction (east or west) using a Logistic Regression model. The project includes data exploration, feature engineering, and a web application for temperature prediction.

Table of Contents

Dataset

The dataset used in this project can be found on Kaggle: Global Temperature Dataset. The dataset provides historical temperature data for major cities.

Project Structure

- data/
  - GlobalLandTemperaturesByMajorCity.csv
- notebooks/
  - EDA.ipynb
  - FeatureEngineering.ipynb
- src/
  - model.py
  - app.py
- requirements.txt
- README.md
  • data/: Contains the dataset used in the project.
  • notebooks/: Jupyter notebooks for data exploration and feature engineering.
  • src/: Source code for the model and web application.
  • requirements.txt: A list of Python dependencies required for the project.

Getting Started

To run this project locally, follow these steps:

  1. Clone this repository to your local machine.
  2. Install the required dependencies listed in requirements.txt using pip install -r requirements.txt.

Exploratory Data Analysis (EDA)

The EDA notebook (notebooks/EDA.ipynb) explores the dataset, visualizes key trends, and identifies patterns in the temperature data.

Feature Engineering

The Feature Engineering notebook (notebooks/FeatureEngineering.ipynb) outlines the process of selecting and creating relevant features for the temperature prediction model.

Model Training

The model for temperature prediction is implemented in src/model.py. It uses Logistic Regression for prediction. The choice of this model is based on its performance as indicated by the R2 score.

Web Application

A web application for temperature prediction is created using Streamlit and can be found in src/app.py. Users can input latitude, longitude, year, month, day, latitude direction (north or south), and longitude direction (east or west) to get a temperature prediction.

Deployment

The web application is deployed on back4app. You can access it here.

Usage

  1. Visit the deployed website: Global Temperature Prediction.
  2. Enter the required values (latitude, longitude, year, month, day, latitude direction, and longitude direction).
  3. Click the "Predict Temperature" button to get the temperature prediction.

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive messages.
  4. Push your changes to your fork.
  5. Create a pull request to the main branch of this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Feel free to customize this README to provide more specific details about your project, its goals, and any additional information you think would be helpful for users and contributors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages