generated from quarto-ext/manuscript-template-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 first pass at some quantitative stuff
- Loading branch information
Showing
14 changed files
with
113 additions
and
9 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+76.5 KB
_freeze/index/figure-docx/notebooks-model_quantitative-fig-topology-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+76.5 KB
_freeze/index/figure-html/notebooks-model_quantitative-fig-topology-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+76.5 KB
_freeze/index/figure-jats/notebooks-model_quantitative-fig-topology-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
_freeze/notebooks/model_quantitative/execute-results/html.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "3c02c0ae4e362950344da631f9cb2eb3", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: Quantitative approach to topology generators\nauthor: Tanya Strydom\nbibliography: ../references.bib\n---\n\n\nI think in the long run I will probably turn the other repo ([BecksLab/topology_generators](https://github.com/BecksLab/topology_generators)) into a project that we can then access and I will port all of the working code here... I think it will just come down to what the 'cost' is of the computational side of things and how convoluted it might end up looking.\n\nAnyway so for now I am just pulling in the INTERIM data from some of the models. This uses (for now) 20 mangal [@poisotMangalMakingEcological2016] datasets and just generates some networks for using the niche and cascade models. The 'results' for now is just counting the number of links each model generates for each network because that's what my brain decided on doing...\n\n\n::: {.cell .hidden}\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\nlibrary(tidyverse)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ ggplot2 3.4.4 ✔ tibble 3.2.1\n✔ lubridate 1.9.3 ✔ tidyr 1.3.1\n✔ purrr 1.0.2 \n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\n# download file from other repo\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\", \"notebooks/data/topology_models.csv\")\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning in\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\",\n: URL\nhttps://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv:\ncannot open destfile 'notebooks/data/topology_models.csv', reason 'No such file\nor directory'\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning in\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\",\n: download had nonzero exit status\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\ndf = read.csv(\"data/topology_models.csv\")\n```\n:::\n\n\nLets just do a simple little plot where we plot real vs model observed\n\n\n::: {#cell-fig-topology .cell}\n\n```{.r .cell-code .hidden}\n#| echo: false\n#| label: fig-topology\n#| fig-cap: \"Real vs observed values for network summary statistics\"\n#| fig-alt: \"TODO\"\nggplot() +\n geom_abline(slope = 1,\n intercept = 0) +\n geom_point(data = df,\n aes(x = links,\n y = niche_links),\n fill = \"blue\",\n shape = 21,\n alpha = 0.7,\n size = 5) +\n geom_point(data = df,\n aes(x = links,\n y = cascade_links),\n fill = \"green\",\n shape = 23,\n alpha = 0.7,\n size = 5) +\n theme_bw()\n```\n\n::: {.cell-output-display}\n![Real vs observed values for network summary statistics](model_quantitative_files/figure-html/fig-topology-1.png){#fig-topology fig-alt='TODO' width=672}\n:::\n:::\n\n\n## References {.unnumbered}\n\n::: {#refs}\n:::", | ||
"supporting": [ | ||
"model_quantitative_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
_freeze/notebooks/model_quantitative/execute-results/xml.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "3c02c0ae4e362950344da631f9cb2eb3", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: Quantitative approach to topology generators\nauthor: Tanya Strydom\nbibliography: ../references.bib\n---\n\n\n\n\nI think in the long run I will probably turn the other repo ([BecksLab/topology_generators](https://github.com/BecksLab/topology_generators)) into a project that we can then access and I will port all of the working code here... I think it will just come down to what the 'cost' is of the computational side of things and how convoluted it might end up looking.\n\nAnyway so for now I am just pulling in the INTERIM data from some of the models. This uses (for now) 20 mangal [@poisotMangalMakingEcological2016] datasets and just generates some networks for using the niche and cascade models. The 'results' for now is just counting the number of links each model generates for each network because that's what my brain decided on doing...\n\n\n\n\n::: {.cell .hidden}\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\nlibrary(tidyverse)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ ggplot2 3.4.4 ✔ tibble 3.2.1\n✔ lubridate 1.9.3 ✔ tidyr 1.3.1\n✔ purrr 1.0.2 \n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\n# download file from other repo\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\", \"notebooks/data/topology_models.csv\")\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning in\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\",\n: URL\nhttps://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv:\ncannot open destfile 'notebooks/data/topology_models.csv', reason 'No such file\nor directory'\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning in\ndownload.file(\"https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv\",\n: download had nonzero exit status\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| include: false\n#| echo: false\ndf = read.csv(\"data/topology_models.csv\")\n```\n:::\n\n\n\n\nLets just do a simple little plot where we plot real vs model observed\n\n\n\n\n::: {#cell-fig-topology .cell}\n\n```{.r .cell-code .hidden}\n#| echo: false\n#| label: fig-topology\n#| fig-cap: \"Real vs observed values for network summary statistics\"\n#| fig-alt: \"TODO\"\nggplot() +\n geom_abline(slope = 1,\n intercept = 0) +\n geom_point(data = df,\n aes(x = links,\n y = niche_links),\n fill = \"blue\",\n shape = 21,\n alpha = 0.7,\n size = 5) +\n geom_point(data = df,\n aes(x = links,\n y = cascade_links),\n fill = \"green\",\n shape = 23,\n alpha = 0.7,\n size = 5) +\n theme_bw()\n```\n\n::: {.cell-output-display}\n![Real vs observed values for network summary statistics](model_quantitative_files/figure-jats/fig-topology-1.png){#fig-topology fig-alt='TODO'}\n:::\n:::\n\n\n\n\n## References {.unnumbered}\n\n::: {#refs}\n:::", | ||
"supporting": [ | ||
"model_quantitative_files/figure-jats" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": null, | ||
"postProcess": false | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id,richness,links,connectance,niche_links,cascade_links | ||
19,1327,9334,0.005300611211468492,9572,9292 | ||
12,101,150,0.014704440741103813,182,152 | ||
13,54,92,0.03155006858710562,99,100 | ||
18,29,38,0.04518430439952437,43,30 | ||
15,280,950,0.01211734693877551,929,970 | ||
3259,20,50,0.125,58,56 | ||
908,43,63,0.03407247160627366,75,58 | ||
23,19,20,0.055401662049861494,24,28 | ||
909,100,192,0.0192,208,186 | ||
946,96,343,0.03721788194444445,368,363 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Quantitative approach to topology generators | ||
author: Tanya Strydom | ||
bibliography: ../references.bib | ||
--- | ||
|
||
I think in the long run I will probably turn the other repo ([BecksLab/topology_generators](https://github.com/BecksLab/topology_generators)) into a project that we can then access and I will port all of the working code here... I think it will just come down to what the 'cost' is of the computational side of things and how convoluted it might end up looking. | ||
|
||
Anyway so for now I am just pulling in the INTERIM data from some of the models. This uses (for now) 20 mangal [@poisotMangalMakingEcological2016] datasets and just generates some networks for using the niche and cascade models. The 'results' for now is just counting the number of links each model generates for each network because that's what my brain decided on doing... | ||
|
||
```{r} | ||
#| include: false | ||
#| echo: false | ||
library(tidyverse) | ||
# download file from other repo | ||
download.file("https://raw.githubusercontent.com/BecksLab/topology_generators/main/data/topology_summary.csv", "notebooks/data/topology_models.csv") | ||
df = read.csv("data/topology_models.csv") | ||
``` | ||
|
||
Lets just do a simple little plot where we plot real vs model observed | ||
|
||
```{r} | ||
#| echo: false | ||
#| label: fig-topology | ||
#| fig-cap: "Real vs observed values for network summary statistics" | ||
#| fig-alt: "TODO" | ||
ggplot() + | ||
geom_abline(slope = 1, | ||
intercept = 0) + | ||
geom_point(data = df, | ||
aes(x = links, | ||
y = niche_links), | ||
fill = "blue", | ||
shape = 21, | ||
alpha = 0.7, | ||
size = 5) + | ||
geom_point(data = df, | ||
aes(x = links, | ||
y = cascade_links), | ||
fill = "green", | ||
shape = 23, | ||
alpha = 0.7, | ||
size = 5) + | ||
theme_bw() | ||
``` | ||
|
||
## References {.unnumbered} | ||
|
||
::: {#refs} | ||
::: |