Skip to main content

A clld plugin to support language phylogenies

Project description

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)

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

clld_phylogeny_plugin-1.6.1.tar.gz (176.9 kB view details)

Uploaded Source

Built Distribution

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

clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl (178.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file clld_phylogeny_plugin-1.6.1.tar.gz.

File metadata

  • Download URL: clld_phylogeny_plugin-1.6.1.tar.gz
  • Upload date:
  • Size: 176.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for clld_phylogeny_plugin-1.6.1.tar.gz
Algorithm Hash digest
SHA256 bfeaabb6b1ee0fc6fd91a2242342c47ff7bae48cb39c1c3cb516e13cd89bd9f0
MD5 29354a297deac7d09efaf7c8371a60b1
BLAKE2b-256 a5c5acc21f46419217d601b8bf1d5da822700e259f055047f07efea11ae52f7e

See more details on using hashes here.

File details

Details for the file clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for clld_phylogeny_plugin-1.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8f2e7004ec7379293d95e8602dd53a48503a97c469ee78d77a16f2407cf97509
MD5 a979a90191b2bcfb28b3b1ce574ae9a3
BLAKE2b-256 23e0a83885385b02a2c36b7faa1745cb2f00151212f843b74b86804151623128

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