is.invasive( )

Celebrating that I am contributing to the blog aggregator I am going to post a very simple function to check which species (both plants and animals) are considered “invaders” somewhere in the world. Basically the function asks that to the Global Invasive Species Database (GISD).

I coded this because a friend of mine aks me precisely that question [Yes, friends assumes you should know this kind of stuff (and also why the plants of their balcony are dying) off the top of your head just because you are a biologist]. However, I do not know much things and I am too lazy to check all 250 species one by one on the GISD webpage. Also is a good R practice, and I am ok investing some work time on personal projects. Google (and other big companies) encourage it’s employees to spend 20% of the time working on projects that aren’t necessarily in their job descriptions in order to bust its innovation power, so that should be even more important in science!

Hope it can be useful to more people, I uploaded the code as a Gist:

UPDATE: The function is now available on taxize R package developed by the rOpenScience people!

4 thoughts on “is.invasive( )

  1. Thank you for the post :)
    Can you please open the feed to show full post?
    (settings -> reading -> full instead of summary)

    Please update me by e-mail so I can refresh your post on r-bloggers.


  2. Nice function! I’m still learning R, so maybe I could figure out how to modify this eventually, but it would be handy if it could also return the “Geographical Range” section from the GISD. Also, what happens with misspellings? You code currently returns “Not invasive” but maybe what it should say is “Not listed in database.” That way someone might have a hint that it could be invasive still, but either misspelled or not big enough to have made it into the database.

    Thanks again!

    • Thanks,

      You are right about misspellings, but I expect no such errors from scientists (partially kidding). That’s easy to fix, just change the line [Out[i,2] <- "Not invasive"] for a more clear text. I may change that in the Gist.

      Regrding other database atributes, that will take some more coding and I see two issues. One is that information is stored in long text fields, which are not as useful as categorical variables for any analysis. The second one is that if you need all this info is probably more efficient to ask the ISSG people for access to the database, than scrap it from the web.

      Anyway, if you need "Geographical Range" for a lot of species for a particular project, let me know and we can work on it!

  3. Pingback: is_invasive( ) got a new best friend: is_native( ) | Bartomeus lab


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s