This API is powered by a machine learning model that predicts total renewable energy based on data from different energy sources. The main objective is to help in the analysis of energy trends and promote sustainability through predictive insights.
Python 3.x
- Language used.Flask
- Creation of api.scikit-learn
- Creation of the machine learning model.pickle
- Serialization of the model.pandas
- Data handling.
{
"status": "API is running",
"description": "API para previsão de energia renovável",
"version": "1.0.0",
"creation_date": "2024-10-25",
"technologies": ["Python 3.x", "Flask"],
"endpoints": {
"/api/": "Informações sobre a API (GET)",
"/api/predict/": "Predição de energia renovável (POST)"
}
}
year (int): Ano de referência.
hydroelectric_power (float): Consumo de energia hidrelétrica.
geothermal_energy (float): Consumo de energia geotérmica.
solar_energy (float): Consumo de energia solar.
wind_energy (float): Consumo de energia eólica.
biomass_energy (float): Consumo de energia de biomassa.
{
"year": 2025,
"hydroeletric_power": 1500.5,
"geothermal_energy": 300.7,
"solar_energy": 800.0,
"wind_energy": 1200.4,
"biomass_energy": 600.3
}
{
"Year": 2025,
"Predicted Total Renewable Energy": 4401.9
}
- Clone the repository:
git clone https://github.com/felipeclarindo/energy-predict-api.git
- Enter directory:
cd energy-predict-api
- Create Virtual Environment:
python -m venv .venv
-
Activate the Environment running
.bat
file:.venv/Scripts/activate.bat
-
Install the dependencies:
pip install -r requirements.txt
-
Rotate the jupyter cells from the file
src/transition_energy_model.ipynb
-
Run the api:
python src/api/api.py
- Api will be available at:
http://localhost:5000
Contributions are welcome! If you have suggestions for improvements, feel free to open an issue or submit a pull request.
Felipe Clarindo
This project is licensed under the GNU Affero License.