# shahedr/data-quality-detective architecture

> Architecture diagram of the GitHub repository shahedr/data-quality-detective, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shahedr/data-quality-detective
- Repository: https://github.com/shahedr/data-quality-detective

## Overview

Data Quality Detective is a small command-line profiler for CSV and Excel files. An analyst selects a file and, for Excel, a sheet; the CLI loads it, profiles dataset and column quality, then writes a report for review. Profiling includes missing and constant columns, duplicates, mixed numeric/text values, invalid date-like values, and numeric outliers. Reports can be Markdown, HTML, or JSON. The graph follows the sampled CLI and module calls; report-format capabilities are also documented in the README.

Main entry points: [`dqdetect/cli.py`](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/cli.py) (Command-line workflow), [`dqdetect/profiler.py`](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/profiler.py) (Dataset profiler), [`dqdetect/io.py`](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/io.py) (File loader), [`dqdetect/report.py`](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/report.py) (Report generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input"]
  node_cli["Command-line workflow<br/>[cli.py]"]
  node_loader["File loader<br/>[io.py]"]
end

subgraph group_analysis["Profiling"]
  node_profiler["Dataset profiler<br/>[profiler.py]"]
  node_checks["Quality checks<br/>[checks.py]"]
end

subgraph group_reporting["Reporting"]
  node_reporter["Report generation<br/>[report.py]"]
  node_report_files["Markdown, HTML, JSON"]
end

node_analyst(("Analyst"))
node_source_file["CSV or Excel"]

node_analyst -->|"runs command"| node_cli
node_source_file -->|"selects input"| node_cli
node_cli -->|"loads file"| node_loader
node_loader -->|"returns data"| node_cli
node_cli -->|"profiles data"| node_profiler
node_profiler -->|"runs checks"| node_checks
node_profiler -->|"returns profile"| node_cli
node_cli -->|"writes reports"| node_reporter
node_reporter -->|"writes formats"| node_report_files

click node_cli "https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/cli.py"
click node_loader "https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/io.py"
click node_profiler "https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/profiler.py"
click node_checks "https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/checks.py"
click node_reporter "https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/report.py"

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_cli,node_loader toneBlue
class node_profiler,node_checks toneAmber
class node_reporter,node_report_files toneMint
class node_analyst,node_source_file toneIndigo
```

## Components

### Input

- [Command-line workflow](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/cli.py): `dqdetect/cli.py`
- [File loader](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/io.py): `dqdetect/io.py`

### Profiling

- [Dataset profiler](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/profiler.py): `dqdetect/profiler.py`
- [Quality checks](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/checks.py): `dqdetect/checks.py`

### Reporting

- [Report generation](https://github.com/shahedr/data-quality-detective/blob/main/dqdetect/report.py): `dqdetect/report.py`
- **Markdown, HTML, JSON**

### Other components

- **Analyst**
- **CSV or Excel**

## Connections

- Analyst → Command-line workflow: runs command (evidence: `README.md`)
- CSV or Excel → Command-line workflow: selects input (evidence: `README.md`)
- Command-line workflow → File loader: loads file (evidence: `dqdetect/cli.py`)
- File loader → Command-line workflow: returns data (evidence: `dqdetect/cli.py`)
- Command-line workflow → Dataset profiler: profiles data (evidence: `dqdetect/cli.py`)
- Dataset profiler → Quality checks: runs checks (evidence: `dqdetect/profiler.py`)
- Dataset profiler → Command-line workflow: returns profile (evidence: `dqdetect/cli.py`)
- Command-line workflow → Report generation: writes reports (evidence: `dqdetect/cli.py`)
- Report generation → Markdown, HTML, JSON: writes formats (evidence: `dqdetect/report.py`)
