Question 1

Amount of hexagons in each of the three datasets:
datb <- read.csv("~/Desktop/ANT109 FINAL ASSIGNMENT/species richness csv files/bird layer.csv", stringsAsFactors=TRUE)
datm <- read.csv("~/Desktop/ANT109 FINAL ASSIGNMENT/species richness csv files/mammal layer.csv", stringsAsFactors=TRUE)
datr <- read.csv("~/Desktop/ANT109 FINAL ASSIGNMENT/species richness csv files/reptile layer.csv", stringsAsFactors=TRUE)

nrow(datb) 
nrow(datm) 
nrow(datr)

The bird, mammal, and reptile datasets each have 63890 hexagons.


Combining the three files using the merge() function:
dat <- merge(datb, datm)
dat <- merge(dat, datr)


3-pannel graph showing the three distributions of NtvMamm, NtvBird, and NtvRept:
par(mfrow=c(1,3))

hist(dat$NtvBird, main = "Distribution of Native Birds", xlab = "Native Bird Species", col = "lightgreen", ylim=c(0,20000))

hist(dat$NtvMamm, main = "Distribution of Native Mammals", xlab = "Native Mammal Species", col = "skyblue", ylim=c(0,20000))

hist(dat$NtvRept, main = "Distribution of Native Reptiles", xlab = "Native Reptile Species", col = "lightcoral", ylim=c(0,20000))

The graphs display the distributions of native bird, mammal, and reptile species richness across hexagonal regions in California.


3-pannel graph showing the relationship between (i) NtvMamm and NtvBird, (ii) NtvMamm and NtvRept, and (iii) NtvBird and NtvRept:
par(mfrow = c(1, 3))

# Scatter plot: NtvMamm vs. NtvBird
plot(dat$NtvMamm, dat$NtvBird, main = "Native Mammals vs Native Birds", xlab = "Native Mammal Species", ylab = "Native Bird Species", col = "lightgreen", pch=22)

# Scatter plot: NtvMamm vs. NtvRept
plot(dat$NtvMamm, dat$NtvRept, main = "Native Mammals vs Native Reptiles", xlab = "Native Mammal Species", ylab = "Native Reptile Species", col = "skyblue", pch=22)

# Scatter plot: NtvBird vs. NtvRept
plot(dat$NtvBird, dat$NtvRept, main = "Native Birds vs Native Reptiles", xlab = "Native Bird Species", ylab = "Native Reptile Species", col = "lightcoral", pch=22)

The graphs show the relationships between native mammal, bird, and reptile species richness across hexagonal regions in California. Each graph displays a scatter plot depicting the relationship between two variables: Native Mammals and Native Birds, Native Mammals and Native Reptiles, and Native Birds and Native Reptiles.


Question 2

This map visualizes the distribution of native bird species richness across California. The deeper blue areas indicate a higher richness of bird species, while the lighter green areas indicate lower richness. As we can see from the map, bird species richness is the highest in the Sacramento Valley, the San Francisco Bay Area, and along the coasts, and the lowest in California’s desert region.
This map visualizes the distribution of native bird species richness across California. The deeper blue areas indicate a higher richness of bird species, while the lighter green areas indicate lower richness. As we can see from the map, bird species richness is the highest in the Sacramento Valley, the San Francisco Bay Area, and along the coasts, and the lowest in California’s desert region.