Skip to main content

Python package to build and manipulate dynamic NetworkX graphs.

Project description

NetworkX-Temporal


PyPI package Documentation Status Downloads Downloads License

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

Requirements

  • Python>=3.7
  • networkx>=2.1
  • pandas>=1.1.0

Install

Package is available to install on PyPI:

$ pip install 'networkx-temporal[draw]'

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

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
>>>
>>> # Build directed temporal graph.
>>> TG = tx.TemporalDiGraph()
>>> 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)
>>>
>>> # Slice it into snapshots.
>>> TG = TG.slice(attr="time")
>>>
>>> # Plot resulting object.
>>> tx.draw(TG, layout="kamada_kawai", figsize=(8,2))

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, please kindly consider citing it.

Project details


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.2.1.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

networkx_temporal-1.2.1-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: networkx_temporal-1.2.1.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for networkx_temporal-1.2.1.tar.gz
Algorithm Hash digest
SHA256 29fcef4d770322177ccb9052d32aa232131b6ffab707a288c28d45d643333325
MD5 aad2ca1c09ad29b2722a88e3607a376f
BLAKE2b-256 ba8775b36a9943bc02f996bca3d767ee5d0dd245728e4ecd15d7bbc6cb197cdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for networkx_temporal-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bc550fe61687f07b99f55daf0e3bf5f8b009be643d54af71de34c6975c2f47e
MD5 3a9f4488d2baa8b08d9fba8992ed760c
BLAKE2b-256 acd16dc42092089f32cc5b1eacbf3ac0c5b797de2ee1de1cbd7dbeb97b2e78f9

See more details on using hashes here.

Supported by

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