Metadata-Version: 2.4
Name: ElevenOne
Version: 0.1.0
Summary: The Python library for laboratory data processing and plotting
Author-email: Mario Sultan Romero <mariosultan.uem@gmail.com>
License: PolyForm Strict License 1.0.0.
Project-URL: Homepage, https://github.com/MarioSultan/ElevenOne
Project-URL: Documentation, https://elevenone.readthedocs.io/en/latest/
Project-URL: Issues, https://github.com/MarioSultan/ElevenOne/issues
Keywords: math,mathematics,physics,chemistry,laboratory,lab
Classifier: Topic :: Scientific/Engineering
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: matplotlib>=3.0.0
Requires-Dist: numpy>=1.20.0

# **ElevenOne**: *your perfect lab assistant*

![ElevenOne Logo](https://raw.githubusercontent.com/MarioSultan/ElevenOne/main/banner.png)

![Examples](https://raw.githubusercontent.com/MarioSultan/ElevenOne/main/imgs/examples.png)

ElevenOne is a Python library for seamless scientific unit management, rigorous laboratory data processing, and automated publication-ready plotting.

Some of the things ElevenOne can do include:
- Handling of physical units
- Automatic data loading with unit detection
- High-level scientific plotting and visualizations
- Automated publication-grade scientific reports ★

---

## Handling of physical units

ElevenOne features a complete internal system for handling physical units. Among the things it can do are the use and management of physical units, operations with them, and conversion between them.

```python
from elevenone import *

speed = 90 * km/h
print(speed.convert_to(m/s))
```
```text
>>> 25 m/s
```

ElevenOne has more than 60 different units to use in your project!

---

## Automatic Data Loading with Unit Detection

ElevenOne can load data directly from CSV or Excel files (`.csv`, `.xls`, `.xlsx`), automatically detecting physical units in column headers (e.g., `Time (s)`, `Pressure [kPa]`) or within data cells.

```python
from elevenone import load_data

# Load data automatically parsing units into Quantity objects
df = load_data("experiment_results.csv")

# Access columns directly; units are preserved and active
print(df["Time"])
print(df["Speed"].mean())
```

---

## High-Level Scientific Plotting

With `Data` objects, you can generate modern, publication-ready plots with built-in unit handling and automatic labeling:

```python
from elevenone import Data, s, m

# Create dataset with units
t = [1, 2, 3, 4, 5] * s
d = [2.1, 4.3, 5.9, 8.1, 10.2] * m

data = Data({"Time": t, "Distance": d})

# Generate line plot with automatic labels
fig, ax = data.plot(x="Time", y="Distance", title="Kinematic Trajectory")

# Scatter plot with linear fit
fig, ax = data.scatter(x="Time", y="Distance", fit=True, title="Linear Fit Analysis")
```

ElevenOne supports multiple visualization modes out of the box:
- `data.plot()`: Line plots with area fills.
- `data.scatter()`: Scatter plots with optional linear fit (`fit=True`).
- `data.errorbar()`: Uncertainty visualization (`xerr`, `yerr`).
- `data.hist()`: Distribution histograms.
- `data.boxplot()` & `data.violin()`: Outlier and density distribution plots.
- `data.residual_plot()`: Residual error analysis for fits.
- `data.pairplot()`: Pairwise correlation grid.
- `data.corr_heatmap()`: Pearson correlation heatmaps.

---

## Automated Scientific Reports

Generate full statistical and visual analytical reports with a single function call in **HTML** or **PDF** format.

```python
from elevenone import load_data, generate_report

# Load laboratory dataset
data = load_data("lab_measurements.xlsx")

# Generate complete HTML report
generate_report(data, output_path="report.html", title="Laboratory Experiment Analysis")

# Export as PDF (requires weasyprint or pdfkit)
generate_report(data, output_path="report.pdf", format_type="pdf")
```

The report automatically compiles dataset overview metrics, descriptive statistics, advanced indicators (skewness, kurtosis, IQR), correlation matrices, and distribution graphs without exposing raw data lines.
