Skip to content
This repository was archived by the owner on May 10, 2022. It is now read-only.

rmangal blogpost #525

Merged
merged 35 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5b6ad58
fix a typo in readme :pencil:
Oct 10, 2019
5f2c482
add rmangal blogpost
Oct 11, 2019
64a8874
review KevCaz 1
Oct 14, 2019
3fe6bab
review content
SteveViss Oct 15, 2019
175f64d
review 2 steve
SteveViss Oct 15, 2019
1c90515
kev edits
Oct 15, 2019
8dc3e15
Merge branch 'master' of https://github.com/ropensci/roweb2
Oct 15, 2019
6f415fd
use the right date
Oct 15, 2019
52c28a7
Last review Steve
SteveViss Oct 15, 2019
21985ec
last kc edits
Oct 15, 2019
ce24067
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
4cb2fa3
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
bda8d5d
remove hypertext link in title
Oct 16, 2019
f8aeaad
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
9765142
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
f5e787e
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
9177aba
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
a5a131d
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
496d912
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
de9de55
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
af277ee
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
0fbbaf6
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
ec571e1
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
b49727e
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
4b17531
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
603b2b6
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
1104819
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
5e7dbbb
Update content/blog/2019-10-21-rmangal.md
Oct 16, 2019
bc4ec83
Remove link to first version; use ecosystem functioning
SteveViss Oct 16, 2019
3487f18
add links at the end of the post
SteveViss Oct 16, 2019
ab66025
Add hyperlink
SteveViss Oct 16, 2019
ae9adde
Add example
SteveViss Oct 16, 2019
b36c7bf
Update content/blog/2019-10-21-rmangal.md
SteveViss Oct 17, 2019
8d39972
Update content/blog/2019-10-21-rmangal.md
SteveViss Oct 17, 2019
57afc08
Update content/blog/2019-10-21-rmangal.md
SteveViss Oct 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/authors/kevin-cazelles/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
name: Kevin Cazelles
twitter: KCazelles
link: https://kevcaz.github.io/
github: KevCaz
orcid: 0000-0001-6619-9874
---
7 changes: 7 additions & 0 deletions content/authors/steve-vissault/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Steve Vissault
link: http://steveviss.github.io/
github: SteveViss
twitter: SVissault
orcid: 0000-0002-0866-4376
---
154 changes: 154 additions & 0 deletions content/blog/2019-10-21-rmangal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
slug: rmangal
title: 'rmangal: making ecological networks easily accessible'
date: 2019-10-21
authors:
- Kevin Cazelles
- Steve Vissault
categories: blog
topicid: 1848
tags:
- Software Peer Review
- R
- packages
- open-data
- data
- data-access
- ecology
- ecological networks
- API
- API client
- Mangal
- rmangal
---


In early September, the version 2.0.0 of [rmangal][rmangal] was approved by
rOpenSci, four weeks latter it made the CRAN. Following-up on our experience we
detail below the reasons why we wrote rmangal, why we submitted our package to
rOpenSci and how the peer-review improve our package.



### [Mangal](https://mangal.io/#/), a database for ecological networks

Ecological networks are defined as a set of species populations (the nodes of
the network) connected through ecological interactions (the edges). Interactions
are ecological processes in which one species affects another. Although
predation is probably the most known and documented interaction, other less
noticeable associations are just as essential to ecosystem functioning. For
instance, a mammal that unintentionally disperses viable seeds attached to his
fur might help plants to thrive. All of these interactions occur simultaneously,
shaping ecosystems functioning and making them as complex as they are
fascinating.

