The state of California tracks native species population as part of conservation efforts. They measure native species richness for species biodiversity and the overall species range distribution in California for the California Department of Fish and Wildlife (CDFW).
The native species richness are represented in each 2.5 square mile hexagons, where bird, mammal, and reptile species was counted. There are 63,890 Hexagons in each three category of species.
Resources: Merge: https://stackoverflow.com/questions/1299871/how-to-join-merge-data-frames-inner-outer-left-right
RGB Color with transparency: https://rgbcolorpicker.com/0-1
bir <- read.csv("~/Desktop/ANT 109/species richness csv files/bird layer.csv", stringsAsFactors=TRUE)
mam <- read.csv("~/Desktop/ANT 109/species richness csv files/mammal layer.csv", stringsAsFactors=TRUE)
rep <- read.csv("~/Desktop/ANT 109/species richness csv files/reptile layer.csv", stringsAsFactors=TRUE)
m2<-merge(bir,mam, by="Hex_ID")
m<-merge(m2,rep, by="Hex_ID")
par(mfrow=c(1,3))
hist(m$NtvBird,col="#ff000080",xlab="Native Species Count", main="Bird Distribution",ylab="Species Range Distribution (Hexagons)")
hist(m$NtvMamm,col="#ffff0080",xlab="Native Species Count",main="Mammal Distribution",ylab="Species Range Distribution (Hexagons)")
hist(m$NtvRept,col="#b300cc80",xlab="Native Species Count",main="Reptile Distribution",ylab="Species Range Distribution (Hexagons)")The graphs shows the species richness of bird, mammal, and reptile through native species count and the frequency of species range per hexagon in California.
Resource: Inputting two histogram in one plot: https://stackoverflow.com/questions/3541713/how-can-i-plot-two-histograms-together-in-r
par(mfrow=c(1,3))
###Graph 1###
hist(bir$NtvBird,col=rgb(1,0,0,0.5),xlab="Native Species Count",main="Bird vs Mammal Distribution",ylim = c(0,20000),ylab="Species Range Distribution (Hexagons)")
hist(mam$NtvMamm,col=rgb(1,1,0,0.5), add=T)
###Graph 2###
hist(mam$NtvMamm,col=rgb(1,1,0,0.5),xlab="Native Species Count",main="Mammal vs Reptile Distribution",ylim=c(0,20000),ylab="Species Range Distribution (Hexagons)")
hist(rep$NtvRept,col=rgb(0.7,0,0.8,0.5), add=T)
legend("topright", legend=c("Bird", "Mammal", "Reptile"),
col=c("#ff000080","#ffff0080","#b300cc80"), cex=1.5,title="Legend", text.font=4,pch=19)
###Graph 3###
hist(bir$NtvBird,col=rgb(1,0,0,0.5),xlab="Native Species Count",main="Bird vs Reptile Distribution", ylim=c(0,20000),ylab="Species Range Distribution (Hexagons)")
hist(rep$NtvRept,col=rgb(0.7,0,0.8,0.5), add=T)The graphs shows compares relationships between the three categories of species in range distribution (hexagons) and species richness in California. In the left graph, bird has the least hexagons but with highest diversity (number of species) compared to the mammals. In the center graph, reptile have the most hexagons but the least diversity compare to mammals. In the right graph, bird has the highest diversity while reptile has more hexagons.