Skip to main content

NetworkX-Temporal


PyPI Documentation Downloads License DOI

Python package to build and manipulate temporal graphs using NetworkX as backend.

Install

Available for Python 3.7+ from PyPI:

$ pip install 'networkx-temporal[draw]'

The [draw] extra includes additional libraries required to plot graphs with NetworkX.

Requires networkx >=2.1, numpy >=1.17.3, pandas >=1.1.0, scipy >=1.7.3.

Optional dependencies can be installed from the groups all, docs, draw, ipynb.

Quick example

For detailed information on using the package, please refer to its official documentation.

An interactive Jupyter notebook with more examples is also available here (open on Colab).

>>> import networkx_temporal as tx
>>>
>>> TG = tx.temporal_graph(directed=False)  # tx.TemporalMultiGraph()
>>>
>>> TG.add_edge("a", "b", time=0)
>>> TG.add_edge("c", "b", time=1)
>>> TG.add_edge("d", "c", time=2)
>>> TG.add_edge("d", "e", time=2)
>>> TG.add_edge("a", "c", time=2)
>>> TG.add_edge("f", "e", time=3)
>>> TG.add_edge("f", "a", time=3)
>>> TG.add_edge("f", "b", time=3)
>>>
>>> # Obtain snapshots as subgraph views.
>>> TG = TG.slice(attr="time")
>>>
>>> # Plot resulting object.
>>> tx.draw(TG, layout="kamada_kawai", figsize=(8,2))

Temporal graph plot

Contributing

Contributions are welcome! If you find any bugs or have any suggestions, feel free to open a ticket, fork the repository and create a pull request, or simply send an e-mail. Please keep in mind that any out-of-scope contributions (not regarding temporal networks) should instead be directed to the NetworkX repository.

License

This package is released under the BSD License.

Cite

In case this package is useful for your research, kindly consider citing it.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

networkx_temporal-1.4.2.tar.gz (742.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

networkx_temporal-1.4.2-py3-none-any.whl (778.1 kB view details)

Uploaded Python 3

File details

Details for the file networkx_temporal-1.4.2.tar.gz.

File metadata

  • Download URL: networkx_temporal-1.4.2.tar.gz
  • Upload date:
  • Size: 742.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for networkx_temporal-1.4.2.tar.gz
Algorithm Hash digest
SHA256 93a56360f0c4c4742fce7819fdad132f5e1d9815e9440d52ca455ebc54fa6434
MD5 4de6d0b85aaf96457b9963a2e7798f31
BLAKE2b-256 4a47e2806dda5955e2a35cf6073268dccb16955a574e9bd934710d4fcd5bd00f

See more details on using hashes here.

File details

Details for the file networkx_temporal-1.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for networkx_temporal-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9c781e5e6eda94b4a654c578bf20487572da12a95d3e09b351f873c605cb4d
MD5 8ab68882eae5ab0903d6706a939c7a73
BLAKE2b-256 d7280fdb3743c5ad944965dac0c9a79a161a4b26dbbc74e4f83eb9fbf938bd44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page