Recording and storing properly these interactions help ecologists to better
understand ecosystems. That is why they are currently compiling datasets to
explore how species associations vary over environmental gradients and how
species lost might affect ecosystems functioning. This fundamental research
question should help us understanding how ecological networks will respond to
global change. To this end, the Mangal project <https://mangal.io/#/>
standardizes ecological networks and eases their access. Every dataset contains
a collection of networks described in a specific reference (a scientific
publication, a book, etc.). For every network included in the database, Mangal
include all the species name and several taxonomic identifiers
([gbif](https://www.gbif.org/), [eol](https://eol.org/),
[tsn](https://www.itis.gov/) etc.) as well as all interaction and their type.
Currently, Mangal includes 172 datasets, which represents over 1300 ecological
networks distributed worldwide.



### An R client to make ecological networks easily accessible

In 2016, the first paper describing the project was published[^original_ref]. In
2018, a substantial effort was put in order to improve the data structure and
gather new networks from existing publications. In 2019, the web API was
rewritten, a new website launched and hundreds of new interactions were added.

{{< figure src="/img/blog-images/2019-10-22-rmangal/mangal_explorer.png"
alt="write an alternative text describing the information contained in the image" width="100%" >}}

Because of all these modifications, the [first version of
rmangal](https://github.com/mangal-wg/rmangal-v1), the R client for the web API,
was obsolete and a new version needed. It is worth explaining here why the R
client is an important component of the Mangal project. Even though Mangal has a
documented [RESTful API](https://mangal.io/doc/api/), this web technology is not
commonly used by ecologists. On the contrary, providing a R client ensures that
the scientific community that document these interactions on the field can
access them, as easily as possible. The same argument holds true for the [Julia
client](https://mangal.io/doc/jl/) that [Timothée Poisot](https://poisotlab.io/)
wrote because [Julia](https://julialang.org/) is increasingly popular among
theoreticians, that can test ecological theory with such datasets.

We had two main objectifs for [rmangal 2.0.0][rmangal]. First, the rmangal
package had to allow users to search for all entries in the database in a very
flexible way. From a technical point this means that we had to write functions
to query all the endpoints of the [new web API][API]. The second goal was to
make the package as user friendly as possible. To do so, we used explicit and
consistent names for functions and arguments, designed a simple workflow, and
documented how to use other field related packages (such as [igraph][igraph]) to
visualize and analyze networks. All of this is explain in the vignette ["get
started with rmangal"](ttps://ropensci.github.io/rmangal/articles/rmangal.html).



### A successful peer-review process

<!-- version to prerelease -->
After some hard work behind the screen and once we deemed our two objectifs
achieved, we decided to submit rmangal package to rOpenSci for peer-review. We
did so because we needed feedback, we needed qualified people to critically
assess whether our two main objectifs were achieved. Given the strong expertise
of rOpenSci in software review, and given that our package was in-scope,
submitting rmangal to rOpenSci was an obvious choice.

We [had very valuable
feedback](https://github.com/ropensci/software-review/issues/332) from [Anna
Willoughby][arw36] and [Thomas Lin Pedersen][thomasp85]. They carefully assessed
our work and pointed out areas where improvement was required. One good example
of how their review made our package better concerns the dependencies. We
originally listed [sf][sf] in `Imports` as we used it to filter networks based
on geographic coordinates. But the reviewers pointed out that this was not an
essential part of the package and that [sf][sf] has several dependencies. This made us realize that for one extra feature, we were substantially
increasing the number of indirect dependencies. Following the reviewers'
suggestions, we moved [sf][sf] to `Suggests` and added a message to warn users
that to use the [spatial filtering
feature](https://ropensci.github.io/rmangal/articles/rmangal.html#geolocalize-mangal-networks-with-sf)
requires sf to be installed. Similarly, based on another good comment, we
added a function to convert Mangal networks into [tidygraph][tidygraph] objects
and we documented how to plot Mangal networks with [ggraph][ggraph] (and so we
added those packages in `Suggests`). Such improvements were very helpful to
properly connect rmangal to the existing R packages. The plethora of R packages
is one of its major strength, and connecting a package properly to other makes
the entire ecosystem even stronger.

<!-- Future -->
We are now looking for user feedback, not only for rmangal but also for the web
API and the website. We welcome suggestions and contributions, especially for
the documentation. In the future, we envision that rmangal will integrate
functions to format ecological networks for ecologists willing to add their
datasets to Mangal. This will likely be the next major release of rmangal.



### Acknowledgments

We are thankful to all [contributors to
rmangal](https://ropensci.github.io/rmangal/authors.html) and to all ecologists
that have spent countless hours in collecting data. We would like to thank [Anna
Willoughby][arw36] and [Thomas Lin Pedersen][thomasp85] for thorough reviews as
well as [Noam Ross](https://github.com/noamross) for handling the review
process.

[^original_ref]: Poisot, T. et al. mangal - making ecological network analysis simple. Ecography 39, 384–390 (2016).


[arw36]: https://github.com/arw36
[thomasp85]: https://github.com/thomasp85
[igraph]: https://igraph.org/r/
[tidygraph]: https://tidygraph.data-imaginist.com/
[ggraph]:https://ggraph.data-imaginist.com/
[rmangal]: https://ropensci.github.io/rmangal/
[API]: https://mangal.io/doc/api/
[sf]: https://cran.r-project.org/web/packages/sf/index.html
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ See [editorial suggestions](#blog-post-editorial-suggestions). Before that, tech

1. [Fork the repo](https://happygitwithr.com/fork-and-clone.html)
2. Create a new file in `/content/blog/YEAR-MONTH-DAY-slug.md`, either directly or after developing it in a separate project. i.e. working on an R Markdown file in a separate RStudio project and then moving the images and Markdown output to your fork of the website
* [Markdown template](2019-06-04-post-template.md),
* R Markdown template: either [to be copy-pasted](https://github.com/ropenscilabs/rodev/blob/master/inst/rmarkdown/templates/ropensci-blog-post/skeleton/skeleton.Rmd) or install [`rodev`](https://docs.ropensci.org/rodev/) via `remotes::install_github("ropenscilrodev")` after which in RStudio you can click on `File > New File > R Markdown... > From Template > rOpenSci Blog Post `to create the file.
* [Markdown template](2019-06-04-post-template.md),
* R Markdown template: either [to be copy-pasted](https://github.com/ropenscilabs/rodev/blob/master/inst/rmarkdown/templates/ropensci-blog-post/skeleton/skeleton.Rmd) or install [`rodev`](https://docs.ropensci.org/rodev/) via `remotes::install_github("ropensci/rodev")` after which in RStudio you can click on `File > New File > R Markdown... > From Template > rOpenSci Blog Post `to create the file.

3. Your post must include YAML in this format:

Expand Down Expand Up @@ -55,7 +55,7 @@ tags:
{{< figure src="/img/blog-images/<DATE-SLUG>/name-of-image.png" alt="write an alternative text describing the information contained in the image" width="500" >}}
```

6. Once you've drafted your blog post, you can [preview locally using Hugo](#installing-hugo-for-local-preview) or skip to the next step to preview on the pull request.
6. Once you've drafted your blog post, you can [preview locally using Hugo](#installing-hugo-for-local-preview) or skip to the next step to preview on the pull request.

7. Send a pull request from your fork at least one week prior to the post date to allow time for review. Netlify will start building the new version of the site within seconds and you can preview you changes to make sure everything looks as intended. Otherwise push additional fixes till things look right.

Expand All @@ -73,8 +73,8 @@ tags:
- If you would like a specific image from your post to be featured in tweets that include a link to your post, add to YAML `twitterImg: img/blog-images/<DATE-SLUG>/name-of-image.png`. Omit the leading `/`
- Use ### or #### to format headings in your post; larger sizes don't look good. Note long headings with #### don't wrap well.
- Spell 'rOpenSci', not 'ROpenSci'
- For references, put `[^1]` after the text you want to cite in body of the post, and put `[^1]: citation details` at the end of the post. They will link to each other. Example in this post [markdown](https://raw.githubusercontent.com/ropensci/roweb2/master/content/blog/2019-04-18-ropensci-mee.md) -> [rendered](https://ropensci.org/blog/2019/04/18/wild-standards/).
- Check to see if you're listed on [our authors page](https://ropensci.org/authors/). If you are listed, consider updating the links to your online presence in the author's index file. If not, create an [author's index file for yourself](#author-file).
- For references, put `[^1]` after the text you want to cite in body of the post, and put `[^1]: citation details` at the end of the post. They will link to each other. Example in this post [markdown](https://raw.githubusercontent.com/ropensci/roweb2/master/content/blog/2019-04-18-ropensci-mee.md) -> [rendered](https://ropensci.org/blog/2019/04/18/wild-standards/).
- Check to see if you're listed on [our authors page](https://ropensci.org/authors/). If you are listed, consider updating the links to your online presence in the author's index file. If not, create an [author's index file for yourself](#author-file).

##### Instructions for posts about peer-reviewed packages

Expand All @@ -94,7 +94,7 @@ For a post about your experience as a reviewer you can browse other posts with t

If you don't already have one, create `_index.md` in `roweb2/content/authors/firstname-lastname/` with information about your online presence. Keep accents in your name. If you're not sure of how to slugify/urlize your name, look at other people's folder names for examples.

[Template for an author file](author-name.md), Example
[Template for an author file](author-name.md), Example

```yaml
---
Expand All @@ -112,15 +112,15 @@ Example when rendered: [Kelly O'Briant's author page](https://ropensci.org/autho

At minimum, provide your name and at least one link or Twitter/GitHub/GitLab username. The `link` field is meant for your preferred online presence URL, to be filled only if you have one that's not your GitHub, GitLab or Twitter account. The `twitter`, `github`, `gitlab`, `keybase` and `orcid` fields are for your Twitter/GitHub/GitLab/Keybase/ORCID usernames/IDs (without "@").

Then when a reader clicks on your by-line in your blog post, tech note, or a community call you have presented in, they can see how to find you online, as well as seeing a list of all of those you have contributed.
Then when a reader clicks on your by-line in your blog post, tech note, or a community call you have presented in, they can see how to find you online, as well as seeing a list of all of those you have contributed.

### Installation requirements

There are no requirements to simply add a post/fix and push to GitHub for a render preview on a pull request. However, if you wish to preview the site locally, you must install Hugo.

#### Installing Hugo for local preview

The version of Hugo used by the server is defined in [netlify.toml](netlify.toml).
The version of Hugo used by the server is defined in [netlify.toml](netlify.toml).

To install Hugo locally, refer to [Hugo docs](https://gohugo.io/getting-started/installing/) or run `blogdown::install_hugo()`.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.