Using lingtreemaps
¶
To create maps, you can either use lingtreemaps plot in the command line or call the lingtreemaps.plot()
function from your own python code.
The available parameters for both approaches are documented below.
There are also commands to download newick trees from glottolog and get language coordinates from cldfbench.
The command line interface¶
lingtreemaps¶
lingtreemaps [OPTIONS] COMMAND [ARGS]...
download-tree¶
GLOTTOCODE: The glottocode of the root of the tree you want to download.
lingtreemaps download-tree [OPTIONS] GLOTTOCODE
Options
- -l, --languages <languages>¶
Path to a your language CSV file. Useful if there is a mismatch between your points on the map and the leafs of the glottolog tree.
- -p, --plot¶
Plot a quick map (without data).
- Default:
False
- -g, --get-languages¶
Get a language table from the glottolog catalog as well.
- Default:
False
- -o, --output <output_dir>¶
Where to store the downloaded data.
- Default:
.
Arguments
- GLOTTOCODE¶
Required argument
get-language-data¶
- Note: for this to work, you need to install cldfbench and download
the glottolog catalog.
GLOTTOCODE: The glottocode of the root of the tree you want to download the language list for.
lingtreemaps get-language-data [OPTIONS] GLOTTOCODE
Options
- -o, --output <output_dir>¶
Where to store the downloaded data.
Arguments
- GLOTTOCODE¶
Required argument
plot¶
LANGUAGES: A CSV file with languages.
Minimally required columns: ID
, Latitude
, Longitude
.
TREE: A newick tree file.
lingtreemaps plot [OPTIONS] LANGUAGES TREE
Options
- -f, --feature <feature>¶
Path to a CSV with columns
Clade
andValue
.
- -c, --conf <conf>¶
Path to a YAML configuration file.
- -o, --output <filename>¶
Name of the created map.
- -d, --debug¶
Show calculated values and orientation lines on the map.
Arguments
- LANGUAGES¶
Required argument
- TREE¶
Required argument