Metadata-Version: 2.4
Name: lessPython
Version: 0.1.0
Summary: Python port of R's lessR: analytic-view visualizations, statistical models, and data utilities, rendered with plotly
Author-email: "David W. Gerbing" <gerbing@pdx.edu>
License-Expression: GPL-2.0-or-later
Project-URL: Homepage, https://pypi.org/project/lessPython/
Project-URL: Source (lessR), https://cran.r-project.org/package=lessR
Keywords: visualization,statistics,plotly,regression,anova,factor-analysis,data-analysis,lessR
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: plotly>=5.20
Requires-Dist: pandas>=2.0
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Requires-Dist: statsmodels>=0.14
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: kaleido; extra == "dev"
Dynamic: license-file

# lessPython

A Python port of [lessR](https://cran.r-project.org/package=lessR):
analytic-view visualizations, statistical models, correlation and
factor analysis, teaching simulations, and data utilities — the
graphics rendered with plotly.

Install as `lessPython`, import as `lessPy`:

```
pip install lessPython
```

```python
import lessPy as lp

d = lp.read_data("Employee")
lp.Chart("JobSat", data=d)                       # bar chart
lp.Chart("JobSat", by="Gender", data=d, form="pie")
lp.Regression("Salary ~ Years + Pre", data=d)
lp.simCLT(ns=10000, n=30, dist="uniform")
```

Variables are passed as **strings** naming columns of a pandas
`DataFrame` — Python has no equivalent of R's non-standard
evaluation, so `Chart("JobSat", data=d)`, not `Chart(JobSat)`.

## The API

The public API is **flat**: every function is reached from the
top-level package, either as `lp.<name>` or via
`from lessPy import <name>`. There are no sub-packages to import.

See **[docs/reference.md](docs/reference.md)** for the full list
of functions, grouped by category for navigation:

- **Plots** — `Chart`, `X`, `XY`, `Flows`
- **Models** — `Regression`, `Logit`, `ANOVA`, `ttest`,
  `Correlation`, `Prop_test`
- **Correlation / factor analysis** — `corEFA`, `corCFA`,
  `corScree`, `corReorder`, `corProp`, `corReflect`, `corRead`,
  `corPrint`
- **Simulations** — `simCLT`, `simMeans`, `simFlips`, `simCImean`
- **Data** — `read_data`, `datasets`, `reshape_long`,
  `reshape_wide`, `pivot`, `rename`
- **Color** — `getColors`, `showColors`
- **Dates** — `date_infer`, `format_date_labels`

The inferential functions print their analysis as in lessR and
also return a results object whose numeric fields and plotly
figures (in `.plots`) are available for programmatic use.

## Development install

```
conda activate lessPy
pip install -e ".[dev]"
pytest
python demo/demo_chart.py
```
