SpaceX has transformed commercial spaceflight by making rockets partially reusable. The defining innovation of these rockets is that the first-stage booster can return and land vertically after launch, allowing it to be reused instead of discarded. The successful reusability dramatically lowers launch costs and enables an unprecedented launch frequency. Predicting first‑stage landing outcomes is essential for mission planning, cost modeling, and understanding the operational reliability of reusable rockets.
This project builds a full end-to-end data science project to predict whether the first stage will land successfully. The project covers the complete pipeline from raw data collection through to machine learning model deployment.
This project walks through:
├── DataCollection/
│ ├── DataCollection_API.ipynb
│ └── WebScraping.ipynb
├── EDA&DataWrangling/
│ ├── DataWrangling.ipynb
│ ├── EDAwithSQL.ipynb
│ └── Visualization.ipynb
├── InteractiveDashboard/
│ ├── Dashboard.ipynb
│ ├── app.py
│ ├── requirements.txt
│ └── spacex_launch_dash.csv
├── InteractiveFoliumMap/
│ └── Folium.ipynb
└── ML Prediction/
└── Prediction.ipynb
Launch data is gathered from two sources:
api.spacexdata.com/v4/launches/past and enriches ID fields (rocket, launchpad) by querying additional endpoints. Filters to Falcon 9 only and handles missing payload mass values.A Dash + Plotly dashboard for exploring launch outcomes by site, payload mass, and booster category.
To run locally:
pip install -r requirements.txt
python app.py
Interactive map analysis using Folium to explore how launch site location relates to outcomes. Measures distances from KSC LC-39A to surrounding infrastructure:
| Map | Description |
|---|---|
| map_marker.html | All launch sites with success (green) / failure (red) markers |
| map_coast.html | Distance to closest coastline (~6.41 km) |
| map_city.html | Distance to closest city (~16.31 km) |
| map_railway.html | Distance to closest railway (~6.03 km) |
Four classification models trained and evaluated using GridSearchCV with 10-fold cross-validation:
Models evaluated on accuracy score, confusion matrices, and comparative performance visualization.
View the full code on GitHub →
A successful land launch:
