-
Notifications
You must be signed in to change notification settings - Fork 0
Workflow
A typical workflow consists of preparing occurrence data, optionally adding metadata, building or loading a phylogenetic tree, and generating the linked tree-map visualization.
python -m phylogeoplot.preprocessing.format_gbif_data \
gbif_occurrences.csv \
node_names.csvpython -m phylogeoplot.preprocessing.add_metadata \
gbif_occurrences_formatted.csv \
trait_metadata.csvpython -m phylogeoplot.preprocessing.build_phylogenetic_tree \
sequences.fastafrom phylogeoplot.visualisation.tree_to_map_raster import PhyloGeoPlotter
plotter = PhyloGeoPlotter(
nwk_file="sequences_tree.nwk",
gps_file="coordinates.csv",
offset_file="offsets.csv",
raster_file="enviro.tif",
raster_band=1,
)
plotter.plot()
plotter.save(output_dir="output")Raster input is optional. PhyloGeoPlot can also generate linked phylogenetic and geographic visualizations without an environmental raster.
PhyloGeoPlot works with standard biological and geospatial data formats.
Phylogenetic trees are supplied in Newick (.nwk) format.
Trees may be generated externally or created from aligned sequence data using:
python -m phylogeoplot.preprocessing.build_phylogenetic_tree sequences.fastaGeographic occurrence data are supplied as CSV files containing taxon or specimen identifiers and geographic coordinates.
GBIF occurrence exports can be reformatted using:
python -m phylogeoplot.preprocessing.format_gbif_dataAdditional quantitative traits can be associated with occurrence records and represented using a continuous color scale in the visualization.
Examples include:
- caffeine concentration;
- environmental measurements;
- morphological traits;
- ecological measurements.
Environmental raster data can be supplied as GeoTIFF files.
Examples include:
- elevation;
- precipitation;
- temperature;
- vegetation indices;
- other continuous environmental variables.
Raster support is provided through Rasterio.
PhyloGeoPlot can apply the same trait-based color encoding to phylogenetic elements, mapped occurrences, and connecting lines.

This allows phylogenetic relationships, geographic distributions, and quantitative traits to be examined together within a single figure.
Please email us at: Nadia.Tahiri@USherbrooke.ca for any questions or feedback.