knitr::opts_chunk$set(echo = FALSE)
Elita Baldridge's community abundance dataset.
library(dplyr) library(ggplot2) ma <- MATSS::import_retriever_data("community-abundance-misc") names(ma) head(ma$community_abundance_misc_main) ma_totals <- ma$community_abundance_misc_main %>% group_by(site_id) %>% summarize(nspp = n(), nind = sum(abundance)) %>% ungroup() ma_plot <- ggplot(data = ma_totals, aes(x = nspp, y = nind)) + geom_point(alpha = .5) + theme_bw() + ggtitle("S and N for Misc Abund Dataset") ma_plot
ma_small <- ma_totals %>% filter(nspp <= 100, nind <= 40000) ma_small_plot <- ggplot(data = ma_small, aes(x = nspp, y = nind)) + geom_point(alpha = .5) + theme_bw() + ggtitle("S and N for Misc Abund Dataset - only small communities") ma_small_plot
Mammal community database
mcdb <- MATSS::import_retriever_data("mammal-community-db") mcdb_totals <- mcdb$mammal_community_db_communities %>% filter(presence_only == 0) %>% group_by(site_id) %>% summarize(nspp = n(), nind = sum(abundance)) %>% ungroup() mcdb_plot <- ggplot(data = mcdb_totals, aes(x = nspp, y = nind)) + geom_point(alpha = .5) + theme_bw() + ggtitle("S and N for MCDB") mcdb_plot
gentry <- MATSS::import_retriever_data("gentry-forest-transects") gentry_totals <- gentry$gentry_forest_transects_counts %>% group_by(site_code, line) %>% summarize(nspp = n(), nind = sum(count)) %>% ungroup() gentry_plot <- ggplot(data = gentry_totals, aes(x = nspp, y = nind)) + geom_point(alpha = .5) + theme_bw() + ggtitle("S and N for Gentry") gentry_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.