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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file clld-phylogeny-plugin-1.6.0.tar.gz
.
File metadata
- Download URL: clld-phylogeny-plugin-1.6.0.tar.gz
- Upload date:
- Size: 176.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c39d77bae2d043ac2dda9903c2ab2d09334105a9715e5a6ba2212c9b6e0a6ba |
|
MD5 | 004e8383f3f2ed569f5954a518edeab6 |
|
BLAKE2b-256 | 0af88c71c5c58dbcd2930ebc6574c67c7c2f98cc7cc25ddb061cbf39504dd88f |
File details
Details for the file clld_phylogeny_plugin-1.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: clld_phylogeny_plugin-1.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 178.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10c2249361f5ac0a12a94df43349d29f4b6971715ad2fa8fc58dd3307213baf5 |
|
MD5 | ea91c11d0021cb27d6ad9def6c5ace80 |
|
BLAKE2b-256 | 2ee71d34697398110bbeb803abb35769b6595a9ceb758bc8a4ecdb64a517a9a8 |