%global _empty_manifest_terminate_build 0
Name: python-benfordslaw
Version: 1.2.2
Release: 1
Summary: benfordslaw is a python library to test the frequency distribution of leading digits.
License: MIT License
URL: https://erdogant.github.io/benfordslaw
Source0: https://mirrors.aliyun.com/pypi/web/packages/2a/6c/6bb0043dd1a6f9eca0b723781685720ef97b08589b74498a71bcb9da37bd/benfordslaw-1.2.2.tar.gz
BuildArch: noarch
Requires: python3-matplotlib
Requires: python3-numpy
Requires: python3-scipy
Requires: python3-pandas
Requires: python3-wget
%description
# benfordslaw
[![Python](https://img.shields.io/pypi/pyversions/benfordslaw)](https://img.shields.io/pypi/pyversions/benfordslaw)
[![PyPI Version](https://img.shields.io/pypi/v/benfordslaw)](https://pypi.org/project/benfordslaw/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/erdogant/benfordslaw/blob/master/LICENSE)
[![BuyMeCoffee](https://img.shields.io/badge/buymeacoffee-grey.svg)](https://www.buymeacoffee.com/erdogant)
[![Github Forks](https://img.shields.io/github/forks/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/network)
[![GitHub Open Issues](https://img.shields.io/github/issues/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/issues)
[![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Downloads](https://pepy.tech/badge/benfordslaw/month)](https://pepy.tech/project/benfordslaw/month)
[![Downloads](https://pepy.tech/badge/benfordslaw)](https://pepy.tech/project/benfordslaw)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://erdogant.github.io/benfordslaw/pages/html/Documentation.html#colab-notebook)
[![Sphinx](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/benfordslaw/)
[![DOI](https://zenodo.org/badge/239205250.svg)](https://zenodo.org/badge/latestdoi/239205250)
* ``benfordslaw`` is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford's Law then model's for the corresponding predicted values should also follow Benford's Law. Normal data (Unmanipulated) does trend with Benford's Law, whereas Manipulated or fraudulent data does not.
* Assumptions of the data:
1. The numbers need to be random and not assigned, with no imposed minimums or maximums.
2. The numbers should cover several orders of magnitude
3. Dataset should preferably cover at least 1000 samples. Though Benford's law has been shown to hold true for datasets containing as few as 50 numbers.
#
**⭐️ Star this repo if you like it ⭐️**
#
#### Install benfordslaw from PyPI
```bash
pip install benfordslaw
```
#### Import benfordslaw package
```python
from benfordslaw import benfordslaw
```
#
### [Documentation pages](https://erdogant.github.io/benfordslaw/)
On the [documentation pages](https://erdogant.github.io/benfordslaw/) you can find detailed information about the working of the ``benfordslaw`` with many examples.
### Examples
#
* [Example: Analyze first digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-digit-test)
#
* [Example: Analyze second digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html)
#
* [Example: Analyze last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#last-digit-test)
#
* [Example: Analyze second last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-last-digit-test)
#### References
* https://en.wikipedia.org/wiki/Benford%27s_law
* https://towardsdatascience.com/frawd-detection-using-benfords-law-python-code-9db8db474cf8
#### Citation
Please cite in your publications if this is useful for your research (see citation).
### Maintainers
* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
### Contribute
* All kinds of contributions are welcome!
* If you wish to buy me a Coffee for this work, it is very appreciated :)
### Licence
See [LICENSE](LICENSE) for details.
%package -n python3-benfordslaw
Summary: benfordslaw is a python library to test the frequency distribution of leading digits.
Provides: python-benfordslaw
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-benfordslaw
# benfordslaw
[![Python](https://img.shields.io/pypi/pyversions/benfordslaw)](https://img.shields.io/pypi/pyversions/benfordslaw)
[![PyPI Version](https://img.shields.io/pypi/v/benfordslaw)](https://pypi.org/project/benfordslaw/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/erdogant/benfordslaw/blob/master/LICENSE)
[![BuyMeCoffee](https://img.shields.io/badge/buymeacoffee-grey.svg)](https://www.buymeacoffee.com/erdogant)
[![Github Forks](https://img.shields.io/github/forks/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/network)
[![GitHub Open Issues](https://img.shields.io/github/issues/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/issues)
[![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Downloads](https://pepy.tech/badge/benfordslaw/month)](https://pepy.tech/project/benfordslaw/month)
[![Downloads](https://pepy.tech/badge/benfordslaw)](https://pepy.tech/project/benfordslaw)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://erdogant.github.io/benfordslaw/pages/html/Documentation.html#colab-notebook)
[![Sphinx](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/benfordslaw/)
[![DOI](https://zenodo.org/badge/239205250.svg)](https://zenodo.org/badge/latestdoi/239205250)
* ``benfordslaw`` is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford's Law then model's for the corresponding predicted values should also follow Benford's Law. Normal data (Unmanipulated) does trend with Benford's Law, whereas Manipulated or fraudulent data does not.
* Assumptions of the data:
1. The numbers need to be random and not assigned, with no imposed minimums or maximums.
2. The numbers should cover several orders of magnitude
3. Dataset should preferably cover at least 1000 samples. Though Benford's law has been shown to hold true for datasets containing as few as 50 numbers.
#
**⭐️ Star this repo if you like it ⭐️**
#
#### Install benfordslaw from PyPI
```bash
pip install benfordslaw
```
#### Import benfordslaw package
```python
from benfordslaw import benfordslaw
```
#
### [Documentation pages](https://erdogant.github.io/benfordslaw/)
On the [documentation pages](https://erdogant.github.io/benfordslaw/) you can find detailed information about the working of the ``benfordslaw`` with many examples.
### Examples
#
* [Example: Analyze first digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-digit-test)
#
* [Example: Analyze second digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html)
#
* [Example: Analyze last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#last-digit-test)
#
* [Example: Analyze second last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-last-digit-test)
#### References
* https://en.wikipedia.org/wiki/Benford%27s_law
* https://towardsdatascience.com/frawd-detection-using-benfords-law-python-code-9db8db474cf8
#### Citation
Please cite in your publications if this is useful for your research (see citation).
### Maintainers
* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
### Contribute
* All kinds of contributions are welcome!
* If you wish to buy me a Coffee for this work, it is very appreciated :)
### Licence
See [LICENSE](LICENSE) for details.
%package help
Summary: Development documents and examples for benfordslaw
Provides: python3-benfordslaw-doc
%description help
# benfordslaw
[![Python](https://img.shields.io/pypi/pyversions/benfordslaw)](https://img.shields.io/pypi/pyversions/benfordslaw)
[![PyPI Version](https://img.shields.io/pypi/v/benfordslaw)](https://pypi.org/project/benfordslaw/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/erdogant/benfordslaw/blob/master/LICENSE)
[![BuyMeCoffee](https://img.shields.io/badge/buymeacoffee-grey.svg)](https://www.buymeacoffee.com/erdogant)
[![Github Forks](https://img.shields.io/github/forks/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/network)
[![GitHub Open Issues](https://img.shields.io/github/issues/erdogant/benfordslaw.svg)](https://github.com/erdogant/benfordslaw/issues)
[![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Downloads](https://pepy.tech/badge/benfordslaw/month)](https://pepy.tech/project/benfordslaw/month)
[![Downloads](https://pepy.tech/badge/benfordslaw)](https://pepy.tech/project/benfordslaw)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://erdogant.github.io/benfordslaw/pages/html/Documentation.html#colab-notebook)
[![Sphinx](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/benfordslaw/)
[![DOI](https://zenodo.org/badge/239205250.svg)](https://zenodo.org/badge/latestdoi/239205250)
* ``benfordslaw`` is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford's Law then model's for the corresponding predicted values should also follow Benford's Law. Normal data (Unmanipulated) does trend with Benford's Law, whereas Manipulated or fraudulent data does not.
* Assumptions of the data:
1. The numbers need to be random and not assigned, with no imposed minimums or maximums.
2. The numbers should cover several orders of magnitude
3. Dataset should preferably cover at least 1000 samples. Though Benford's law has been shown to hold true for datasets containing as few as 50 numbers.
#
**⭐️ Star this repo if you like it ⭐️**
#
#### Install benfordslaw from PyPI
```bash
pip install benfordslaw
```
#### Import benfordslaw package
```python
from benfordslaw import benfordslaw
```
#
### [Documentation pages](https://erdogant.github.io/benfordslaw/)
On the [documentation pages](https://erdogant.github.io/benfordslaw/) you can find detailed information about the working of the ``benfordslaw`` with many examples.
### Examples
#
* [Example: Analyze first digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-digit-test)
#
* [Example: Analyze second digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html)
#
* [Example: Analyze last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#last-digit-test)
#
* [Example: Analyze second last digit-distribution](https://erdogant.github.io/benfordslaw/pages/html/Examples.html#second-last-digit-test)
#### References
* https://en.wikipedia.org/wiki/Benford%27s_law
* https://towardsdatascience.com/frawd-detection-using-benfords-law-python-code-9db8db474cf8
#### Citation
Please cite in your publications if this is useful for your research (see citation).
### Maintainers
* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
### Contribute
* All kinds of contributions are welcome!
* If you wish to buy me a Coffee for this work, it is very appreciated :)
### Licence
See [LICENSE](LICENSE) for details.
%prep
%autosetup -n benfordslaw-1.2.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-benfordslaw -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Jun 20 2023 Python_Bot - 1.2.2-1
- Package Spec generated