Skip to content

Latest commit

Β 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Bike Data Collector for Route Suitability Scoring

πŸ“Œ Overview

This project builds a clean, physics-safe dataset of motorcycle specifications that can be used for route suitability analysis and scoring.

Instead of asking users to manually enter bike specifications, the system allows them to select a bike model, after which all required technical parameters are automatically available for downstream algorithms.


🎯 Key Design Principles

  • Detail pages are authoritative β€” listing pages are not trusted for specs
  • No guessing β€” ambiguous values are discarded, not repaired
  • Unit-aware parsing β€” bhp/ps, Nm/kgm handled safely
  • Physics validation β€” impossible values are rejected
  • Completeness over quantity β€” missing data is better than wrong data

🏍️ What Data Is Collected

For each bike:

  • brand
  • model
  • engine_cc
  • power_bhp
  • torque_nm
  • kerb_weight_kg
  • mileage_kmpl
  • abs (if available)
  • detail_url

⚠️ Price is intentionally excluded because it is volatile, location-dependent, and irrelevant for route suitability.


πŸ—‚οΈ Project Structure

bike-data-collector/ β”‚ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ main.py # Pipeline entry point β”‚ β”œβ”€β”€ brands.py # Brand discovery β”‚ β”œβ”€β”€ scraper.py # Bike URL extraction β”‚ β”œβ”€β”€ parser.py # Listing-page parsing β”‚ β”œβ”€β”€ detail_parser.py # Detail-page spec discovery β”‚ β”œβ”€β”€ spec_parser.py # Unit-safe spec parsing & validation β”‚ β”œβ”€β”€ save.py # Output writer β”‚ β”œβ”€β”€ filter_complete_bikes.py # Filters fully-usable bikes β”‚ β”œβ”€β”€ config.py # Headers & config β”‚ β”œβ”€β”€ enrich_data.py # (optional / experimental) β”‚ └── normalize_data.py # (optional / experimental) β”‚ β”œβ”€β”€ output/ # Generated datasets (gitignored) β”œβ”€β”€ requirements.txt β”œβ”€β”€ README.md └── .gitignore


πŸš€ How to Run (Production-Grade)

1️⃣ Install dependencies

pip install -r requirements.txt
python src/main.py
This will:

scrape all brands and bikes

extract authoritative specs

save results to output/bikes.json
πŸ› οΈ Manual Bike Entry (Future Use)

The system is designed to support manual bike entry as an optional path.
Manual input is validated using the same physics rules as scraped data.

⚠️ Disclaimer

This project is intended for analysis and research purposes.
Specifications may vary by region, variant, and year.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages