2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
powerlaw is a toolbox using the statistical methods developed in Clauset et al. 2007 and Klaus et al. 2011 to determine if a probability distribution fits a power law. Academics, please cite as:
Jeff Alstott, Ed Bullmore, Dietmar Plenz. (2014). powerlaw: a Python package for analysis of heavy-tailed distributions. PLoS ONE 9(1): e85777
Also available at arXiv:1305.0215 [physics.data-an]
Basic Usage
For the simplest, typical use cases, this tells you everything you need to know.:
import powerlaw
data = array([1.7, 3.2 ...]) #data can be list or Numpy array
results = powerlaw.Fit(data)
print results.power_law.alpha
print results.power_law.xmin
R, p = results.distribution_compare('power_law', 'lognormal')
For more explanation, understanding, and figures, see the working paper, which illustrates all of powerlaw’s features. For details of the math, see Clauset et al. 2007, which developed these methods.
Quick Links
Paper illustrating all of powerlaw’s features, with figures
Code examples from manuscript, as an IPython Notebook
Update Notifications, Mailing List, and Contacts
Note! This code works on Python 2.x, not 3.x. This code was developed and tested with the Enthought Python Distribution, and will update to 3.x whenever Enthought updates to 3.x. The full version of Enthought is available for free for academic use.
Acknowledgements
Many thanks to Andreas Klaus, Mika Rubinov and Shan Yu for helpful discussions. Thanks also to Andreas Klaus, Aaron Clauset, Cosma Shalizi, and Adam Ginsburg for making their code available. Their implementations were a critical starting point for making powerlaw.
Metadata
Release files for powerlaw 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| powerlaw-1.1.1.tar.gz | 20.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| powerlaw-1.1.1.linux-x86_64.exe | Details |
Total release size: 104.6 kB
Release files / powerlaw-1.1.1.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | powerlaw-1.1.1.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84fe1aa1af672614c5e65c802e7ccc079bb391170160bd5f9c6e834641d0869e
|
|
BLAKE2b-256 checksum How to use checksums |
83f017591004d021236e1eda68d2bd15689bd259179d9ab3445c2a31bf507f6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / powerlaw-1.1.1.linux-x86_64.exe
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | powerlaw-1.1.1.linux-x86_64.exe |
|---|---|
| Size | 84.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abef4d82974a24978c2402e105b8f1f764f0b004b274d6b53f9b045047b77bb5
|
|
BLAKE2b-256 checksum How to use checksums |
b13877231ab4944c2cc66d874a621457a5991c240fc595634881c5fb19f57c65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |