Metadata-Version: 2.1
Name: pykrack
Version: 0.0.1
Summary: Computing Krackhardt hierarchy score on netowrkX graphs
Home-page: https://github.com/FerranC96/pykrack
Author: FerranC96
Author-email: ferricaro@hotmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: networkx
Requires-Dist: rpy2
Requires-Dist: jupyter
Requires-Dist: notebook
Provides-Extra: dev

# pyKrack

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This file will become your README and also the index of your
documentation.

THIS IS CLEARLY STILL A WORK IN PROGRESS PROJECT

## Install

Due to the comparisons with the r package sna We recommend using conda.
Create an environment using the environment.yml file, load it and
install/run the package.

Alternatively pyKrack can also be isntalled using pip via the following
command

``` sh
pip install pyKrack
```

Then install the R dependencies listed in the conda environmnet.yml
manually.

## How to use

Please see the core and hierarchy notebooks for more detailed
explanations.

**pyKrack** consists of one main function,
[`compute_hierarchy`](https://FerranC96.github.io/pykrack/hierarchy.html#compute_hierarchy).

------------------------------------------------------------------------

<a
href="https://github.com/FerranC96/pykrack/blob/main/pykrack/hierarchy.py#LNone"
target="_blank" style="float:right; font-size:smaller">source</a>

### compute_hierarchy

>      compute_hierarchy (G, metric='pykrack')

Compute one of the possible hierarchy scores

|             | **Type**  | **Default** | **Details**                                                                                                                                                                                                                                                            |
|-------------|-----------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| G           |           |             | Directed NetworkX graph                                                                                                                                                                                                                                                |
| metric      | str       | pykrack     | Type of hierarchy metric to compute. Accepted types are:<br>‘pykrack’ for this module’s implementation of the Krackhardt score.<br>‘rsnakrack’ for the sna implementation in R.<br>‘hierarchy_flow’ for the Luo and Magee 2011 as implemented in the NetworkX package. |
| **Returns** | **float** |             | **One of the possible hierarchy scores**                                                                                                                                                                                                                               |
