README.md

Description

Squamatabase is a database of prey items recorded in diet samples from the world's snakes, compiled by me, during my time as a PhD student at the University of Michigan.

Data archives

Each new release (corresponding to the addition of new data or new functionality) is archived in the Zenodo data repository and receives a DOI. Users who simply want the raw data without bothering with package installation can download the diet.csv file in the inst/ directory. The current archive contains around 30,000 predator-prey records sampled from around the world and many different snake lineages. Each point on the globe below represents a georeferenced predation event, and the bar graph to the left shows the snake family level distribution of those records.

sb_records

Installation

Squamatabase can be installed from an R session using the following command

remotes::install_github("blueraleigh/squamatabase")

Alternatively, the tarball for this repository can be downloaded and installed via R CMD INSTALL.

Getting started

library(squamatabase)

# For a list of available functions
?squamatabase

# For documentation of database structure
?diet
# To load the full record set we can do ...
data(diet)

# ... or we can do
diet = squamatabase::filter_records()
# To reproduce the graph above:

# Fetch the full record set
diet = squamatabase::filter_records()

# Filter the record set to weed out any miscellaneous non-snakes
diet = squamatabase::filter_records(diet, predator_taxon="Serpentes")

# Collapse all identified snakes to the level of taxonomic family
diet = squamatabase::collapse_ranks(diet, "family")

# Compute family-level counts
counts = pmin(diet$predator_count, diet$prey_count, na.rm=TRUE)
family_counts = sort(tapply(counts, diet$predator, sum, na.rm=TRUE))

# And finally the labor for the plot
dev.new(width=10.5, height=5)
close.screen(all.screens=TRUE)
split.screen(c(1, 3))
screen(2)
par(mar=c(0,0,0,0), oma=c(0,0,0,1))
plot.new()
plot.window(xlim=c(-1,1), ylim=c(-1, 1), asp=1)
maps::map(
    interior=FALSE, 
    proj="ortho", 
    orient=c(15, -90, 0),
    fill=TRUE, 
    col="#f6e8c3",
    mar=c(0,0,0,0), 
    add=TRUE
)
theta = seq(0, 2*pi, length.out=512)
polygon(cos(theta), sin(theta), col="#91bfdb")
maps::map(
    interior=FALSE, 
    proj="ortho", 
    orient=c(15, -90, 0), 
    fill=TRUE, 
    col="#f6e8c3", 
    add=TRUE
)
coords = mapproj::mapproject(
    diet$locality_longitude, 
    diet$locality_latitude, 
    proj="ortho", 
    orient=c(15, -90, 0)
)
points(coords$x, coords$y, col="#8c510a", pch="+", cex=0.8)
screen(3)
par(mar=c(0,0,0,0), oma=c(0,0,0,0))
plot.new()
plot.window(xlim=c(-1,1), ylim=c(-1,1), asp=1)
maps::map(
    interior=FALSE, 
    proj="ortho", 
    orient=c(15, 70, 0), 
    fill=TRUE, 
    col="#f6e8c3", 
    add=TRUE
)
polygon(cos(theta), sin(theta), col="#91bfdb")
maps::map(
    interior=FALSE, 
    proj="ortho", 
    orient=c(15, 70, 0), 
    fill=TRUE, 
    col="#f6e8c3", 
    add=TRUE
)
coords = mapproj::mapproject(
    diet$locality_longitude, 
    diet$locality_latitude, 
    proj="ortho", 
    orient=c(15, 70, 0)
)
points(coords$x, coords$y, col="#8c510a", pch="+", cex=0.8)
screen(1)
par(oma=c(0, 2, 0, 0), mar=c(5.1, 4.1, 2.1, 0.1))
barplot(family_counts, horiz=TRUE, cex.names=0.7, log='x', las=1, xaxt="n")
axis(1, at=c(1, 10, 100, 1000, 10000))
mtext("Number of prey items", 1, 2.5)

Database compilation

I compiled Squamatabase from numerous articles published in scientific journals. I located material both through the use of keyword queries in academic search engines and by systematic review of table of contents for well-known herpetological journals (e.g. Herpetological Review, Herpetology Notes). I also located additional relevant articles by consulting the references in reviewed articles. My goal was simply to track down as many relevant sources as possible. The current compilation includes data from approximately 1700 different sources but remains incomplete in many ways (e.g., geographically and taxonomically).

The majority of observations in the database result from papers describing (1) dissections of fluid preserved museum specimens and (2) direct encounters with snakes in the field that were actively consuming a prey or had recently consumed a prey item that could be regurgitated by forced palpation. Glaudas et al. (2017) have noted that these sources of information can provide different pictures of the prey spectrum for Bitis arietans (Puff Adder).

Database fields

Each record in the database describes a snake specimen eating or attempting to eat a prey specimen. Note that due to the nature of the published data a "specimen" does not necessarily correspond to a single individual. In all cases, however, a specimen refers to a set of individuals that belong to the same taxon. The following fields are associated with each record:

NOTE

All of the above fields with the exception of the svl field are also recorded for the prey specimen, and hence take the prefix "prey". Additionally, the following field is unique to the prey specimen:



blueraleigh/squamatabase documentation built on May 9, 2024, 11:07 a.m.