# lucasclx/previsao-status-sadipem architecture

> Architecture diagram of the GitHub repository lucasclx/previsao-status-sadipem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lucasclx/previsao-status-sadipem
- Repository: https://github.com/lucasclx/previsao-status-sadipem

## Overview

#### Purpose and execution model
This is a notebook-driven Python machine-learning study that predicts the status of administrative processes in the Sadipem system. Its primary entry point is `previsao_status_sadipem.ipynb`; there is no application service, API, package layout, or deployment runtime in the repository.

#### Source data boundary
Raw process records are supplied as CSV exports:
- `SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv`
- `SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv`

These files form the external-data boundary. The README identifies the November export as the training/evaluation source; the second batch likely supports a separate snapshot or comparison, but its precise role must be verified in the notebook.

#### Data preparation and feature construction
The notebook owns the end-to-end transformation pipeline: loading tabular CSV data, cleaning records, handling missing values, and deriving model features. Intermediate curated data is represented by:
- `dados_em_analise.csv`
- `dados_em_analise_com_previsoes.csv`

The former is the likely analysis-ready dataset, while the latter is the likely enriched output containing model predictions.

#### Exploratory analysis stage
Exploratory data analysis is performed within `previsao_status_sadipem.ipynb`, using visualizations and correlation/pattern analysis before or alongside modeling. This stage is tightly coupled to the prepared dataset rather than separated into reusable modules.

#### Modeling and evaluation stage
`previsao_status_sadipem.ipynb` trains and validates scikit-learn-style predictive models for process status. The stated evaluation boundary includes accuracy, precision, and recall. Model artifacts are not present in the tree, so trained models appear to be ephemeral notebook state rather than versioned or serialized deliverables.

#### Prediction output flow
The expected primary flow is: Sadipem CSV batch → notebook preprocessing/features → model training/validation → status predictions → exported enriched CSV. `dados_em_analise_com_previsoes.csv` is the material output available for downstream review or prioritization.

#### Runtime and dependencies
The intended runtime is Python 3.8+ in Jupyter, with Pandas and NumPy for tabular processing, Matplotlib for analysis, and scikit-learn/SciPy for modeling. No cloud infrastructure, database, message queue, authenticated external API, or production orchestration is represented in the repository.

Main entry points: [`previsao_status_sadipem.ipynb`](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb) (Preparation and features), [`dados_em_analise.csv`](https://github.com/lucasclx/previsao-status-sadipem/blob/main/dados_em_analise.csv) (Analysis-ready data), [`SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv`](https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv) (November Sadipem batch), [`SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv`](https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv) (December Sadipem batch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data Files"]
  node_raw_nov["November Sadipem batch<br/>raw CSV"]
  node_raw_dec["December Sadipem batch<br/>raw CSV"]
  node_analysis_data["Analysis-ready data<br/>curated CSV"]
  node_enriched_data["Data with predictions<br/>enriched CSV"]
end

subgraph group_notebook["Notebook Workflow"]
  node_notebook_entry["Prediction notebook<br/>Jupyter entry point"]
  node_preparation["Preparation and features<br/>notebook stage"]
  node_eda["Exploratory analysis<br/>notebook stage"]
  node_modeling["Model training and validation<br/>scikit-learn stage"]
  node_metrics["Evaluation metrics<br/>model evaluation"]
  node_predictions["Status predictions<br/>notebook output"]
end

node_python_jupyter{{"Python/Jupyter runtime<br/>execution environment"}}
node_ml_stack["Data science libraries<br/>runtime dependencies"]

node_python_jupyter -->|"executes"| node_notebook_entry
node_ml_stack -->|"supports"| node_notebook_entry
node_raw_nov -->|"loads"| node_preparation
node_raw_dec -.->|"loads if used"| node_preparation
node_notebook_entry -->|"runs"| node_preparation
node_preparation -->|"writes"| node_analysis_data
node_analysis_data -->|"analyzes"| node_eda
node_analysis_data -->|"trains and validates on"| node_modeling
node_modeling -->|"reports"| node_metrics
node_modeling -->|"generates"| node_predictions
node_predictions -->|"exports"| node_enriched_data

click node_raw_nov "https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv"
click node_raw_dec "https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv"
click node_notebook_entry "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_preparation "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_analysis_data "https://github.com/lucasclx/previsao-status-sadipem/blob/main/dados_em_analise.csv"
click node_eda "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_modeling "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_metrics "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_predictions "https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb"
click node_enriched_data "https://github.com/lucasclx/previsao-status-sadipem/blob/main/dados_em_analise_com_previsoes.csv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_raw_nov,node_raw_dec,node_analysis_data,node_enriched_data toneBlue
class node_notebook_entry,node_preparation,node_eda,node_modeling,node_metrics,node_predictions toneAmber
class node_python_jupyter,node_ml_stack toneNeutral
```

## Components

### Data Files

CSV inputs and notebook-produced datasets.

- [November Sadipem batch](https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv): raw CSV · Training and evaluation source. · `SADIPEMCONSULTAPUBLICAGERALBATCH11112024.csv`
- [December Sadipem batch](https://github.com/lucasclx/previsao-status-sadipem/blob/main/SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv): raw CSV · Separate snapshot or comparison input. · `SADIPEMCONSULTAPUBLICAGERALBATCH05122024.csv`
- [Analysis-ready data](https://github.com/lucasclx/previsao-status-sadipem/blob/main/dados_em_analise.csv): curated CSV · Prepared dataset used for analysis and modeling. · `dados_em_analise.csv`
- [Data with predictions](https://github.com/lucasclx/previsao-status-sadipem/blob/main/dados_em_analise_com_previsoes.csv): enriched CSV · Downstream review and prioritization output. · `dados_em_analise_com_previsoes.csv`

### Notebook Workflow

All analysis and modeling run in one Jupyter notebook.

- [Prediction notebook](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): Jupyter entry point · Owns the end-to-end study workflow. · `previsao_status_sadipem.ipynb`
- [Preparation and features](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): notebook stage · Cleans records, handles missing values, and derives features. · `previsao_status_sadipem.ipynb`
- [Exploratory analysis](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): notebook stage · Visualizes distributions, correlations, and patterns. · `previsao_status_sadipem.ipynb`
- [Model training and validation](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): scikit-learn stage · Trains status predictors in ephemeral notebook state. · `previsao_status_sadipem.ipynb`
- [Evaluation metrics](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): model evaluation · Accuracy, precision, and recall. · `previsao_status_sadipem.ipynb`
- [Status predictions](https://github.com/lucasclx/previsao-status-sadipem/blob/main/previsao_status_sadipem.ipynb): notebook output · Predicted process statuses. · `previsao_status_sadipem.ipynb`

### Other components

- **Python/Jupyter runtime**: execution environment · Python 3.8+ notebook runtime.
- **Data science libraries**: runtime dependencies · Pandas, NumPy, Matplotlib, scikit-learn, and SciPy.

## Connections

- Python/Jupyter runtime → Prediction notebook: executes
- Data science libraries → Prediction notebook: supports
- November Sadipem batch → Preparation and features: loads
- December Sadipem batch → Preparation and features: loads if used · Its precise notebook role requires verification.
- Prediction notebook → Preparation and features: runs
- Preparation and features → Analysis-ready data: writes
- Analysis-ready data → Exploratory analysis: analyzes
- Analysis-ready data → Model training and validation: trains and validates on
- Model training and validation → Evaluation metrics: reports
- Model training and validation → Status predictions: generates
- Status predictions → Data with predictions: exports
