Get credit for your reviews: Publons

This posts look like an advertisement, but it is not. I don’t even know who is behind this initiative, but reviewing is an important part of my job, and I think we should get better credit*.

Now I can get some credit easier. Basically, instead of listing in my CV my contributions as a reviewer, I can show them verified at Publons. I can also decide how much information I show about each one. Initially I though that I don’t feel like entering this data manually everytme I do a review, but they allow you to forward the review “thank you” email to them and they add it to your profile, so this makes it quite easy to keep an updated profile. Would be cool that the Journals do that automatically via ORCID, but this is another battle I suspect. And with this tool, you can even calculate pubcreds, if you want!

In any case, the web is easy to use and the guys are very responsive, so I hope this kick off.

*In a nutshell: I advocate for a double blind process, and full disclosure of all names (authors and reviewers) when a decision is made. Until this happens, I sign my reviews.

Which plants are the influencers in plant-pollinator networks?

My PhD looked at two invasive plants that has contrasting effects on the native plant-pollinator network. Since then we advanced quite a lot on understanding why superabundant invasive plants with high reward levels can influence others via its shared pollinators, but other less abundant or rewarding exotics don’t. Today, we have a new synthesis paper (Open Access!) formalizing this ideas for any plant species in the network. We analyze lots and lots of plant-pollinator networks to find some generalities. The catch is that we use an index that calculates the potential for one plant to influence another plant. For example, if two plants share only one pollinator and this one do not visit anything else except this two plants, the influence will be very high. On the other hand, if this pollinator also visit lots of other plants, the influence will be lower (see the paper for details). The nice thing is that we can identify some plant traits that make them “influencers”, like plants offering abundant resources and open flowers. It’s a shame that we couldn’t tell (yet?*) if the influence is positive or negative, but at least we can identify key influential plants within the network.

*It may be a way to test for that and at some point we talked about a follow-up, but who knows…

Book: Nature’s economy, A History of Ecological Ideas

I had an uneasy feeling about not knowing enough about the history of ecology and after some googling I tried reading Nature’s economy (http://www.amazon.com/Natures-Economy-History-Ecological-Environment/dp/0521468345). I am glad I did. Despite the first 300 pages are a bit slow and deal with the historical process from White and Linneaus, to Thoreau passing through the key figure of Darwin, it’s well written and helps you understanding the different views of nature along our history, which range from “an enemy to tame” to “an entity to conserve”. I didn’t learn a ton from this part, but I enjoyed going through the well connected dots. However, the last ~100 pages were eyeopener and something I highly recommend its read to anyone in ecology. I think this part would do a great lecture to discuss in lab meetings and the like.

Before reading chapter IV, I had a set of snapshots in my head with niche theory, food-webs, Lotcka-Volterra models, the island biogeography theory, Gaia hypothesis, emergence properties of ecosystems, deterministic population dynamics, and so forth… But connecting all this dots through history helped me a lot to understand where we are coming from. It feels that knowing the historical development of the subject helps seeing some historical constrains and even helps re-evaluate the kind of ecology we are doing (e.g. why I am closer to community ecology than to population ecology?). I am not going to try to summarize this last chapter IV here because I would do a poor job, but I think it can be read as a stand alone text, and I encourage you to have a look. If you know any other short-ish summary of the main development of ideas in ecology let me know in the comments. I feel is good to see different viewpoints on this kind of historical perspectives and also is always good to go through it a few times in order to interiorize the story.

What I expect from ESA 2014 (biodiversity, global change, pollination, networks and more)

This is blog post that will appear in J. of Ecology blog soon, but in the meanwhile I thought would be good to post it here as ESA is already starting. Hope to see you there!

———————–

Its always exciting to prepare for ESA. Here are some recommendations for people interested in biodiversity, global change, pollination, networks and more. As you can see, my interests tend to be wide and hence I tended to run a lot among sessions in the last editions. My plan this year is to run less and attend full sessions, and let talks within those sessions surprise me. A couple of symposiums looks really cool, like the plants and climate change with Camille Parmesan as moderator. I was also positively surprised by the Ignite talks last year and the one on theory versus empiricism looks promising. If you are into reconciling theory and reality (I am) the talk by Simon Levin and the symposium on theory and conservation biology are a must. One big recommendation if you don’t know yet the ROpenSci people is one of his workshops to learn not only about cool R package to retrieve species occurrence data, but about reproducibility and open science in general. For the ones interested in pollination there is plenty this year. I plan to learn more about citizen science at the symposium on the great sunflower project and there is the usual Pollination I and II sessions. This year I’ll present a pretty cool, but specialized talk about bee tongue lengths, but the work I am really exited about and I think will be of general interest is presented by James Reilly. He will present ongoing work where we show that number of species (e.g. pollinators) needed to fulfil a given ecosystem function increases as you increase the scale of inference. I believe its very interesting not only for pollinator, but for BEF people. As opposed to the pollination talks, mutualistic network talks are very scattered among the sessions, but there are quite a lot of them in different sessions and, unfortunately, several overlaps in time. A good place to start is the Species Interactions III. Lastly what I really expect of ESA is to talk with a lot of people, specially new people, so if you want to chat with me about anything, you can find me @ibartomeus.

How to update and backup a MySQL database under version control and all within Rstudio

I am trying to have better workflows to ensure data quality and two important things for me are first, scripting as much as posible the data manipulation process, and second, backing up the database we use under version control (e.g. Git*). I succeeded on that, but it was a 11 TAB problem**, so I though would be good post it here for others, and for my future self.

One goal of the task is to be able to do everything within the same program (Rstudio) for simplicity, so the task implies connecting R to MySQL server via RMySQL, update the database, make a backup copy from R and commit changes.

1) Running mysqldump from R to make an initial backup: RMySQL can’t (that I know) run the most commonly used backup mysqldump. But you can do it by calling the shell (aka Terminal) from R with the function system{base}.

