Skip to content

Python package for the visualization of food webs (trophic networks)

License

Notifications You must be signed in to change notification settings

ibs-pan/foodwebviz

Repository files navigation

foodwebviz

License

foodwebviz is a Python package for the visualization of food webs (trophic networks).

Gallery

Heatmap of carbon flows over the continental shelf north of Richards Bay, South Africa

Screenshot of an interactive graph visualisation of the Prince William Sound food web, Alaska

Animated flow network of Richards Bay food web

Installation

Make sure you have Python installed (we recommend Anaconda which comes with a wide range of handy default packages, along with Jupyter Notebooks and convenient Spyder IDE: https://www.anaconda.com/). If you would like to check this package out without full installation - see section "Tutorial".

  1. Install npm: https://docs.npmjs.com/cli/v7/configuring-npm/install

  2. Install orca: npm install -g [email protected] orca

  3. To create animations, install ImageMagick: https://docs.wand-py.org/en/0.3.5/guide/install.html (on Linux: 'sudo apt-get install libmagickwand-dev')

  4. Manually download foodwebviz package from GitHub and run the following terminal command from the top-level source directory (on Windows use e.g. Anaconda Prompt):

    $ pip install .

Tutorial

  • examples/sample_output contains examples of visualisations (screenshots of interactive heatmap and graph visualisations)
  • examples/interactive_food_web_graph.html is an example of an interactive graph in HTML that can be viewed also without installing everything
  • examples/foodwebviz_tutorial.ipynb is an interactive Jupyter Notebook with code examples and functionality overview.

To get information on a specific function/method "function_name" please execute "help(function_name)" in a Jupyter Notebook or Python console. You can also play with the tutorial notebook without installing the package locally: https://mybinder.org/v2/gh/ibs-pan/foodwebviz/master?filepath=examples%2Ffoodwebviz_tutorial.ipynb

Testing

To execute the tests run: $ pytest

foodwebviz uses the Python pytest testing package. You can learn more about pytest on their homepage.

Bugs \ Questions

In case of questions / problems / bugs please report them here.

Citation

When using foodwebviz package please cite:

Łukasz Pawluczuk, Mateusz Iskrzyński (2022) Food web visualisation: heatmap, interactive graph, animated flow network. Methods in Ecology and Evolution, 00, 1– 8. https://doi.org/10.1111/2041-210X.13839, https://github.com/ibs-pan/foodwebviz

A BibTeX entry for LaTeX users:

@article{foodwebviz, author={Łukasz Pawluczuk and Mateusz Iskrzyński}, title={Food web visualisation: heatmap, interactive graph, animated flow network}, year={2022}, journal={Methods in Ecology and Evolution}, doi={10.1111/2041-210X.13839} url={https://github.com/ibs-pan/foodwebviz } }

About

Python package for the visualization of food webs (trophic networks)

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages