Skip to main content

A one-line autonomous exploratory data analysis (EDA) and reporting library.

Project description

๐Ÿš€ tom-analytics โ€” One-Line Autonomous Data Analytics & EDA Library

PyPI Version License: MIT Supported OS: Windows / macOS / Linux Python: 3.8+

tom (published as tom-analytics) is a zero-configuration, single-line automated exploratory data analysis (EDA) and diagnostics engine. Designed for developers, data scientists, and analysts, it handles everything from automatic file loading to sophisticated statistical tests, interactive Plotly visualizations, and premium glassmorphism HTML reportsโ€”all from a single function call.


๐Ÿ—บ๏ธ How it Works (Under the Hood)

The library is designed to go from raw file to interactive, publication-ready report in one line. Here is the operational workflow:

graph TD
    A[Raw File / DataFrame] -->|om.file| B(Parser & Format Detector)
    B -->|Automatic Type Inference| C(Cleaner & Imputer)
    C -->|Auto-Impute / Drop Dups| D(Autonomous Stats Engine)
    D -->|Parametric & Non-Parametric Tests| E(Visual Suite Generator)
    E -->|Seaborn & Plotly Engines| F(Glassmorphic HTML Compiler)
    F -->|Self-Contained Report| G[report.html & plotly_dashboard.html]

โœจ Features & Capabilities

  • ๐Ÿ“‚ Universal File Parser (om.file): Delimiter-independent parser supporting CSV, TSV, JSON, Excel, and Parquet. Features interactive path prompt and string-matching path suggestions.
  • ๐Ÿงน Autonomous Preprocessing (om.clean_report): Intelligent type coercion (dates, numerical objects), median/mode missing value imputation, automatic column pruning (drops column with $>50%$ missing values), and duplicate row filtering.
  • ๐Ÿ“Š Multi-faceted Statistical Engine: Computes high-fidelity parametric/non-parametric metrics, Shapiro-Wilk normality tests (dynamically capped up to a 5k sample limit), Chi-Square tests for category associations, and ANOVA tests for continuous-categorical relationships.
  • ๐ŸŽจ Vibrant Visualizations Suite: High-res static plots (ECDF, Q-Q, violin, box plots, histograms, pairplots, missing value heatmaps) at 300 DPI alongside a fully interactive pan/zoom Plotly dashboard.
  • ๐Ÿ’ก NLP Insights Generation: Natural language insights identifying multicollinearity, high-cardinality, data skewness warnings, and non-normality logs.
  • ๐ŸชŸ Glassmorphic HTML Compiler: Renders a premium, self-contained, completely portable HTML dashboard (./tom_report/report.html) utilizing elegant card spacing, backdrop blurs, dark purple-to-blue gradients, and collapsible diagnostic panels.
  • ๐Ÿ–ฅ๏ธ Windows CP1252 Fixes Out-of-the-Box: Process-level sys.stdout and sys.stderr are automatically reconfigured to UTF-8 to prevent any Windows encoding crashes when displaying terminal emojis.

๐Ÿ› ๏ธ Installation

You can install the package directly from PyPI or locally in editable mode.

Option A: Install from PyPI (Recommended)

pip install tom-analytics

Option B: Local Developer Installation (Editable Mode)

  1. Clone your repository:
    git clone https://github.com/OmkarSugave/tom.git
    cd tom
    
  2. Activate your virtual environment and install:
    # Windows PowerShell
    .\venv\Scripts\Activate.ps1
    pip install -e .
    

๐Ÿš€ Quickstart & Essential API Reference

Import tom as om and unleash automated EDA immediately:

import tom as om

# 1. Load your dataset (automatically handles format & paths)
om.file("mock_data.csv")

# 2. Run the complete autonomous pipeline!
om.describe()

๐Ÿ“– Deep API Reference

1. File Loading & Parse: om.file(path=None)

Loads any tabular dataset. If no path is provided, it opens an interactive terminal dialogue.

# Direct path loading
om.file("dataset.parquet")

# Delimiter, type, and encoding detection are completely autonomous.
# If you make a typo, tom will suggest the nearest file name!

