lawkit
Statistical law analysis toolkit. Analyze data for Benford's law, Pareto principle, Zipf's law, and more. Detect anomalies and assess data quality.
Why lawkit?
Traditional tools analyze one pattern at a time. lawkit analyzes multiple statistical laws simultaneously:
Installation
# As CLI tool
# As library (Cargo.toml)
Usage
# Analysis commands
# Integration commands
# Generate test data
# Utility commands
Supported Input
- File:
lawkit benf data.csv - URL:
lawkit benf https://example.com/data.json - stdin:
cat data.csv | lawkit benf -
Formats: CSV, JSON, YAML, plain text (one number per line)
Main Options
Risk Levels
| Level | Meaning | Exit Code |
|---|---|---|
| LOW | Data conforms to expected distribution | 0 |
| MEDIUM | Minor deviation, likely normal | 0 |
| HIGH | Significant deviation (p ≤ 0.05) | 10 |
| CRITICAL | Severe anomaly (p ≤ 0.01) | 11 |
Other exit codes: 1 (general error), 2 (argument error)
CI/CD Usage
# Detect anomalies in financial data
if ! ; then
fi
# Validate data quality with cross-validation
Documentation
License
MIT