Installation instructions

qdiv can be installed with pip or conda.

pip install qdiv

or

conda install -c omvatten qdiv

The recommended method is to download Anaconda or Miniconda

Open the Anaconda or Miniconda prompt (a terminal window).

Create a new environment. You can, for example, call it qdiv_env. Then, activate the environment.

conda create -n qdiv_env python=3.9
conda activate qdiv_env

Install qdiv using:

conda install -c omvatten qdiv

To start using qdiv, you need some way of writing and executing Python code. I use Spyder or Jupyter notebooks. You can install Spyder like this:

conda install spyder

To run Spyder, simply type:

spyder

You can install Jupyter like this:

conda install jupyter

To start a Jupyter notebook, simply type:

jupyter notebook

To check if qdiv works, you can run the following code:

import qdiv
import pandas as pd
df = pd.DataFrame({'a':[5,5,2,1]})
print(qdiv.diversity.naive_alpha(df))

Hopefully, this will run without error messages and print a value of 3.388