#first we can see which is our path on the shell/terminal
system("pwd") #it should be the working directory.
#Second, we make a mysqldump (has to be in one non broken line,
 #sorry beautiful 80 characters-max code lines)
system("/Applications/MAMP/Library/bin/mysqldump -u USER -h HOSP_IP -pPASWORD --port=8889 --skip-extended-insert DATABASE > DATABASE.sql")
#note that my mysqldump is located in applications folder because 
 #instaled MySQL using MAMP (highly recommended for an easy set up 
 #of a local MySQL environment in a Mac). 
 #Yours may be in /usr/local/mysq/bin/mysqldump
#The --skip-extended-insert makes a INSERT for each row, 
 #which makes version control lighter and more readable later on.

2) Put the backup under version control. Rstudio provide a nice hook to git, so you just need to ‘git init‘ the directory, ‘git add DATABASE.sql‘  and ‘git commit‘ the changes with a nice commit message.

3) Connecting R to MYSQL server to update it: There are good tutorials on this, so I’ll be brief. In this example I manipulated data within R (your.data.frame) and want to append the resulting dataframe to an existing table.

library(RMySQL)
source(psw.R) # this is a way to avoid committing your password. 
 #You can have an r file (added to .gitignore) with the line 
 #psw <- "mypassword", which you can call later from the code.
conn <- dbConnect(dbDriver("MySQL"), user = "USER", 
                  password = psw, dbname="DATABASE", 
                  port = 8889 , host= "HOST_IP") 
#this set up the connection.
dbListTables(conn) # show tables
dbWriteTable(conn, "TABLE", your.data.frame, append = TRUE, 
             overwrite=FALSE, row.name=FALSE) 
#adds the new rows at the bottom of the table.
dbDisconnect(conn) #always disconnect at the end.

4) Make another backup:

system("/Applications/MAMP/Library/bin/mysqldump -u USER -h HOSP_IP -pPASWORD --port=8889 --skip-extended-insert DATABASE > DATABASE.sql")

5) And finally you can make another commit reflecting the changes ‘git add DATABASE.sql‘  and ‘git commit’ with a nice commit message. You can compare the two versions now, and let anyone in the project play with it by pushing it to a central repo (e.g. Github).

I am sure there are other ways to do this, but I am pretty happy of how it works!

—-
*Git forces you to not only document changes, but explain why those changes are done in a nice story. So I prefer it to Audit Trail options in MySQL.
**Someone on the internet suggested to rate the difficulty of a problem in  the number of browser tabs you need to open in order to fix it. Sorry I forgot the source.

Is Uppsala city a Bumblebee hotspot?

Sorry, no data to backup my thoughts today… but I feel that the number of bumblebees I saw in the last two years doubles the previous 30 years of my life. Uppsala is a smallish city in Sweden. Has lots of flowers (along all the season), cool summers (from my spanish perspective I may even say cold) and patches of semi-natural grasslands and forests mixed within the city. And lots of bumblenees. Mostly B. terrestris, and B. lapidarius, but I also see frequently B. pascuorum and B. hypnorum, and is not rare to see B. hortorum*.

I don’t make an effort to look for them, but I saw them waiting for the train to pass (yes, railroads have a lot of flowers) or when I am playing with the kids. Walking in spring in the forest patches within the city implies watching your feet to avoid steeping into queens. I even spotted two different bumblebee nests (B. terrestris and B. lapidarius) using man-made structures in playgrounds. Common! I’ve not seen any another natural bumblebee nest in the rest of my life, despite looking for them in several occasions.

I was talking yesterday with a colleague that is surveying bumblebee in grasslands and forests around the city and he is frustrated because he sees very few bumblebees**. So it’s not only Sweden which has lots of bumblebees, but particularly small “green” cities. Maybe cities are really good habitat after all, at least for a few species (See also NYC bees). The same pattern can be seen in bird species, where a few species thrive in cities, so probably I am not saying anything new.


