{"id":25092753,"url":"https://github.com/felipeclarindo/energy-predict-api","last_synced_at":"2026-04-13T10:30:58.642Z","repository":{"id":264106185,"uuid":"887448115","full_name":"felipeclarindo/energy-predict-api","owner":"felipeclarindo","description":"Api para realizar previsões sobre energia.","archived":false,"fork":false,"pushed_at":"2025-01-26T15:23:29.000Z","size":526,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T22:33:03.723Z","etag":null,"topics":["api","api-development","api-rest","flask","pandas","pickle","python","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipeclarindo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T19:02:25.000Z","updated_at":"2025-01-30T21:26:20.000Z","dependencies_parsed_at":"2025-01-26T16:23:33.459Z","dependency_job_id":"7d65a71c-83c5-463a-b573-e92c65cbfc08","html_url":"https://github.com/felipeclarindo/energy-predict-api","commit_stats":null,"previous_names":["felipeclarindo/energy-predict-api"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/felipeclarindo/energy-predict-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeclarindo%2Fenergy-predict-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeclarindo%2Fenergy-predict-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeclarindo%2Fenergy-predict-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeclarindo%2Fenergy-predict-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipeclarindo","download_url":"https://codeload.github.com/felipeclarindo/energy-predict-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeclarindo%2Fenergy-predict-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31748866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-development","api-rest","flask","pandas","pickle","python","scikit-learn"],"created_at":"2025-02-07T14:34:40.222Z","updated_at":"2026-04-13T10:30:58.613Z","avatar_url":"https://github.com/felipeclarindo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"🌍 [Leia em Português](README.pt-BR.md)\n\n# Energy Prediction API\n\nThis 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.\n\n## Tecnologias\n\n- `Python 3.x` - Language used.\n- `Flask` - Creation of api.\n- `scikit-learn` - Creation of the machine learning model.\n- `pickle` - Serialization of the model.\n- `pandas` - Data handling.\n\n## API Endpoints\n\n### `http://localhost:5000/api`\n\n#### Method: GET\n\n#### Description: Return base description of api.\n\n#### Response example:\n\n```json\n{\n  \"status\": \"API is running\",\n  \"description\": \"API para previsão de energia renovável\",\n  \"version\": \"1.0.0\",\n  \"creation_date\": \"2024-10-25\",\n  \"technologies\": [\"Python 3.x\", \"Flask\"],\n  \"endpoints\": {\n    \"/api/\": \"Informações sobre a API (GET)\",\n    \"/api/predict/\": \"Predição de energia renovável (POST)\"\n  }\n}\n```\n\n### `http://localhost:5000/api/predict`\n\n#### Method: POST\n\n#### Description: Receives data from energy sources and returns the forecast of total renewable energy.-\n\n#### Expected Parameters (via query string):\n\n- `year (int): Ano de referência. `\n- `hydroelectric_power (float): Consumo de energia hidrelétrica. `\n- `geothermal_energy (float): Consumo de energia geotérmica. `\n- `solar_energy (float): Consumo de energia solar. `\n- `wind_energy (float): Consumo de energia eólica. `\n- `biomass_energy (float): Consumo de energia de biomassa. `\n\n#### Example of Data Submission:\n\n```json\n{\n  \"year\": 2025,\n  \"hydroeletric_power\": 1500.5,\n  \"geothermal_energy\": 300.7,\n  \"solar_energy\": 800.0,\n  \"wind_energy\": 1200.4,\n  \"biomass_energy\": 600.3\n}\n```\n\n#### Response Example\n\n```json\n{\n  \"Year\": 2025,\n  \"Predicted Total Renewable Energy\": 4401.9\n}\n```\n\n# Steps for installing and running.\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/felipeclarindo/energy-predict-api.git\n```\n\n2. Enter directory:\n\n```bash\ncd energy-predict-api\n```\n\n3. Create Virtual Environment:\n\n```bash\npython -m venv .venv\n```\n\n4. Activate the Environment running `.bat` file: `.venv/Scripts/activate.bat`\n\n5. Install the dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n6. Rotate the jupyter cells from the file `src/transition_energy_model.ipynb`\n\n7. Run the api:\n\n```bash\npython src/api/api.py\n```\n\n8. Api will be available at:\n\n- `http://localhost:5000`\n\n## Contribution\n\nContributions are welcome! If you have suggestions for improvements, feel free to open an issue or submit a pull request.\n\n## Author\n\n**Felipe Clarindo**\n\n- [LinkedIn](https://www.linkedin.com/in/felipeclarindo)\n- [Instagram](https://www.instagram.com/lipethecoder)\n- [GitHub](https://github.com/felipeclarindo)\n\n## License\n\nThis project is licensed under the [GNU Affero License](https://www.gnu.org/licenses/agpl-3.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipeclarindo%2Fenergy-predict-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipeclarindo%2Fenergy-predict-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipeclarindo%2Fenergy-predict-api/lists"}