Contact Us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right. 

Santa Cruz, CA

Vikram Baliga, PhD Candidate at UC Santa Cruz, member of the Mehta Lab. Areas of study: ecology, ontogeny, morphometrics, and comparative methods.


A Foray into Interactive Graphics

Vikram Baliga

I've long been fascinated by interactive graphics, especially when plotting complex datasets. I'm most drawn to the ability to 1) hover over data and see values, and 2) hide or reveal data from the visualization. This second point is especially important when dealing with issues of overplotting, which is definitely a concern for data that contain multiple species/groups.

There's a pretty substantial variety of methods one can use to generate these graphics, ranging from employing simple Google Charts to fine-tuning plots via the powerful D3.js JavaScript library. A happy medium I've found is to use Plotly.

Here's an example using data from a recent paper of mine. I collected an ontogenetic series of specimens for each of 11 species of wrasses. These wrasses are part of a monophyletic group that comprises the genera Thalassoma and Gomphosus. Within this group, several species are known to engage in cleaning predominately when they are small juveniles. These juvenile cleaners then shift to consuming benthic or nektonic invertebrates as adults. The assemblage of prey species in these adult diets is fairly similar to that which non-cleaner congeners consume throughout ontogeny.

After collecting morphological data, I used the program MandibLever (created by Dr. Mark Westneat) to generate simulations of the bite force each specimen could produce. These data are plotted against the size of the specimen to show ontogenetic patterns for each species. This reveals a pretty interesting trend: as juveniles, species that clean (in orange) show lower bite forces than non-cleaner congeners (grey). As these species approach adulthood, the distinctions between these groups of species begins to blur.

Ontogeny of Estimated Bite Force in Thalassoma Wrasses

This graphic essentially re-creates Fig 1C in the paper, with the added advantage of being able to turn on/off elements in the plot. Click on any element in the legend to show or reveal it in the scatterplot. Hovering over elements in the plot reveals additional details about the data. By default, I've hidden the data themselves (i.e. the symbols corresponding to the species) to just present the regressions. But this can easily be changed with a few mouse clicks. I hope to eventually find some way to simplify the way the legend is presented, but this will do for now.

Pretty cool!