{"id":19297351,"url":"https://github.com/mart-dore/datascience-portfolio","last_synced_at":"2026-02-02T10:39:21.799Z","repository":{"id":261092918,"uuid":"881477148","full_name":"mart-dore/datascience-portfolio","owner":"mart-dore","description":"Complete data science analysis  + API deployemeny of 'MPG car' dataset","archived":false,"fork":false,"pushed_at":"2024-11-12T16:56:25.000Z","size":1067,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T10:51:46.419Z","etag":null,"topics":["api","dataanalysis","datascience","flask","machinelearning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mart-dore.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-10-31T16:44:42.000Z","updated_at":"2024-11-12T16:56:28.000Z","dependencies_parsed_at":"2024-11-04T17:31:41.508Z","dependency_job_id":"908eadee-73c3-47a7-a221-64746677f97a","html_url":"https://github.com/mart-dore/datascience-portfolio","commit_stats":null,"previous_names":["mart-dore/datascience-portfolio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mart-dore/datascience-portfolio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mart-dore%2Fdatascience-portfolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mart-dore%2Fdatascience-portfolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mart-dore%2Fdatascience-portfolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mart-dore%2Fdatascience-portfolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mart-dore","download_url":"https://codeload.github.com/mart-dore/datascience-portfolio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mart-dore%2Fdatascience-portfolio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29010514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: 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","dataanalysis","datascience","flask","machinelearning"],"created_at":"2024-11-09T23:02:40.704Z","updated_at":"2026-02-02T10:39:21.782Z","avatar_url":"https://github.com/mart-dore.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPG Car Dataset API\n\n## Overview\nThis project is a Flask-based web application that serves predictions for miles per gallon (MPG) based on various car features using a machine learning model. The application allows users to input specific characteristics of a car and receive an estimated MPG value.\n\n\u003cimg src=\"img/overview.png\" width=\"300\"\u003e\n\n## Workflow Notebook\n\nThe `workflow.ipynb` file serves as the core of our project by presenting the entire decision-making process from a data science perspective. This notebook covers all essential steps, including data importation, cleaning and preprocessing, data analysis, visualization, and the application of machine learning techniques. Furthermore, it details the model training process and the saving of a pipeline, ensuring reproducibility and efficiency in the model deployment. This integrated workflow guarantees that all steps are correctly executed and documented for clear understanding and future enhancement of the project.\n\n## Dataset\nThe dataset used for training the model is the `mpgcar` dataset, which contains various features of cars, including:\n- `cylinders`: Number of cylinders in the car\n- `displacement`: Engine displacement\n- `horsepower`: Engine horsepower\n- `weight`: Weight of the car\n- `acceleration`: Acceleration of the car\n- `model year`: Year of the car model\n- `origin` : country of origin (1: USA, 2 : Europe, 3 : Asia(Japan))\n\n## Installation\n\n### Prerequisites\nMake sure you have Python installed (preferably Python 3.7 or later). You will also need `pip` for managing Python packages.\n\n### Clone the Repository\n```bash\ngit clone https://github.com/mart-dore/datascience-portfolio\ncd datascience-portfolio\n```\n\n### Install Required Packages\nYou can install the necessary packages using the following command:\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### Running the Application\n1. Make sure your trained model is saved as `model.pkl` in the project directory.\n2. Start the Flask application:\n   ```bash\n   python app.py\n   ```\n3. Open your web browser and go to `http://127.0.0.1:5000` to access the application.\n\n### Making Predictions\n- Fill in the form with the car features.\n- Click the \"Predict\" button to receive the estimated MPG.\n\n### API Endpoint\nThe application also provides an API endpoint for making predictions directly via JSON.\n\n#### Predict API\n- **URL**: `/predict_api`\n- **Method**: `POST`\n- **Request Format**: JSON\n- **Example Request**:\n  ```json\n  {\n      \"cylinders\": 4,\n      \"displacement\": 120,\n      \"horsepower\": 95,\n      \"weight\": 2500,\n      \"acceleration\": 15,\n      \"model year\": 76,\n      \"origin_Asia\": 0,\n      \"origin_Europe\": 1,\n      \"origin_USA\": 0\n  }\n  ```\n- **Response Format**: JSON\n- **Example Response**:\n  ```json\n  {\n      \"prediction\": 24.5\n  }\n  ```\n\n## Future Improvements\n - Optimize web app (Errors, styles...)\n - Optimize Machine Learning Model (fine tuning, choice of model, hyperparameters)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmart-dore%2Fdatascience-portfolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmart-dore%2Fdatascience-portfolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmart-dore%2Fdatascience-portfolio/lists"}