Metadata-Version: 2.4
Name: analyzedata
Version: 0.1.0
Summary: Automated Exploratory Data Analysis and reporting for pandas DataFrames.
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: seaborn
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"

# analyzedata

**Version**: 0.1.0

`analyzedata` is a lightweight, beginner-friendly Python package designed to automate the initial stages of Exploratory Data Analysis (EDA). With just a single function call, you can generate comprehensive profiling, statistical summaries, quality checks, and static HTML visual reports for your pandas DataFrames.

## What it does

When you pass a pandas DataFrame to `analyzedata`, it automatically performs a comprehensive suite of data analysis tasks, printing a detailed summary to the console, saving visualizations to disk, and compiling everything into an easy-to-read HTML report. 

## Features

The automated analysis pipeline includes:
- **Dataset Overview**: High-level summary including shape, column names, data types, missing values, and duplicate rows.
- **Column Profiling**: Automatic inference of column types (Numerical, Categorical, Boolean, Datetime).
- **Data Quality Assessment**: Checks for missing and inconsistent data.
- **Numerical Analysis**: Detailed descriptive statistics (mean, median, standard deviation, min, max) for numeric columns.
- **Categorical Analysis**: Frequency counts, mode calculations, and distribution for categorical columns.
- **Outlier Analysis**: Detection of statistical outliers in numeric columns.
- **Correlation Analysis**: Identification of linear relationships between numerical variables.
- **Visualizations**: Automatic generation of distribution and relationship plots.
- **HTML Report Generation**: A standalone HTML file containing the full textual analysis and embedded visualizations.

## Generated Plots

During the analysis, `analyzedata` automatically generates several informative plots:
- **Correlation Heatmap**: Visualizes the Pearson correlation coefficients between all numerical features.
- **Distribution Plots (Histograms & Boxplots)**: Show the spread, central tendency, and outliers for numerical variables.
- **Categorical Bar Charts**: Display the frequency of top categories for object/categorical columns.

By default, plots are saved as PNG images in the `examples/plots/` directory.

## HTML Report

After the console analysis is complete, an **HTML Report** is automatically generated (default path: `examples/report.html`). 
This report combines the textual analysis output and the generated PNG visualizations into a single, cohesive document. It's perfect for sharing initial findings with stakeholders or keeping a record of your data's initial state.

## Installation

You can install `analyzedata` from the local source directory. Navigate to the project root and install it using pip:

```bash
cd analyzedata
pip install .
```

## Requirements

- Python 3.x
- pandas
- numpy
- matplotlib
- seaborn

## Basic Usage

Using `analyzedata` is as simple as importing it and calling the `analyze()` function on your pandas DataFrame:

```python
import pandas as pd
import analyzedata as ad

# Load your dataset
df = pd.read_csv("your_dataset.csv")

# Run the automated analysis
ad.analyze(df)
```

## Example Workflow

Here is a complete example of generating dummy data and running an analysis:

```python
import pandas as pd
import numpy as np
import analyzedata as ad

# Create a sample dataframe
data = {
    'Age': [25, 30, 35, np.nan, 40, 120],
    'Salary': [50000, 60000, 75000, 80000, 90000, 250000],
    'Department': ['IT', 'HR', 'IT', 'Marketing', 'HR', 'IT'],
    'Is_Manager': [False, False, True, False, True, True]
}
df = pd.DataFrame(data)

# Analyze the dataframe
ad.analyze(df)

# Check the console for the summary, and open examples/report.html for the full report!
```

## Testing Instructions

`analyzedata` uses `pytest` for testing. To run the test suite:

1. Ensure `pytest` is installed in your environment (`pip install pytest`).
2. Run the tests from the root directory of the project:

```bash
python -m pytest
```

The test suite covers normal operations as well as edge cases like missing values, empty dataframes, and single-row dataframes.

## Project Structure

```text
analyzedata/
├── analyzedata/          # Core package source code
│   ├── __init__.py
│   ├── analysis.py       # Main orchestration logic
│   ├── categorical.py
│   ├── correlation.py
│   ├── numerical.py
│   ├── outliers.py
│   ├── quality.py
│   └── visualization.py  # Plotting logic
├── tests/                # Test suite
│   └── test_analysis.py  
├── examples/             # Examples, output plots, and reports
│   ├── plots/
│   ├── test.py           # Example script
│   └── report.html
├── .venv/                # Virtual environment (optional)
├── .gitignore            # Git ignore file
├── README.md             # Project documentation
└── pyproject.toml        # Package configuration
```
