Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 48 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,63 @@
<img src="https://raw.githubusercontent.com/xgi-org/xgi/main/logo/logo.svg" alt="XGI" width="50%"></img>

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Supports Python versions 3.11 and above.](https://img.shields.io/badge/Python%20versions%20supported-3.11%2B-forest
)](https://www.repostatus.org/#active)
[![Test Status](https://github.com/xgi-org/xgi/actions/workflows/test-code.yml/badge.svg)](https://github.com/xgi-org/xgi/actions/workflows/test-code.yml)
[![codecov](https://codecov.io/gh/xgi-org/xgi/branch/main/graph/badge.svg?token=BI6TX2WDSG)](https://codecov.io/gh/xgi-org/xgi)
[![Good First Issue](https://img.shields.io/badge/contribute-Good%20First%20Issue-forest)](https://github.com/xgi-org/xgi/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05162/status.svg)](https://doi.org/10.21105/joss.05162)
[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/115)
[![Benchmarks](https://img.shields.io/badge/benchmarks-forest)](https://xgi-org.github.io/xgi/dev/bench/)

* [**Source**](https://github.com/xgi-org/xgi)
* [**Bug reports**](https://github.com/xgi-org/xgi/issues)
* [**GitHub Discussions**](https://github.com/xgi-org/xgi/discussions)
* [**Documentation**](https://xgi.readthedocs.io)
* [**Contribute**](https://xgi.readthedocs.io/en/stable/contribute.html)
* [**Projects using XGI**](https://xgi.readthedocs.io/en/stable/using_xgi.html)

Sign up for our [mailing list](http://eepurl.com/igE6ez) and follow XGI on [Twitter](https://twitter.com/xginets) or [Mastodon](https://mathstodon.xyz/@xginets)!

### Table of Contents: ###
- [What is XGI?](#what-is-xgi)
- [Installation](#installation)
- [Getting Started](#getting-started)
- [XGI-DATA](#xgi-data)
- [How to Contribute](#how-to-contribute)
- [How to Cite](#how-to-cite)
- [License](#license)
- [Support](#support)
- [Other Resources](#other-resources)

## What is XGI?<a id="what-is-xgi"></a>

Comple**X** **G**roup **I**nteractions (**XGI**) is a Python package for higher-order networks (If you want more information on what higher-order networks are, see our [brief introduction](https://xgi.readthedocs.io/en/stable/higher-order.html)).

**XGI is a software designed to streamline working with higher-order networks from start to finish**. XGI can
* Create synthetic datasets from many **generative models**
* **Read and write** higher-order datasets in a user-friendly way
* Represent **hypergraphs, directed hypergraphs, and simplicial complexes** with efficient and flexible data structures
* Analyze higher-order networks with **measures and algorithms**
* **Manipulate node and edge statistics** in a flexible and customizable way.
* Draw higher-order networks in a variety of **visually striking ways** (See our [gallery](https://xgi.readthedocs.io/en/stable/auto_examples/index.html) for several examples.)

## Installation<a id="installation"></a>
XGI runs on Python 3.11 or higher.

To install the latest version of XGI, run the following command:
<p align="center"><img src="https://raw.githubusercontent.com/xgi-org/xgi/main/logo/logo.svg" alt="XGI" width="35%"></img></p>

[![PyPI](https://img.shields.io/pypi/v/xgi?color=forest)](https://pypi.org/project/xgi/) [![Python versions](https://img.shields.io/pypi/pyversions/xgi?color=forest)](https://pypi.org/project/xgi/) [![Test Status](https://github.com/xgi-org/xgi/actions/workflows/test-code.yml/badge.svg)](https://github.com/xgi-org/xgi/actions/workflows/test-code.yml) [![codecov](https://codecov.io/gh/xgi-org/xgi/branch/main/graph/badge.svg?token=BI6TX2WDSG)](https://codecov.io/gh/xgi-org/xgi) [![DOI](https://joss.theoj.org/papers/10.21105/joss.05162/status.svg)](https://doi.org/10.21105/joss.05162) [![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/115) [![Good First Issue](https://img.shields.io/badge/contribute-Good%20First%20Issue-forest)](https://github.com/xgi-org/xgi/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22) [![Benchmarks](https://img.shields.io/badge/benchmarks-forest)](https://xgi-org.github.io/xgi/dev/bench/)

Comple**X** **G**roup **I**nteractions (**XGI**) is a Python package for [higher-order networks](https://xgi.readthedocs.io/en/stable/higher-order.html): hypergraphs, directed hypergraphs, and simplicial complexes. It provides data structures, generative models, measures, datasets, and drawing tools.

<p align="center"><a href="https://xgi.readthedocs.io">Documentation</a> · <a href="https://xgi.readthedocs.io/en/stable/user_guides.html">Tutorials</a> · <a href="https://xgi.readthedocs.io/en/stable/auto_examples/index.html">Gallery</a> · <a href="https://github.com/xgi-org/xgi-data">Datasets</a> · <a href="https://xgi.readthedocs.io/en/stable/using_xgi.html">Projects using XGI</a> · <a href="https://xgi.readthedocs.io/en/stable/contribute.html">Contribute</a></p>

## Install

```sh
pip install xgi
```

To install this package locally:
* Clone this repository
* Navigate to the folder on your local machine
* Run the following command:
```sh
pip install -e .["all"]
For other options (development version, optional dependencies), see the [installation guide](https://xgi.readthedocs.io/en/stable/installing.html).

## Getting started

To get started, take a look at the [tutorials](https://xgi.readthedocs.io/en/stable/user_guides.html) illustrating the library's basic functionality.

Quickstart example:

```python
import xgi

# build
hyperedges = [[1, 2, 3], [3, 4, 5], [3, 6], [6, 7, 8, 9], [1, 4, 10, 11, 12], [1, 4]]
H = xgi.Hypergraph(hyperedges)

# analyze
H.edges.size.asnumpy() # array([3, 3, 2, 4, 5, 2])
H.nodes.filterby("degree", 3) # nodes 1, 3, 4

# visualize
pos = xgi.barycenter_spring_layout(H, seed=1)
xgi.draw(H, pos=pos)
```
* If that command does not work, you may try the following instead
````zsh
pip install -e ."[all]"
````
For more installation options, see the [guide](https://github.com/xgi-org/xgi/blob/main/requirements/README.md).

<p align="center"><img src="docs/source/_static/readme_example.png" alt="Drawing of the example hypergraph" width="300"></img></p>

## Getting Started<a id="getting-started"></a>
To get started, take a look at the [user guides](https://xgi.readthedocs.io/en/stable/user_guides.html) illustrating the library's basic functionality.
## XGI-DATA

[XGI-DATA](https://xgi.readthedocs.io/en/stable/xgi-data.html) is a curated collection of 50+ real-world higher-order datasets (from face-to-face contacts and emails to coauthorships, legislation, and ecology), which can be loaded in one line with `xgi.load_xgi_data()`.

## XGI-DATA<a id="xgi-data"></a>
A number of higher-order datasets are available in the [XGI-DATA repository](https://github.com/xgi-org/xgi-data) and can be easily accessed with the `load_xgi_data()` function.
## Contribute

Contributions of any size are welcome, and we're happy to help! To report a bug or request a feature, [open an issue](https://github.com/xgi-org/xgi/issues/new). For more, see the [contributing guide](https://xgi.readthedocs.io/en/stable/contribute.html).

## How to Contribute<a id="how-to-contribute"></a>
If you want to contribute to this project, please make sure to read the
[contributing guidelines](https://github.com/xgi-org/xgi/blob/main/HOW_TO_CONTRIBUTE.md). We expect respectful and kind interactions by all contributors and users as laid out in our [code of conduct](https://github.com/xgi-org/xgi/blob/main/CODE_OF_CONDUCT.md).
Join the community on [Zulip](https://xgi.zulipchat.com/join/7agfwo7dh7jo56ppnk5kc23r/) and follow XGI on [Bluesky](https://bsky.app/profile/xgi.bsky.social).

The XGI community always welcomes contributions, no matter how small. We're happy to help troubleshoot XGI issues you run into, assist you if you would like to add functionality or fixes to the codebase, or answer any questions you may have.
## Cite

Some concrete ways that you can get involved:
We acknowledge the importance of good software to support research. To demonstrate the value of XGI, we ask that you cite the XGI [paper](https://doi.org/10.21105/joss.05162) in your work. You can also use the "Cite this repository" button on GitHub.

* **Get XGI updates** by following the XGI [Twitter](https://twitter.com/xginets) account, signing up for our [mailing list](http://eepurl.com/igE6ez), or starring this repository.
* **Spread the word** when you use XGI by sharing with your colleagues and friends.
* **Request a new feature or report a bug** by raising a [new issue](https://github.com/xgi-org/xgi/issues/new).
* **Create a Pull Request (PR)** to address an [open issue](https://github.com/xgi-org/xgi/issues) or add a feature.
* **Add a paper or software package using XGI to the "Projects using XGI" page** with the following [instructions](/citations/adding_citations.md)!
* **Join our [Zulip channel](https://xgi.zulipchat.com/join/7agfwo7dh7jo56ppnk5kc23r/)** to be a part of the daily goings-on of XGI.
> Landry, N. W., Lucas, M., Iacopini, I., Petri, G., Schwarze, A., Patania, A., & Torres, L. (2023). XGI: A Python package for higher-order interaction networks. *Journal of Open Source Software*, 8(85), 5162.

<details>
<summary>BibTeX</summary>

## How to Cite<a id="how-to-cite"></a>
We acknowledge the importance of good software to support research, and we note that research becomes more valuable when it is communicated effectively. To demonstrate the value of XGI, we ask that you cite the XGI [paper](https://doi.org/10.21105/joss.05162) in your work. You can cite XGI either by going to our repository page [repository page](https://github.com/xgi-org/xgi) (if you haven't already) and clicking the "cite this repository" button on the right sidebar (which will generate a citation in your preferred format) or by copying the following BibTeX entry:
```
```bibtex
@article{Landry_XGI_2023,
author = {Landry, Nicholas W. and Lucas, Maxime and Iacopini, Iacopo and Petri, Giovanni and Schwarze, Alice and Patania, Alice and Torres, Leo},
title = {{XGI: A Python package for higher-order interaction networks}},
Expand All @@ -105,18 +72,10 @@ We acknowledge the importance of good software to support research, and we note
url = {https://doi.org/10.21105/joss.05162},
}
```
</details>

## License<a id="license"></a>
Released under the 3-Clause BSD license (see [`LICENSE.md`](https://github.com/xgi-org/xgi/blob/main/LICENSE.md))

Copyright (C) 2021-2025 XGI Developers

## Support<a id="support"></a>

<a href="https://www.nsf.gov"><img src="docs/source/_static/nsf-logo.svg" alt="NSF" height=50></img></a>
<a href="https://zulip.com"><img src="docs/source/_static/zulip-org-logo.svg" alt="XGI" height=50></img></a>
## License and support

See details [here](https://github.com/xgi-org/xgi/blob/main/SUPPORT.md).
Released under the [3-Clause BSD license](https://github.com/xgi-org/xgi/blob/main/LICENSE.md). XGI is supported by (see [details](https://github.com/xgi-org/xgi/blob/main/SUPPORT.md)):

## Other Resources<a id="other-resources"></a>
This library may not meet your needs and if this is this case, consider checking out our [list of other resources](https://github.com/xgi-org/xgi/blob/main/OTHER_RESOURCES.md).
<a href="https://www.nsf.gov"><img src="docs/source/_static/nsf-logo.svg" alt="NSF" height=50 align="middle"></img></a> &nbsp; <a href="https://zulip.com"><img src="docs/source/_static/zulip-org-logo.svg" alt="Zulip" height=30 align="middle"></img></a>
Binary file added docs/source/_static/readme_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading