Skip to content

Commit

Permalink
graphical abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
diazrenata committed Apr 22, 2021
1 parent 233e4fd commit b496d91
Show file tree
Hide file tree
Showing 13 changed files with 2,706 additions and 0 deletions.
Binary file added analysis/manuscript/old/MainTextR1 copy.docx
Binary file not shown.
Binary file modified analysis/manuscript/revision1/MainTextR1.docx
Binary file not shown.
Binary file modified analysis/manuscript/revision1/MainTextR1_hy.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
77 changes: 77 additions & 0 deletions analysis/reports/submission2/appendices/graphical_abstract.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: "Graphical abstract"
#author: Renata Diaz
date: "`r Sys.Date()`"
output:
github_document:
df_print: kable
toc: true
# word_document:
# df_print: kable
# toc: false
# reference_docx: style_reference.docx
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(drake)
library(dplyr)
library(ggplot2)
library(grid)
theme_set(theme_bw())
library(scadsanalysis)
```


```{r}
#
# mcdb <- load_dataset("mcdb")
#
# set.seed(1977)
# p <- filter(mcdb, site == 1944)
#
# p_samples <- sample_fs_wrapper(p, site_name = 1944, F, 200)
#
# p_di <- add_dis(p_samples)
#
# write.csv(p_di, "portal_di.csv")
# write.csv(p_samples, "portal_samples.csv")
portal_samples <- read.csv("portal_samples.csv") %>%
select(-X)
portal_di <- read.csv("portal_di.csv") %>%
select(-X)
```


```{r, fig.dim = c(2,2)}
portal_samples <- left_join(portal_samples, portal_di)
portal_samples <- portal_samples %>%
mutate(`Simpson's evenness` = simpson)
ga <- ggplot(filter(portal_samples, source == "sampled"), aes(rank, abund, group = sim, color = `Simpson's evenness`)) +
geom_line(alpha = .1) +
geom_line(data = filter(portal_samples, source == "observed"), size = 1.) + scale_color_viridis_c(option = "plasma", end = .8, direction = -1) +
theme(legend.justification = c(0,1.65), legend.position = c(0.01,1)) +
ggtitle("Observed SAD v. statistical baseline") +
ylab("Abundance") +
xlab("Rank") +
theme(axis.text.x = element_blank(), axis.ticks.x = element_blank(),
axis.ticks.y = element_blank(), axis.text.y = element_blank(),
plot.title = element_text(size = 8), panel.grid = element_blank(),
axis.title = element_text(size =7), plot.title.position = "plot",
legend.text = element_blank(), legend.title = element_blank(), legend.direction = "horizontal", legend.key.height = unit(1, units = "mm"), legend.background = element_blank()) +
geom_text(data = NULL, aes(x = 1.8, y = 210, label = "Evenness"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0) +
geom_text(data = NULL, aes(x = 1.8, y = 175, label = "low"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0) +
geom_text(data = NULL, aes(x = 9, y = 175, label = "high"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0)
ga
ggsave("graphical_abstract.pdf", plot = ga, device = "pdf", width = 50, height = 50, units = "mm")
```


While the classic "hollow curve" form of the SAD emerges from randomly dividing individuals between species, observed SADs are consistently much more uneven than the majority of forms that emerge at random. These deviations between observations and the statistical baseline may reflect biological processes shaping the SAD, and provide new leverage for using the SAD to evaluate and refine ecological theory.
14 changes: 14 additions & 0 deletions analysis/reports/submission2/appendices/graphical_abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Graphical abstract
================
2021-04-22

## Joining, by = c("sim", "source", "dat", "site", "singletons", "s0", "n0", "nparts")

![](graphical_abstract_files/figure-gfm/unnamed-chunk-2-1.png)<!-- -->

While the classic “hollow curve” form of the SAD emerges from randomly
dividing individuals between species, observed SADs are consistently
much more uneven than the majority of forms that emerge at random. These
deviations between observations and the statistical baseline may reflect
biological processes shaping the SAD, and provide new leverage for using
the SAD to evaluate and refine ecological theory.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
202 changes: 202 additions & 0 deletions analysis/reports/submission2/appendices/portal_di.csv

Large diffs are not rendered by default.

2,413 changes: 2,413 additions & 0 deletions analysis/reports/submission2/appendices/portal_samples.csv

Large diffs are not rendered by default.

0 comments on commit b496d91

Please sign in to comment.