Skip to content

This project provides valuable insights into the factors contributing to high Yelp ratings, helping restaurant owners understand what to focus on to improve their establishment's reputation and attract more customers.

Notifications You must be signed in to change notification settings

Prince07746/Renewable-Energy-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Renewable Energy Prediction

This project aims to predict renewable energy values over time using a linear regression model. The dataset contains information on renewable energy contributions in various countries.

dataset-cover

Table of Contents

Overview

This project uses a dataset that includes information about renewable energy contributions in different countries over time. The aim is to build a predictive model using linear regression to forecast future renewable energy values.

Dataset

The dataset contains the following columns:

  • LOCATION: Country code
  • INDICATOR: Energy type
  • SUBJECT: Subject category
  • MEASURE: Measurement unit
  • FREQUENCY: Data frequency
  • TIME: Year
  • Value: Energy value in KTOE
  • Flag Codes: Additional flags (not used in the model)

Here is a small part of the CSV:

"LOCATION","INDICATOR","SUBJECT","MEASURE","FREQUENCY","TIME","Value","Flag Codes"
"AUS","RENEWABLE","TOT","KTOE","A","1960",4436.932,
"AUS","RENEWABLE","TOT","KTOE","A","1961",4490.51,
"AUS","RENEWABLE","TOT","KTOE","A","1962",4407.097,

Understanding KTOE

  • KTOE: Kilotonnes of oil equivalent. It is a unit of energy that helps compare different forms of energy based on their energy content.
    • 1 TOE: 1 tonne of oil equivalent is the amount of energy released by burning one tonne of crude oil, approximately 42 gigajoules.
    • 1 KTOE: Kilotonnes of oil equivalent (1 KTOE = 1,000 tonnes of oil equivalent).

Primary Energy Supply

  • Primary Energy: The total energy available from natural resources before any transformation to other forms of energy like electricity or refined fuels.
  • Primary Energy Supply: The total amount of primary energy a country or region has available for use, including energy production plus imports, minus exports, and changes in stock.

Model Description

The model uses a linear regression algorithm to predict the renewable energy values. It preprocesses the data using SimpleImputer for missing values and OneHotEncoder for categorical features. PCA is used for dimensionality reduction and visualization.

Installation

  1. Clone the repository:
    git clone https://github.com/Prince07746/renewable-energy-prediction.git
    cd renewable-energy-prediction
  2. Create and activate a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages:
    pip install -r requirements.txt

Usage

  1. clone the repository
  2. Navigate into the repository cd Renewable_Energy_Predictions
  3. Ensure the dataset renewable_energy.csv is in the project directory.
  4. Run the script:
    python renewabePrediction.py
  5. The script will load the data, preprocess it, train a linear regression model, and make predictions.

Results

The script will output the following:

  • Prediction: Predicted values for the test set.
  • Train score: R² score of the model on the training set.
  • Test score: R² score of the model on the test set.
  • Plots: Scatter plot of the actual vs. predicted values over time, and PCA plot of the training data. data

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

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


About

This project provides valuable insights into the factors contributing to high Yelp ratings, helping restaurant owners understand what to focus on to improve their establishment's reputation and attract more customers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages