PyCircStat2: Circular statistics with Python
A rework of pycircstat.
Key Features | Installlation | API Reference | Examples ( Books | Topics )
Key Features
-
One-Stop Circular Data Analysis Pipeline with
Circular
ClassThe
Circular
class simplifies circular data analysis by providing automatic data transformation, descriptive statistics, hypothesis testing, and visualization tools—all in one place. -
Compatibility with Legacy APIs
APIs for descriptive statistics and hypothesis testing follow the conventions established by the original circstat-matlab and pycircstat, ensuring ease of use for existing users.
-
Wide-Ranging Circular Distributions
The package supports a variety of circular distributions, including:
- Symmetric distributions: Circular Uniform, Cardioid, Cartwright, Wrapped Normal, Wrapped Cauchy, von Mises (and its flat-top extension), and Jones-Pewsey.
- Asymmetric distributions: Sine-skewed Jones-Pewsey, Asymmetric Extended Jones-Pewsey, Inverse Batschelet.
Also see the full feature checklist here.
Installation
To install the latest tagged version:
pip install pycircstat2
Or to install the development version, clone the repository and install it with pip install -e
:
git clone https://github.com/circstat/pycircstat2
pip install -e pycircstat2
API Reference
The API reference is available here.
Example notebooks
In the notebooks below, we reproduce examples and figures from a few textbooks on circular statistics.
Books
- Statistical Analysis of Circular Data (Fisher, 1993)
- Chapter 26 and 27 from Biostatistical Analysis (Zar, 2010).
- Circular Statistics in R (Pewsey, et al., 2014)
And a few more examples on selective topics: