Metadata-Version: 2.3
Name: tabra
Version: 0.1.0
Summary: Tabra is a Python toolkit for empirical research workflows, designed for data processing, model estimation, result export, and reproducible analysis.
Author: SongTan
Author-email: SongTan <sepinetam@gmail.com>
Requires-Dist: matplotlib>=3.10.8
Requires-Dist: numpy>=2.4.3
Requires-Dist: pandas>=3.0.1
Requires-Dist: scipy>=1.17.1
Requires-Dist: seaborn>=0.13.2
Requires-Dist: statsmodels>=0.14.6
Requires-Dist: psutil>=5.9.0 ; extra == 'all'
Requires-Python: >=3.11
Provides-Extra: all
Description-Content-Type: text/markdown

# Tabra
Tabra is a Python toolkit for empirical research workflows, designed for data processing, model estimation, result export, and reproducible analysis.

## Quickly Start

```bash
uv pip install git+https://github.com/sepinetam/tabra.git
```

```python
import pandas as pd

from tabra import load_data
from tabra.plot import PlotKind
from tabra.plot.template import AER


tab = load_data(pd.read_stata(
    "https://www.stata-press.com/data/r19/auto.dta",
    convert_categoricals=False,
    storage_options={"User-Agent": "Mozilla/5.0"}
))

tab.data.sum()
tab.data.gen("p__sq", "price ^ 2")

tab.plot.hist(
    "p__sq",
    bins=20,
    title="Price Distribution"
).save(".local/figs/demo_hist_of_price_square", formats=["png", "jpg"])

mix_figure = tab.plot.mix(
    [
        {PlotKind.scatter: {"x": "mpg", "y": "price"}},
        {PlotKind.lfitci: {"x": "mpg", "y": "price"}},
    ],
    title="Price vs. Mpg",
    xtitle="mpg",
    ytitle="price and price^2",
    template=AER
).show()

tab.reg("price", ["mpg", "weight"])
tab.plot.coefplot().save(".local/figs/demo_coefplot", formats=["pdf"])

tab.xtset("foreign")
tab.xtreg("price", ["mpg", "weight"], model="fe")

```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development workflow.

