# gabrielsmurillo/spacex-ibm_datascientist_capstone-project architecture

> Architecture diagram of the GitHub repository gabrielsmurillo/spacex-ibm_datascientist_capstone-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project
- Repository: https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project

## Overview

##### Project type and purpose
- This is a data-science/ML pipeline project with an interactive web dashboard.
- Purpose: Ingest SpaceX launch data, perform EDA and feature engineering, train and evaluate classification models, then expose results via a Plotly Dash app.

##### Main components
a. Data Ingestion
- External APIs (SpaceX REST API)
- Web scraping scripts (BeautifulSoup + requests)
- Local CSV / SQLite (spacex_launch_dash.csv, sqlite3)
b. Data Processing & Feature Store
- Jupyter notebooks for EDA, cleaning, feature engineering
- Intermediate data artifacts (cleaned CSV or SQLite tables)
c. Machine Learning
- Training notebooks (LogReg, SVM, Decision Tree, kNN)
- Hyperparameter tuning modules
- Model artifacts (pickled models or saved parameters)
- Evaluation metrics (accuracy, Jaccard, F1)
d. Dashboard Service
- spaceX_dash_app.py using Dash + Plotly
- Reads model predictions / data for visualization
- Dash server (Flask under the hood)
e. Reporting & Presentation
- LaTeX report (report/*.pdf)
- Presentation PDF (presentation/*.pdf)

##### Relationships & Data Flow
- From Processing → ML Training → Model Artifacts
- From Artifacts + Cleaned Data → Dashboard Service → End Users
- Reporting/PDF generation is a side flow drawing on processed data and evaluation results.

##### Architectural Patterns & Design Principles
- Pipeline pattern: clear stages (Ingest → Process → Train → Serve)
- Modular separation: notebooks/scripts each handle one concern
- Single-page interactive front end (Dash) communicating with a Python back end
- Reproducibility: static data artifacts (CSV/SQLite) and versioned notebooks

##### Technologies & Frameworks
- Python 3.8+, pandas, numpy, scikit-learn, BeautifulSoup, requests, sqlite3
- Jupyter for EDA and model development
- Dash & Plotly for the web UI
- LaTeX for the final report

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Layer
    subgraph "Data Layer"
        direction TB
        API["SpaceX REST API"]:::data
        WebScrape["Web Scraping Scripts"]:::data
        N1["jupyter-labs-spacex-data-collection-api.ipynb"]:::data
        N2["jupyter-labs-webscraping.ipynb"]:::data
        CSV["spacex_launch_dash.csv"]:::data
        SQLite["SQLite Database"]:::data
    end

    %% Processing Layer
    subgraph "Data Processing & Feature Store"
        direction TB
        EDA["EDA & Visualization\n(EDA_Visualization.ipynb)"]:::proc
        Wrangle["Data Wrangling\n(labs-jupyter-spacex-Data wrangling.ipynb)"]:::proc
        LocationFE["Launch Site Location Feature Engineering\n(lab_jupyter_launch_site_location.ipynb)"]:::proc
        SQL_EDA["SQL EDA Tables\n(jupyter-labs-eda-sql-coursera_sqllite.ipynb)"]:::proc
    end

    %% ML Training Layer
    subgraph "Machine Learning Training & Evaluation"
        direction TB
        Train["Classification & Tuning\n(Part_5.ipynb)"]:::proc
        ModelArtifacts["Model Artifacts\n(pickled models)"]:::proc
        Metrics["Evaluation Metrics\n(Accuracy, F1, Jaccard)"]:::proc
    end

    %% Serving Layer
    subgraph "Dashboard Service"
        direction TB
        DashApp["spaceX_dash_app.py\n(Dash + Plotly)"]:::ui
        Config["settings.json"]:::ui
        DocPDF["Interactive Dashboard Demo\n(Plotly Dash PDF)"]:::ui
    end

    %% Reporting Layer
    subgraph "Reporting & Presentation"
        direction TB
        ReportPDF1["Final LaTeX Report\n(final_capstone_datascience.pdf)"]:::report
        ReportPDF2["Additional Report\n(Rocket (1).pdf)"]:::report
        SlideDeck["Slide Deck\n(final_capstone_datascience (1).pdf)"]:::report
    end

    %% End User
    EndUser["End User Browser"]:::ui

    %% Relationships
    API --> N1
    WebScrape --> N2
    N1 --> CSV
    N2 --> CSV
    CSV --> EDA
    CSV --> Wrangle
    Wrangle --> LocationFE
    Wrangle --> SQL_EDA
    SQL_EDA --> Train
    EDA --> Train
    LocationFE --> Train
    Train --> ModelArtifacts
    ModelArtifacts --> DashApp
    CSV --> DashApp
    Metrics --> ReportPDF1
    ModelArtifacts --> Metrics
    EDA --> ReportPDF1
    ModelArtifacts --> ReportPDF2
    DashApp --> EndUser

    %% Click Events
    click N1 "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/jupyter-labs-spacex-data-collection-api.ipynb"
    click N2 "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/jupyter-labs-webscraping.ipynb"
    click CSV "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/spacex_launch_dash.csv"
    click EDA "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/EDA_Visualization.ipynb"
    click Wrangle "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/labs-jupyter-spacex-Data wrangling.ipynb"
    click LocationFE "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/lab_jupyter_launch_site_location.ipynb"
    click SQL_EDA "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/jupyter-labs-eda-sql-coursera_sqllite.ipynb"
    click Train "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/SpaceX_Machine Learning Prediction_Part_5 (1).ipynb"
    click DashApp "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/spacex_dash_app.py"
    click DocPDF "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/Interactive Dashboard with Ploty Dash.pdf"
    click Config "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/code/settings.json"
    click ReportPDF1 "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/report/final_capstone_datascience.pdf"
    click ReportPDF2 "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/report/Rocket (1).pdf"
    click SlideDeck "https://github.com/gabrielsmurillo/spacex-ibm_datascientist_capstone-project/blob/main/presentation/final_capstone_datascience (1).pdf"

    %% Styles
    classDef data fill:#bbdfff,stroke:#3399ff,color:#000;
    classDef proc fill:#bbffbb,stroke:#33cc33,color:#000;
    classDef ui fill:#ffcc99,stroke:#ff6600,color:#000;
    classDef report fill:#dddddd,stroke:#888888,color:#000;
```