2. Auto-Cleaning: om.clean_report(df=None)

Runs and prints a detailed analysis of missing data, data types, duplicate rows, and imputed actions.

om.clean_report()

3. Outlier Analysis: om.outliers(df=None)

Runs an IQR-based boundary analysis across all numerical features, displaying lower/upper limits, min/max outliers, and percentages.

om.outliers()

4. Association & Correlation: om.correlation(df=None)

Calculates the Pearson correlation matrix for numerical features. Saves a publication-quality heatmap at ./tom_report/charts/single_correlation_heatmap.png and prints a formatted terminal table.

om.correlation()

5. Automated Machine Learning Guide: om.suggest(df=None)

Analyzes dataset dimensions, distribution, and types to recommend a classification or regression pipeline. Suggests the best-suited machine learning models (e.g., Random Forests, XGBoost, Ridge) and lists essential preprocessing rules.

om.suggest()

6. Side-by-Side Comparison: om.compare(df2, df1=None)

Compares two DataFrames (e.g., training vs. test, or original vs. cleaned) showing shapes, missing values, duplicates, and column overlaps.

import pandas as pd
df_test = pd.read_csv("test_dataset.csv")

om.compare(df_test)

7. Exporting Reports: om.export(format_type="pdf")

Exports your gorgeous glassmorphic HTML report into a standard PDF page.

om.export("pdf")

Note: PDF export utilizes pdfkit (requires wkhtmltopdf on your system path).


๐Ÿ“ Package Architecture & Directory Structures

The codebase is highly modularized, clean, and extensible:

tom/
โ”œโ”€โ”€ tom/
โ”‚   โ”œโ”€โ”€ __init__.py      # Global UTF-8 reconfiguration, state manager, and public API
โ”‚   โ”œโ”€โ”€ loader.py        # Autonomous format parses (CSV, TSV, Parquet, JSON, Excel)
โ”‚   โ”œโ”€โ”€ cleaner.py       # Imputers, duplicate drops, type inference engine
โ”‚   โ”œโ”€โ”€ stats.py         # Shapiro-Wilk, ANOVA, Chi-Square association engine
โ”‚   โ”œโ”€โ”€ charts.py        # 300 DPI Seaborn plots + base64 image compiler
โ”‚   โ”œโ”€โ”€ insights.py      # NLP-driven analytics alerts & warning rules
โ”‚   โ”œโ”€โ”€ reporter.py      # Glassmorphic HTML template builder & Plotly compiler
โ”‚   โ””โ”€โ”€ utils.py         # Directory checkers, path string metrics
โ”œโ”€โ”€ pyproject.toml       # Build metadata & dependency declarations
โ”œโ”€โ”€ requirements.txt     # Standard pip freeze
โ”œโ”€โ”€ README.md            # Comprehensive documentation (this file)
โ””โ”€โ”€ tom_report/          # Generated output folder (auto-excluded in .gitignore)
    โ”œโ”€โ”€ report.html      # Premium portable HTML report
    โ””โ”€โ”€ charts/
        โ””โ”€โ”€ plotly_dashboard.html  # Interactive pan & zoom dashboard

๐Ÿ”’ License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tom_analytics-0.1.1.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tom_analytics-0.1.1-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file tom_analytics-0.1.1.tar.gz.

File metadata

  • Download URL: tom_analytics-0.1.1.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tom_analytics-0.1.1.tar.gz
Algorithm Hash digest
SHA256 262721904e84d241a11f7720ef3bb7abeee24aff3215fda6119420b6880f7828
MD5 be2b4f182d63af97990f77d516d383c7
BLAKE2b-256 56aef590b2224e603487e308b65047a3ae6f98c8973fa1d0b0cab4d351339a02

See more details on using hashes here.

File details

Details for the file tom_analytics-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tom_analytics-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tom_analytics-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b31cb090618b0cca972650c970017622e622dc610509e10cd29cad8c2a36fbc5
MD5 4fa571c699ee3cdd0bd8dceb1092351d
BLAKE2b-256 3983ae774791f2ad0ae7505f0076a75becdc7d57faf3dedf92ac0ef46037cb74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page