# fbdesignpro/sweetviz architecture

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

- Interactive diagram: https://gitdiagram.com/fbdesignpro/sweetviz
- Repository: https://github.com/fbdesignpro/sweetviz

## Overview

Sweetviz is a Python exploratory-data-analysis library: users pass one or more pandas dataframes to analyze, compare, or compare within a dataset, optionally mark a target, then render a self-contained HTML or notebook report. The central report coordinates feature typing and per-feature summaries, target/comparison statistics, and pairwise associations; visualization and HTML rendering turn those results into a report. The graph retains documented capabilities, but some internal links are omitted where excerpts or the source index do not establish the caller. Only sampled source and README relationships are used as evidence.

Main entry points: [`sweetviz/dataframe_report.py`](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/dataframe_report.py) (Report coordinator), [`sweetviz/series_analyzer.py`](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer.py) (Feature analysis), [`sweetviz/sv_public.py`](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_public.py) (Public functions), [`sweetviz/sv_html.py`](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_html.py) (HTML renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_public["Public functions<br/>[sv_public.py]"]
  node_feature_config["Feature overrides<br/>[feature_config.py]"]
end

subgraph group_analysis["Data Analysis"]
  node_report["Report coordinator"]
  node_types["Feature data model<br/>[sv_types.py]"]
  node_type_detection["Type inference<br/>[type_detection.py]"]
  node_analyzer["Feature analysis<br/>[series_analyzer.py]"]
  node_numeric_analysis["Numeric summaries"]
  node_categorical_analysis["Categorical summaries"]
  node_text_analysis["Text summaries"]
  node_associations["Mixed-type associations<br/>[from_dython.py]"]
end

subgraph group_viz["Visualization"]
  node_association_graph["Association graph"]
  node_categorical_graph["Categorical charts<br/>[graph_cat.py]"]
  node_numeric_graph["Numeric charts<br/>[graph_numeric.py]"]
  node_graph_base["Graph rendering base<br/>[graph.py]"]
end

subgraph group_presentation["Report Presentation"]
  node_html_renderer["HTML renderer<br/>[sv_html.py]"]
  node_formatters["Display formatters"]
  node_templates["Report templates"]
end

node_user(("Analyst"))
node_html_report["HTML report"]
node_notebook["Notebook display"]
node_comet["Comet.ml"]

node_user -->|"calls"| node_public
node_public -->|"creates"| node_report
node_user -->|"configures"| node_feature_config
node_public -->|"accepts"| node_feature_config
node_report -->|"uses"| node_feature_config
node_report -->|"builds"| node_types
node_report -->|"infers types"| node_type_detection
node_report -->|"analyzes features"| node_analyzer
node_analyzer -->|"dispatches"| node_numeric_analysis
node_analyzer -->|"dispatches"| node_categorical_analysis
node_analyzer -->|"dispatches"| node_text_analysis
node_report -->|"computes associations"| node_associations
node_report -->|"requests graph"| node_association_graph
node_categorical_analysis -->|"builds charts"| node_categorical_graph
node_numeric_analysis -->|"builds charts"| node_numeric_graph
node_categorical_graph -->|"extends"| node_graph_base
node_numeric_graph -->|"extends"| node_graph_base
node_association_graph -->|"extends"| node_graph_base
node_report -->|"renders report"| node_html_renderer
node_html_renderer -->|"loads templates"| node_templates
node_html_renderer -->|"formats values"| node_formatters
node_report -->|"writes HTML"| node_html_report
node_report -->|"supports display"| node_notebook
node_report -.->|"logs to"| node_comet

click node_public "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_public.py"
click node_feature_config "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/feature_config.py"
click node_report "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/dataframe_report.py"
click node_types "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_types.py"
click node_type_detection "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/type_detection.py"
click node_analyzer "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer.py"
click node_numeric_analysis "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_numeric.py"
click node_categorical_analysis "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_cat.py"
click node_text_analysis "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_text.py"
click node_associations "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/from_dython.py"
click node_association_graph "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_associations.py"
click node_categorical_graph "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_cat.py"
click node_numeric_graph "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_numeric.py"
click node_graph_base "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph.py"
click node_html_renderer "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_html.py"
click node_formatters "https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_html_formatters.py"
click node_templates "https://github.com/fbdesignpro/sweetviz/tree/master/sweetviz/templates"

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_public,node_feature_config toneBlue
class node_report,node_types,node_type_detection,node_analyzer,node_numeric_analysis,node_categorical_analysis,node_text_analysis,node_associations toneAmber
class node_association_graph,node_categorical_graph,node_numeric_graph,node_graph_base toneMint
class node_html_renderer,node_formatters,node_templates toneRose
class node_user,node_html_report,node_notebook,node_comet toneIndigo
```

## Components

### Public API

- [Public functions](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_public.py): `sweetviz/sv_public.py`
- [Feature overrides](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/feature_config.py): `sweetviz/feature_config.py`

### Data Analysis

- [Report coordinator](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/dataframe_report.py): `sweetviz/dataframe_report.py`
- [Feature data model](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_types.py): `sweetviz/sv_types.py`
- [Type inference](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/type_detection.py): `sweetviz/type_detection.py`
- [Feature analysis](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer.py): `sweetviz/series_analyzer.py`
- [Numeric summaries](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_numeric.py): `sweetviz/series_analyzer_numeric.py`
- [Categorical summaries](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_cat.py): `sweetviz/series_analyzer_cat.py`
- [Text summaries](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/series_analyzer_text.py): `sweetviz/series_analyzer_text.py`
- [Mixed-type associations](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/from_dython.py): `sweetviz/from_dython.py`

### Visualization

- [Association graph](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_associations.py): `sweetviz/graph_associations.py`
- [Categorical charts](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_cat.py): `sweetviz/graph_cat.py`
- [Numeric charts](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph_numeric.py): `sweetviz/graph_numeric.py`
- [Graph rendering base](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/graph.py): `sweetviz/graph.py`

### Report Presentation

- [HTML renderer](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_html.py): `sweetviz/sv_html.py`
- [Display formatters](https://github.com/fbdesignpro/sweetviz/blob/master/sweetviz/sv_html_formatters.py): `sweetviz/sv_html_formatters.py`
- [Report templates](https://github.com/fbdesignpro/sweetviz/tree/master/sweetviz/templates): `sweetviz/templates`

### Other components

- **Analyst**
- **HTML report**
- **Notebook display**
- **Comet.ml**

## Connections

- Analyst → Public functions: calls (evidence: `README.md`)
- Public functions → Report coordinator: creates (evidence: `sweetviz/sv_public.py`)
- Analyst → Feature overrides: configures (evidence: `README.md`)
- Public functions → Feature overrides: accepts (evidence: `sweetviz/__init__.py`)
- Report coordinator → Feature overrides: uses (evidence: `sweetviz/dataframe_report.py`)
- Report coordinator → Feature data model: builds (evidence: `sweetviz/dataframe_report.py`)
- Report coordinator → Type inference: infers types
- Report coordinator → Feature analysis: analyzes features (evidence: `sweetviz/dataframe_report.py`)
- Feature analysis → Numeric summaries: dispatches (evidence: `sweetviz/series_analyzer.py`)
- Feature analysis → Categorical summaries: dispatches (evidence: `sweetviz/series_analyzer.py`)
- Feature analysis → Text summaries: dispatches (evidence: `sweetviz/series_analyzer.py`)
- Report coordinator → Mixed-type associations: computes associations (evidence: `sweetviz/dataframe_report.py`)
- Report coordinator → Association graph: requests graph (evidence: `sweetviz/dataframe_report.py`)
- Categorical summaries → Categorical charts: builds charts (evidence: `sweetviz/series_analyzer_cat.py`)
- Numeric summaries → Numeric charts: builds charts (evidence: `sweetviz/series_analyzer_numeric.py`)
- Categorical charts → Graph rendering base: extends (evidence: `sweetviz/graph_cat.py`)
- Numeric charts → Graph rendering base: extends (evidence: `sweetviz/graph_numeric.py`)
- Association graph → Graph rendering base: extends (evidence: `sweetviz/graph_associations.py`)
- Report coordinator → HTML renderer: renders report (evidence: `sweetviz/dataframe_report.py`)
- HTML renderer → Report templates: loads templates (evidence: `sweetviz/sv_html.py`)
- HTML renderer → Display formatters: formats values (evidence: `sweetviz/sv_html.py`)
- Report coordinator → HTML report: writes HTML (evidence: `README.md`)
- Report coordinator → Notebook display: supports display (evidence: `README.md`)
- Report coordinator → Comet.ml: logs to (evidence: `sweetviz/dataframe_report.py`)
