https://github.com/benmaier/tacoma

Temporal networks in Python. Provides fast tools to analyze temporal contact networks and simulate dynamic processes on them using Gillespie's SSA.

https://github.com/benmaier/tacoma

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: plos.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

contact-networks epidemics face-to-face face2face network-visualization networks temporal-networks
Last synced: 5 months ago · JSON representation

Repository

Temporal networks in Python. Provides fast tools to analyze temporal contact networks and simulate dynamic processes on them using Gillespie's SSA.

Basic Info
  • Host: GitHub
  • Owner: benmaier
  • License: other
  • Language: C++
  • Default Branch: master
  • Homepage: http://tacoma.benmaier.org
  • Size: 9.28 MB
Statistics
  • Stars: 105
  • Watchers: 4
  • Forks: 7
  • Open Issues: 7
  • Releases: 0
Topics
contact-networks epidemics face-to-face face2face network-visualization networks temporal-networks
Created almost 8 years ago · Last pushed almost 6 years ago
Metadata Files
Readme License

README.md

logo

TemporAl COntact Modeling and Analysis. Provides fast tools to analyze temporal contact networks, produce surrogate networks using qualitative models and simulate Gillespie processes on them. Currently only working on OSX and Linux distributions. No Windows support yet!

Quick example

In order to download the SocioPatterns 'Hypertext 2009'-dataset and visualize it interactively, do the following.

```python

import tacoma as tc from tacoma.interactive import visualize temporalnetwork = tc.downloadandconvertsociopatternshypertext2009() 100% [..............................................................................] 67463 / 67463 visualize(temporalnetwork, framedt = 20) ```

visualization example

What is tacoma?

tacoma is a joint C++/Python-package for the modeling and analysis of undirected and unweighted temporal networks, with a focus on (but not limited to) human face-to-face contact networks.

Pros of using tacoma

  • networks are natively described in continuous time (which includes descriptions in discrete time
  • two main native formats to describe temporal networks (tc.edge_lists and tc.edge_changes), a third way, a sorted list of on-intervals for each edge called tc.edge_trajectories is available, but algorithms work on the two native formats only
  • the simple portable file-format .taco as a standardized way to share temporal network data (which is just the data dumped to a .json-file, a simple file format readable from a variety of languages)
  • easy functions to produce surrogate temporal networks from four different models
  • easy way to simulate Gillespie (here, epidemic spreading) processes on temporal networks with an implementation of Vestergaard's and Génois's adapted algortihm
  • easy framework to develop new Gillespie-simulations algorithms on temporal networks
  • multiple and simple ways to interactively visualize temporal networks
  • simple functions to manipulate temporal networks (slice, concatenate, rescale time, sample, bin, convert)
  • simple functions to analyze structural and statistical properties of temporal networks (mean degree, degree distribution, group size distribution, group life time distributions, etc.)
  • fast algorithms due to C++-core (fast as in faster than pure Python)
  • relatively fast and easy to compile since it only depends on the C++11-stdlib and pybind11 without the large overhead of Boost

Cons of using tacoma

  • no support for directed temporal networks yet
  • no support for weighted temporal networks yet

Install

If you get compiling errors, make sure that pybind11 is installed.

$ git clone https://github.com/benmaier/tacoma
$ pip install ./tacoma

Note that a C++11-compiler has to be installed on the system before installing tacoma. On OS X it might happen that even though pip installed pybind11 it's not available during installation. If that happens please open a detailed issue here. You might want to try

$ brew install pybind11

as a work-around.

Packages not automatically installed during installation

The following packages are not installed during installation with pip since they're only required for drawing and drawing is not essential. If you want to use tacoma.drawing, please install

matplotlib
networkx
python-louvain (community)

Documentation

The documentation is currently available at http://tacoma.benmaier.org . It is full of typos and non-exhaustive but I think the important points are in there.

Examples

Check out the sandbox directory.

Here is an example for the temporal network format tc.edge_changes.

```python import tacoma as tc from tacoma.interactive import visualize

define temporal network as a list of edge changes

temporalnetwork = tc.edgechanges() temporalnetwork.N = 10 temporalnetwork.edgesinitial = [ (0,1), (2,3), (1,7), (3,5), (1,9), (7,2) ] temporalnetwork.t0 = 0.0 temporalnetwork.t = [ 0.8, 2.4 ] temporalnetwork.tmax = 3.1 temporalnetwork.edgesin = [ [ (0, 5), (3, 6) ], [ (3, 7), (4, 9), (7, 8) ], ] temporalnetwork.edgesout = [ [ (0, 1) ], [ (2, 3), (3, 6) ], ]

visualize(temporalnetwork, framedt = 0.05) ```

visualization example

License

The whole software is published under the MIT software license. The documentation and all figures are copyrighted by Benjamin F. Maier. Ask for permission if you want to distribute parts.

Owner

  • Name: Benjamin F. Maier
  • Login: benmaier
  • Kind: user
  • Location: Copenhagen
  • Company: Technical University of Denmark

Postdoc @suneman 's, generative art, electronic music. DTU Compute & SODAS.

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 480
  • Total Committers: 2
  • Avg Commits per committer: 240.0
  • Development Distribution Score (DDS): 0.002
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Benjamin Maier b****r@g****m 479
franksh f****r@g****m 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 22
  • Total pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 5
  • Total pull request authors: 1
  • Average comments per issue: 1.55
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • benmaier (16)
  • franksh (2)
  • barrat (2)
  • JohnnyTam (1)
  • ulfaslak (1)
Pull Request Authors
  • franksh (1)
Top Labels
Issue Labels
feature request (12) bug (6) C++-core (5) Visualization (5) enhancement (3)
Pull Request Labels

Dependencies

docs/requirements.txt pypi
  • pip ==18.0
  • pybind11 ==2.2.3
  • sphinxcontrib-katex =0.3
setup.py pypi
  • lmfit *
  • numpy *
  • pybind11 >=2.0.0
  • scipy *
  • wget *