Skip to main content

A cldfbench plugin to create vizualisations of CLDF datasets

Project description

cldfviz

Build Status PyPI

Python library providing tools to visualize CLDF datasets.

Install

Run

pip install cldfviz

If you want to create maps in image formats (PNG, JPG, PDF), the cartopy package is needed, which will be installed with

pip install cldfviz[cartopy]

Note: Since cartopy has quite a few system-level requirements, installation may be somewhat tricky. Should problems arise, https://scitools.org.uk/cartopy/docs/v0.15/installing.html may help.

If you want to create "treemaps" (i.e. use the lingreemaps package for CLDF data), you need to install via

pip install cldfviz[lingtreemaps]

CLI

cldfviz is implemented as cldfbench plugin, i.e. it provides subcommands for the cldfbench command.

After installation you should see subcommands with a cldfviz. prefix listed when running

cldfbench -h

Help provided by the CLI is sometimes extensive and can be consulted via

cldfbench <sucommand> -h

e.g.

$ cldfbench cldfviz.map -h
usage: cldfbench cldfviz.map [-h] [--download-dir DOWNLOAD_DIR] [--language-filters LANGUAGE_FILTERS]
                             [--glottolog GLOTTOLOG] [--glottolog-version GLOTTOLOG_VERSION]
...

Commands

A short description of the cldfviz subcommands can be found below; for more documentation click on the images.

Example data

Examples in this documentation sometimes use CLDF data stored in the local filesystem. In particular, we'll use

  • DOI: WALS Online
  • DOI: Glottolog as CLDF dataset
  • DOI: APiCS Online

If you download these datasets using the cldfbench plugin cldfzenodo

cldfbench zenodo.download 10.5281/zenodo.7385533 --full-deposit
cldfbench zenodo.download 10.5281/zenodo.7398887 --full-deposit
cldfbench zenodo.download 10.5281/zenodo.7139937 --full-deposit

you should have the respective data in local directories wals-2020.3/, glottolog-cldf-4.7/ and cldf-datasets-apics-4ed59b5/.

cldfviz.map

A common way to visualize data from a CLDF StructureDataset is as "dots on a map", i.e. as WALS-like geographic maps, displaying typological variation. The cldfviz.map subcommand allows you to create such maps. For details see docs/map.md.

details

cldfviz.text

A rather traditional visualization of linguistic data is the practice of interspersing bits of data in descriptive texts, most obviously perhaps as examples formatted as Interlinear Glossed Text. The cldfviz.text subcommand allows you "render" documents written in CLDF markdown, i.e. converting such documents to plain markdown by inserting suitable representations of the referenced data. For details see docs/text.md.

details

cldfviz.examples

While it is possible to (selectively) include IGT formatted examples in CLDF Markdown via cldfviz.text, often it is useful to just look at an HTML formatted list of all examples from a dataset. This can be done via cldfviz.examples. For details see docs/examples.md.

details

cldfviz.tree

Phylogenetic (or classification) trees of languages are a "proper" CLDF component since CLDF 1.2 - and an obvious candidate for visualization (because noone likes to look at Newick).

To provide a configurable visualization of trees in SVG format, the cldfviz.tree command renders CLDF trees using the powerful toytree package. For details see docs/tree.md.

details

cldfviz.treemap

Displaying maps and trees is nice, but visualizing how phylogeny relates to geography can also be done in a more integrated way as demonstrated by the lingtreemaps package. cldfviz.treemap provides a front-end for this package, making it possible to use its functionality with data and trees in CLDF datasets.

details

cldfviz.audiowordlist

Another case where it is often desirable to aggregate objects from different CLDF components for inspection are Wordlists with associated audio files. Displaying forms for a specified concept together with the audio as HTML page can be done running cldfviz.audiowordlist.

details

cldfviz.erd

CLDF datasets typically contain multiple, related tables. The most common visualization of such a data model are "entity-relationship diagrams", i.e. diagramy of the entitty-relationship model of the dataset. Such a diagram can be created via cldfviz.erd (if a Java runtime is installed). For details see docs/erd.md.

details

Related

Other tools to convert CLDF data to "human-readable" formats:

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

cldfviz-0.12.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

cldfviz-0.12.0-py2.py3-none-any.whl (1.9 MB view details)

Uploaded Python 2Python 3

File details

Details for the file cldfviz-0.12.0.tar.gz.

File metadata

  • Download URL: cldfviz-0.12.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cldfviz-0.12.0.tar.gz
Algorithm Hash digest
SHA256 330f2aaccd8f1146ac76fe9d778653b3620802f42746e7c0da4c943cb4f4385f
MD5 0512c3c80b22ab8ece8468d8c45cc94a
BLAKE2b-256 808a84ebda111dd6a56ed514ea135bc9058006ad7cdbc0924b47b5218d78ca61

See more details on using hashes here.

File details

Details for the file cldfviz-0.12.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cldfviz-0.12.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cldfviz-0.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dedf348e9920957c6c967ffbf5f209e34ee62c31bb87237104f94e357c614c11
MD5 435c0259c41aa713085b650c006c2bc2
BLAKE2b-256 1f0167672d20f74e6eb8368df39f9217594e5ca14193e2ae55527752bc4cf043

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