Skip to main content

Package for analysing social-ecological networks

Project description

SESMotifAnalyser: framework for analysing social-ecological systems

This package contains a Python based framework for analysing social-ecological systems and more broadly multi-level networks.


A comprehensive documentation is available as PDF. Please contact t.seppelt-dev[ÄT] in case of any questions.

See the examples folder for examples.


The package can be installed using pip.

pip3 install sma

Per default, dependencies required for drawing social-ecological networks will not be installed. The following command may be used to install the additional dependencies:

pip3 install sma[plots]

It has the following dependencies: Python 3, numpy, scipy, networkx, pandas. On the R side it depends on statnet, reticulate (with Python 3).

For a version history, see change log and tags.

Integration in R and motifr

The functions in this package can to some extent be called from R using the R package reticulate. An example can be found in the examples folder. See also the corresponding section in the documentation.

Mario Angst is working on an R package which provides an interface to the SESMotifAnalyser. His project motifr can be found on Github.


In addition to the motif counting features written in Python, this repository contains ergm-userterms for some motifs, e.g. the 3-motifs I.C and II.C (closed and open triangles, respecting the social-ecological types of the nodes).

After downloading and compiling the package, ergm models can be fitted and the motif counting can be done directly in R:

netw <- network(...)

# first parameter: which sesType should the nodes at the points of the triangles have
# second parameter: name of nodel attribute
summary(netw ~ openTriangles(0, 'sesType'))

Project details

Download files

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

Files for sma, version 2.3.0
Filename, size File type Python version Upload date Hashes
Filename, size sma-2.3.0-py3-none-any.whl (77.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page