*Id’s on the fly
**4 individuals /8 hours in an area with some flowers in a nice sunny day! that’s the worst day, usually he gets ~20 though

Invasive plants and plant pollinator networks

We have a new article revisiting the topic of my PhD thesis, but with a twist. Invasive plants effects on network modularity. Back then I already explored a bit the effects of invasive plants on the modular structure of the plant-pollinator community, but I never published any result, among other things because I didn’t understand well what I was doing. That’s why when Matthias asked me to join his paper addressing this question with a bigger dataset I was very happy to give it a second try.

Now (6 years later!) I understand two key things way better. First, that invasive plants have different roles in the network than natives, not because they are not native, but because of its different characteristics (i.e. very abundant and generalized). Second, that it is more interesting to understand how the roles that different species play within the network change, than how the overall network structure change, mainly because very different networks can present very similar structures (i.e. nested and modular). I think we nicely present this two points in the paper. See the figure below, and read the paper if you a curious about knowing more.

Ntw

J.A Valverde: Memories of an heterodox biologist

A friend of mine recommended me to read Valverde’s autobiography, both because I am moving to the Doñana Biological Station, of which he was the main advocate, and because the book is really awesome. In fact, he writes really well and the book is full of fun stories and subtle puns (not sure if it’s translated to english, though).

Valverde, as I see him after reading the books, is the perfect blend between the traditional English naturalist and the Spanish picaresque. He had a pretty rough childhood including a pretty bad tuberculosis in the midst of the spanish civil war. With no official studies he learnt ecology the hard way by reading whatever book he can find and collecting observations of the fauna around his home town. While reading it I really regretted not being a better naturalist myself and now I really want to get out of my computer and just look at nature for a while. He also had a great ego (which is see as a positive thing). As an example, I love when after years of collecting observations on bird communities around his home town, he reads Elton influential book and says something like he didn’t learnt anything new in Elton’s that he had not discovered himself before, but that the book was very good to put names to familiar concepts. And I believe that is true and not arrogance. How Doñana Biological Station was created is also quite epic, and i didn’t know that they (WWF, among others) actually bought the lands to create the reserve. Really if there is a will, there is a way. However, is quite astonishing also to see its actual destruction despite the conservation efforts.

But read it, is long but easy to read (start for volumes I and IV), and you will get a glimpse of how ecology developed in Spain* since the 1930’s.

* in Valverde’s words, the two main revolutions in the field of ecology in Spain were the Peterson bird guide and the SEAT 600 car; the first allow anyone to identify birds effortless, and the second to travel around.

Winners and losers of land use intensification

We have a new paper out showing which pollinators are more affected by land use intensification and which can cope with it quite well in New Zealand. There is a clear agreement that we should move beyond general species richness patterns, and understand each species specific response. Probably is not surprising that e.g., the invasive Bombus terrestris is doing great while bees in the native genus Leioproctus are struggling with land use intensification. However, most pollinator studies are still mainly based on richness and abundance metrics (Winfree et al 2011). That’s why we really wanted to see not only compositional changes, but also functional changes. At the end, identifying the traits of the winners and losers was the most interesting part of the paper.

As usually happens to me, I entered this article on the analysis phase, which means I can not tell you how cool is NZ, because I’ve never been there. However, I can tell you that the stats cover a lot of ground (may be too much and we lose a bit of focus?) and try to make a good use of functional diversity metrics (see here the code used to separate FD and richness effects) and species identity sensitivity to land use intensification.

Marking bees with glow-in-the-dark powder

Lab notebook style post to keep record of pilot experiments I run. We used one day this spring to see if we can track what bumblebee queens are doing. We captured queens and applied a colored powder to them. The idea is to see if we can find the powder in flowers after that, to see where and what they visit.

Lessons learned:

  • Capturing queens is time-consuming. 12 queens – 6 hours.
  • Marking them is super easy. Only a tiny bit of powder in the vial is enough. Inside the vial bees buzz and cover themselves completely.
  • First tests with too much powder were bad (bees too covered, see photo below)
  • We used glowing in the dark powder (sold in 8 colors in amazon) in case it helps spot it later with a UV light (also very cheap at amazon).
  • Very few flowers are open at this stage of the year, so we targeted a few Salix at different distances from the marking area along a power line corridor, and look for powder in Salix flowers after 6 hours.
  • We recovered a single flower with powder, but was in a Salix 500m down the corridor (not bad)
  • Not convinced on this technique for queens, but may work better for workers, when you can mark 100’s of bees.

As always we only had bad phone cameras, here is a photo of the first trial with way too much powder used. This bee was seen 1 h. after the release flying happily.Bee_glow