knitr::opts_chunk$set(echo = FALSE) library(drake) library(dplyr) library(ggplot2) all_di <- read.csv(here::here("analysis", "reports", "all_di.csv"), stringsAsFactors = F) all_di <- all_di %>% mutate(log_nparts = log(gmp:::as.double.bigz(nparts)), log_nsamples = log(nsamples), log_s0 = log(s0), log_n0 = log(n0)) %>% filter(n0 != s0, s0 != 1, !singletons, n0 != (s0 + 1)) %>% mutate(dat = ifelse(grepl(dat, pattern = "fia"), "fia", dat), dat = ifelse(dat == "misc_abund_short", "misc_abund", dat)) %>% mutate(Dataset = dat, Dataset = ifelse(Dataset == "fia", "FIA", Dataset), Dataset = ifelse(Dataset == "bbs", "Breeding Bird Survey", Dataset), Dataset = ifelse(Dataset == "mcdb", "Mammal Communities", Dataset), Dataset = ifelse(Dataset == "gentry", "Gentry", Dataset), Dataset = ifelse(Dataset == "misc_abund", "Misc. Abundance", Dataset))
overall_skew_results <- all_di %>% filter(s0 > 2, nparts > 20) %>% mutate(high_skew = skew_percentile_excl > 95) %>% group_by(Dataset) %>% summarize(proportion_skew_high = mean(high_skew), nsites_skew = dplyr::n()) overall_simpson_results <- all_di %>% filter(nparts > 20) %>% mutate(low_even = simpson_percentile < 5) %>% group_by(Dataset) %>% summarize(proportion_even_low = mean(low_even), nsites_even = dplyr::n()) overall_results <- left_join(overall_skew_results, overall_simpson_results) %>% rename("Proportion of communities with skewness above 95th percentile" = proportion_skew_high, "Number of communities analyzed for skewness" = nsites_skew, "Proportion of communities with evenness below 5th percentile" = proportion_even_low, "Number of communities analyzed for evenness" = nsites_even)
overall_results
Caption. Proportion of communities in each dataset with highly skewed or uneven SADs compared to their sampled feasible sets. For most datasets, considerably more communities are extremely skewed and uneven relative to their feasible sets than would be expected by chance: at random, only 5% of communities should fall in these extremes. The FIA database differs from all the others in that no more than 5% of its communities are extremely skewed, and only 9% of its communities are highly uneven.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.