Skip to main content

A tidy API for network manipulation with Graph-tool inspired by tidygraph.

Project description

tidygraphtool

A tidy API for network manipulation with Graph-tool inspired by tidygraph. This is an experimental project of mine. Use at your own risk.

Usage

from tidygraphtool.all import *
g = play_sbm(n_k=500)
(
  g >>
    activate("nodes") >>
    add_property("degree", centrality_degree, mode="total") >>
    filter_on("degree == 2") >>
    summary()
)

Features

Installation

Because that graph-tool is mostly a c++ library, tidygraphtool is best installed from anaconda in a fresh environment.

git clone https://github.com/jstonge/tidygraphtool.git
conda env create --file gt.yml

INSPIRATION

MODELS TO INTEGRATE

PROTOYPE FUNCTIONAL INTERFACE

#### Current
g = gt_graph(nodes=nodes, edges=edges)
g = add_property(g, "node_coreness", node_coreness)
g = add_property(g, "pr", centrality_pagerank)
g = filter_on(g, "node_coreness > 3")
g = activate(g, "edges")
g = add_property(g, "edge_bet", centrality_edge_betweenness)
#### With #pipey, we can currently do
g = gt_graph(nodes=nodes, edges=edges)
g = (g >>
       add_property("node_coreness", node_coreness(g)) >>
       add_property("pr", centrality_pagerank(g)) >>
       filter_on("node_coreness > 3 & pr > 10") >>
       activate("edges") >>
       add_property("edge_bet", centrality_edge_betweenness(g)))

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

tidygraphtool-0.2.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

tidygraphtool-0.2-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file tidygraphtool-0.2.tar.gz.

File metadata

  • Download URL: tidygraphtool-0.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tidygraphtool-0.2.tar.gz
Algorithm Hash digest
SHA256 d03aaee8dc6f0ef011994ce1bd81f2f1538be3d961241e5d1cec33b5d756866c
MD5 c98742e836d64e45807ce30f28a69e50
BLAKE2b-256 ddc91911237f90c839e93608ce75711403dfe89c9c09d4129cc68577616c3fe7

See more details on using hashes here.

File details

Details for the file tidygraphtool-0.2-py3-none-any.whl.

File metadata

  • Download URL: tidygraphtool-0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for tidygraphtool-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 031f9f2943769e9f3d65873114b190d4ef0915f98bb772284284180b9b9b16e5
MD5 38259885aa90ee2f384251af204d8ff3
BLAKE2b-256 d8e8e25d45136d439726fb9ec49597f2d59fe175244e8357817f60e09f1f2b19

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 Pingdom Monitoring Sentry Error logging StatusPage Status page