{"id":51230866,"url":"https://github.com/cnoret/getaround-pricing","last_synced_at":"2026-06-28T16:01:35.030Z","repository":{"id":304708526,"uuid":"1019674278","full_name":"cnoret/getaround-pricing","owner":"cnoret","description":"Predict optimal rental prices and analyze delay patterns on Getaround. FastAPI prediction API + Streamlit dashboard, fully Dockerized with MLflow tracking.","archived":false,"fork":false,"pushed_at":"2026-06-16T15:18:38.000Z","size":6516,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T16:05:07.864Z","etag":null,"topics":["data-science","docker","fastapi","getaround","machinelearning","mlflow","mlops","price-prediction","python","scikit-learn","streamlit"],"latest_commit_sha":null,"homepage":"https://cnoret-getaround-dashboard.hf.space/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnoret.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-14T17:34:48.000Z","updated_at":"2026-06-16T15:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c45b9c2-9e61-451a-a2ef-2e3ea421f01c","html_url":"https://github.com/cnoret/getaround-pricing","commit_stats":null,"previous_names":["cnoret/getaround-ml-dashboard-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cnoret/getaround-pricing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnoret%2Fgetaround-pricing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnoret%2Fgetaround-pricing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnoret%2Fgetaround-pricing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnoret%2Fgetaround-pricing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnoret","download_url":"https://codeload.github.com/cnoret/getaround-pricing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnoret%2Fgetaround-pricing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34894560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-science","docker","fastapi","getaround","machinelearning","mlflow","mlops","price-prediction","python","scikit-learn","streamlit"],"created_at":"2026-06-28T16:01:34.038Z","updated_at":"2026-06-28T16:01:35.016Z","avatar_url":"https://github.com/cnoret.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getaround — Price Prediction Dashboard \u0026 API\n\n[![Live Dashboard](https://img.shields.io/badge/Live%20Dashboard-Open-FF4B4B?style=flat\u0026logo=streamlit\u0026logoColor=white)](https://cnoret-getaround-dashboard.hf.space/)\n[![Live API](https://img.shields.io/badge/Live%20API-Open-009688?style=flat\u0026logo=fastapi\u0026logoColor=white)](https://cnoret-getaround-API.hf.space/)\n[![CI](https://github.com/cnoret/getaround-pricing/actions/workflows/ci.yml/badge.svg)](https://github.com/cnoret/getaround-pricing/actions/workflows/ci.yml)\n![Python](https://img.shields.io/badge/Python-3.10-3776AB?logo=python\u0026logoColor=white)\n![Scikit-Learn](https://img.shields.io/badge/Scikit--Learn-ML-F7931E?logo=scikit-learn\u0026logoColor=white)\n![License](https://img.shields.io/badge/License-MIT-green)\n\nEnd-to-end ML project on Getaround car rental data - a price prediction API, an interactive analytics dashboard, and a full training pipeline with MLflow experiment tracking.\n\n**Datasets:** pricing (~4,800 car listings · 13 features) · delay analysis (rental records with checkout times and consecutive booking gaps)\n\n![Getaround Dashboard](dashboard_preview.png)\n\n---\n\n## Features\n\n### Delay Analysis\n\n- Interactive histogram of checkout delays with sentinel-value filtering (126 min encoding for \u003e2h delays)\n- Adjustable buffer threshold to simulate minimum time between consecutive rentals\n- Business impact metrics: revenue at risk, blocked rentals, conflict resolution rate\n- Delay breakdown by check-in type (Connect vs. mobile) with box plots\n\n### Pricing Analysis\n\n- Dataset KPIs: car count, average price, average mileage, average engine power\n- Distribution charts for mileage and daily rental price\n- Scatter plot: rental price vs. mileage colored by fuel type\n- Average price by car type and by fuel type\n\n### Price Prediction\n\n- Form wired live to the FastAPI `/predict` endpoint\n- Instant price estimate with delta vs. platform average\n- Model metrics (MAE, RMSE, R²) in an expandable section\n\n### Prediction API\n\n- `POST /predict`: accepts one or multiple cars, returns predicted daily prices in euros\n- `GET /health`: health check endpoint\n- Pydantic v2 validation: field constraints + `Literal` types for all categoricals\n- Interactive Swagger UI at `/docs`\n\n---\n\n## Tech Stack\n\n| Layer              | Libraries                                                                 |\n|--------------------|---------------------------------------------------------------------------|\n| Data               | Pandas                                                                    |\n| ML                 | Scikit-Learn (RandomForest, Pipeline, ColumnTransformer) · Joblib         |\n| Experiment tracking| MLflow                                                                    |\n| API                | FastAPI · Pydantic v2 · Uvicorn                                           |\n| Dashboard          | Streamlit · Plotly                                                        |\n| Infra              | Docker · Docker Compose                                                   |\n| CI                 | GitHub Actions                                                            |\n| Deployment         | Hugging Face Spaces                                                       |\n\n---\n\n## Quick Start\n\n```bash\ndocker compose up --build\n```\n\n| Service          | URL                                               |\n|------------------|---------------------------------------------------|\n| Dashboard        | [localhost:8501](http://localhost:8501)           |\n| API + Swagger UI | [localhost:8001/docs](http://localhost:8001/docs) |\n| MLflow UI        | [localhost:5001](http://localhost:5001)           |\n\nDocker Compose trains the model first (`condition: service_completed_successfully`), then starts the API and dashboard. Inter-service communication uses the `API_URL` environment variable.\n\n### Run locally without Docker\n\n```bash\ngit clone https://github.com/cnoret/getaround-pricing.git\ncd getaround-pricing\npip install -r api/requirements.txt -r dashboard/requirements.txt\n\n# Terminal 1 — API\nuvicorn api.main:app --reload --port 8001\n\n# Terminal 2 — Dashboard\nstreamlit run dashboard/app.py --server.port=8501\n```\n\n---\n\n## Project Structure\n\n```text\n.\n├── api/                   # FastAPI prediction API\n│   ├── main.py\n│   ├── requirements.txt\n│   └── tests/\n│       └── test_api.py\n├── dashboard/             # Streamlit dashboard\n│   ├── app.py\n│   └── requirements.txt\n├── data/                  # Raw datasets\n│   ├── get_around_delay_analysis.csv\n│   └── get_around_pricing_project.csv\n├── ml/                    # Model training\n│   ├── model/\n│   │   └── model.joblib\n│   ├── model_training.py\n│   └── requirements.txt\n├── notebooks/             # Exploratory Data Analysis\n│   ├── eda_delay.ipynb\n│   └── eda_pricing.ipynb\n├── .github/workflows/     # CI\n│   └── ci.yml\n├── Dockerfile.fastapi\n├── Dockerfile.dashboard\n├── Dockerfile.training\n└── docker-compose.yml\n```\n\n---\n\n## Notebooks\n\n| Notebook                                         | Description                                                      |\n|--------------------------------------------------|------------------------------------------------------------------|\n| [eda_delay.ipynb](notebooks/eda_delay.ipynb)     | Delay distribution, sentinel value analysis, conflict simulation |\n| [eda_pricing.ipynb](notebooks/eda_pricing.ipynb) | Pricing EDA, feature correlations, model selection rationale     |\n\n---\n\n## Results\n\n| Metric | Value   |\n|--------|---------|\n| MAE    | 10.68 € |\n| RMSE   | 16.73 € |\n| R²     | 0.734   |\n\nRandom Forest with StandardScaler on numeric features (mileage, engine power) and OneHotEncoder on categoricals (brand, fuel, color, car type), evaluated on a 20% holdout set (random_state=42). Key predictors: engine power, car type, and model brand.\n\n---\n\n## Tests\n\n```bash\npip install -r api/requirements.txt pytest httpx\npytest api/tests/ -v\n```\n\n11 tests covering `/health`, `/`, and `/predict`, including Pydantic validation errors (negative mileage, invalid fuel, missing fields). Model is mocked, no `.joblib` required. Also runs on every push via GitHub Actions.\n\n---\n\n## Retrain\n\n```bash\npip install -r ml/requirements.txt\npython ml/model_training.py\n```\n\nMetrics and artifacts are tracked in MLflow (`./mlruns`).\n\n---\n\n## License\n\nMIT — [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnoret%2Fgetaround-pricing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnoret%2Fgetaround-pricing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnoret%2Fgetaround-pricing/lists"}