A Shiny app for mammalian brain cell-count scaling by phylogenetic generalized least squares (PGLS). Pick an X and a Y variable (any region × measure — mass, neurons, non-neuronal cells, densities), optionally restrict/colour by taxonomic Order, and predict Y from an entered X. The footer cites the exact data sources behind the current view.
App: [shinyapps.io link here]
The app (everything it needs at runtime):
| File | Role |
|---|---|
app.R |
the Shiny application |
cellcounts_wide.csv |
compiled cell-count data, one row per species |
cellcounts_long.csv |
same data in long form with a Source column (for the per-view citations) |
species.nwk |
phylogeny (Newick) |
species_order.csv |
Species → Order/Family lookup (for the Order filter) |
data-prep/ — how the tree & orders were made (not needed to run the app):
setup.R (regenerates species.nwk + species_order.csv from published sources),
the source inputs (base_tree.nex, the VertLife tree-pruner-*.zip, the Upham
taxonomy Data_S1_*.zip, species_list_vertlife.txt), the diagnostic tree plots,
and TREE_README.md (full provenance + all citations with DOIs).
build_tree.Randmake_species_order.Rat the top level are deprecated stubs (the two scripts are now combined indata-prep/setup.R) — safe to delete, along with.DS_Store/.Rhistory/.Rproj.user.
shiny::runApp() # from this folderNeeds: shiny, ggplot2, caper (pulls in ape), dplyr.
rsconnect::deployApp(".").rscignore keeps the bundle minimal — only app.R + the four data files are
uploaded; data-prep/ and the big source zips are not.
- Put the inputs in
data-prep/(a VertLifetree-pruner-*.zipfrom https://vertlife.org/phylosubsets/ usingspecies_list_vertlife.txt, and the Upham taxonomyData_S1_*.zipfrom Dryad https://doi.org/10.5061/dryad.tb03d03). - Open
data-prep/setup.R, set the working directory todata-prep/, and run it. It writesspecies.nwk+species_order.csvback here and the tree plots indata-prep/.
Phylogeny & taxonomy: Upham, Esselstyn & Jetz (2019), PLOS Biology 17:e3000494
(https://doi.org/10.1371/journal.pbio.3000494). Cell-count data compiled by
A. de Sousa from Herculano-Houzel et al. 2015/2020, Avelino-de-Souza et al. 2025,
Dos Santos et al. 2017/2020, Jardim-Messeder et al. 2017, Kverková et al. 2018,
Burish et al. 2010. Full citations with DOIs and per-graft references:
data-prep/TREE_README.md. The app footer also lists, per view, the exact sources
behind the plotted variables.
A brain region can't outweigh the whole brain, so for sub-region mass variables the app drops any species whose region mass exceeds whole-brain mass and reports the count (a safety net against source-unit errors). Subspecies in the data are represented by their species-level tip and averaged there.