Skip to main content

clld-phylogeny-plugin

Plugin for the clld framework providing support for phylogenetic trees in clld apps.

This plugin includes the phylotree library to render phylogenetic trees in the browser.

Build Status PyPI

Introduction

While plotting cross-linguistic data on a map serves as quick visualization of the correlation between the data and geography, plotting the data on a phylogenetic tree allows inspection of the correlation between the data and some theory about language relatedness, embodied in the tree.

The clld-phylogeny-plugin package supports this kind of visualization by

  • adding database models to store phylogenetic trees (and how the tree labels correspond to Language objects)
  • adding a Tree component, allowing simple rendering of a tree on a page
  • adding support for "plotting" Parameter objects on a tree, i.e. plotting the value for a given (Parameter, Language) pair next to the language's label on the tree.

Usage

TODO: See https://github.com/clld/grambank/commit/4101243597c3c95d21786fe8bdcf8cf060da609b for a minimal example.

To make clld-phylogeny-plugin functionality available to a clld app, it must be included in the app's configuration - typically in <app>:main:

    config.include('clld_phylogeny_plugin')

This will add a Resource Phylogeny with corresponding routes

  • /phylogenys - the index page listing all available phylogenies
  • /phylogenys/<ID> - a phylogeny's details page, by default rendering the associated tree.

Plotting parameters on trees

To synchronize plotting of markers for parameter values on maps and trees, the Tree.get_marker method may need to be adjusted. This can be done by registering a derived Tree class as ITree utility:

class MyTree(clld_phylogeny_plugin.tree.Tree):
    def get_marker(self, valueset):
        # compute marker shape and color from valueset
        return shape, color

....
    config.registry.registerUtility(MyTree, ITree)

Release files for clld-phylogeny-plugin 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clld-phylogeny-plugin 1.6.1
File Size Uploaded
clld_phylogeny_plugin-1.6.1.tar.gz 176.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clld-phylogeny-plugin 1.6.1
File Interpreter ABI Platform
clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 355.2 kB

Release files / clld_phylogeny_plugin-1.6.1.tar.gz

Download URL clld_phylogeny_plugin-1.6.1.tar.gz
Size 176.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bfeaabb6b1ee0fc6fd91a2242342c47ff7bae48cb39c1c3cb516e13cd89bd9f0
BLAKE2b-256 checksum
How to use checksums
a5c5acc21f46419217d601b8bf1d5da822700e259f055047f07efea11ae52f7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl

Download URL clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl
Size 178.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8f2e7004ec7379293d95e8602dd53a48503a97c469ee78d77a16f2407cf97509
BLAKE2b-256 checksum
How to use checksums
23e0a83885385b02a2c36b7faa1745cb2f00151212f843b74b86804151623128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page