And this little piggy went extinct

24 11 2021

Back in June of this year I wrote (whinged) about the disappointment of writing a lot of ecological models that were rarely used to assist real-world wildlife management. However, I did hint that another model I wrote had assistance one government agency with pig management on Kangaroo Island.

Well, now that report has been published online and I’m permitted to talk about it. I’m also very happy to report that, in the words of the Government of South Australia’s Department of Primary Industries and Regions (PIRSA),

Modelling by the Flinders University Global Ecology Laboratory shows the likelihood and feasibility of feral pig eradication under different funding and eradication scenarios. With enough funding, feral pigs could be eradicated from Kangaroo Island in 2 years.

This basically means that because of the model, PIRSA was successful in obtaining enough funding to pretty much ensure that the eradication of feral pigs from Kangaroo Island will be feasible!

Why is this important to get rid of feral pigs? They are a major pest on the Island, causing severe economic and environmental impacts both to farms and native ecosystems. On the agricultural side of things, they prey on newborn lambs, eat crops, and compete with livestock for pasture. Feral pigs damage natural habitats by up-rooting vegetation and fouling waterholes. They can also spread weeds and damage infrastructure, as well as act as hosts of parasites and diseases (e.g., leptospirosis, tuberculosis, foot-and-mouth disease) that pose serious threats to industry, wildlife, and even humans.

Read the rest of this entry »




Free resources for learning (and getting better with) R

15 11 2021

While I’m currently in Github mode (see previous post), I thought I’d share a list of resources I started putting together for learning and upskilling in the R programming language.

If you don’t know what R is, this probably won’t be of much use to you. But if you are a novice user, want to improve your skills, or just have access to a kick-arse list of cheatsheets, then this Github repository should be useful.

I started putting this list together for members of the Australian Research Council Centre of Excellence for Australian Biodiversity and Heritage, but I see no reason why it should be limited to that particular group of people.

I don’t claim that this list is exhaustive, nor do I vouch for the quality of any of the listed resources. Some of them are deprecated and fairly old too, so be warned.

The first section includes online resources such as short courses, reference guides, analysis demos, tips for more-efficient programming, better plotting guidelines, as well as some R-related mini-universes like markdown, ggplot, Shiny, and tidyverse.

The section following is a list of popular online communities, list-servers, and blogs that help R users track down advice for solving niggly coding and statistical problems.

The next section is a whopping-great archive of R cheatsheets, covering everything from the basics, plotting, cartography, databasing, applications, time series analysis, machine learning, time & date, building packages, parallel computing, resampling methods, markdown, and more.

Read the rest of this entry »




Want a permanent DOI assigned to your data and code? Follow this simple recipe

2 11 2021

These days with data and code often required to be designated as open-source, licenced, and fully trackable for most manuscript submissions to a peer-reviewed journal, it’s easy to get lost in the multitude of platforms and options available. In most cases, we no longer have much of a choice to do so, even if you are reticent (although the benefits of posting your data and code online immediately far outweigh any potential disadvantages).

But do you post your data and code on the Open Science Framework (free), Github (free), Figshare (free), Zenodo (free, but donations encouraged), Dryad ($), or Harvard Dataverse (free) (and so on, and so on, …)? Pick your favourite. Another issue that arises is that even if you have solved the first dilemma, how do you obtain a digital object identifier (DOI) for your data and/or code?

Again, there are many ways to do this, and some methods are more automated than other. That said, I do have a preference that is rather easy to implement that I’d thought I’d share with you here.

The first requirement is getting yourself a (free) Github account. What’s Github? Github is one of the world’s largest communities of developers, where code for all manner of types and uses can be developed, shared, updated, collaborated, shipped, and maintained. It might seem a bit overwhelming for non-developers, but if you strip it down to its basics, it’s straightforward to use as a simple repository for your code and data. Of course, Github is designed for so much more than just this (software development collaboration being one of the main ones), but you don’t need to worry about that for now.

Step 1

Once you create an account, you can start creating ‘repositories’, which are essentially just sections of your account dedicated to specific code (and data). I mostly code in R, so I upload my R code text files and associated datasets to these repositories, and spend a good deal of effort on making the Readme.md file highly explanatory and easy to follow. You can check out some of mine here.

Ok. So, you have a repository with some code and data, you’ve explained what’s going on and how the code works in the Readme file, and now you want a permanent DOI that will point to the repository (and any updates) for all time.

Github doesn’t do this by itself, but it integrates seamlessly with another platform — Zenodo — that does. Oh no! Not another platform! Yes, I’m afraid so, but it’s not as painful as you might expect.

Read the rest of this entry »




Cartoon guide to biodiversity loss LXVIII

19 10 2021

Here is the fifth set of biodiversity cartoons for 2021. See full stock of previous ‘Cartoon guide to biodiversity loss’ compendia here.


Read the rest of this entry »




Citizens meet coral gardening

12 10 2021

It is possible to cultivate corals in the sea like growing a nursery of trees to restore a burned forest. Cultivated corals grow faster than wild corals and can be outplanted to increase the healthy area of damaged reefs. Incorporated in projects of citizen science and ecotourism, this activity promotes environmental awareness about coral reefs, the marine ecosystem that is both the most biodiverse and the most threatened by global change.


When I finished by undergraduate studies in the 1980s, I met several top Spanish marine biologists to prospect my first job ever in academia. In all one-to-one interviews I had, I was asked what my interests were. And when I described that I wanted to study ways of modifying impacted marine ecosystems to restore their biodiversity, a well-known professor judged that my proposition was an inviable form of jardinería marina (marine gardening) ― those words made me feel embarrassed and have remained vivid in my professional imagination since. Neither the expert nor the young researcher knew at the time that we were actually talking about ecological restoration, a discipline that was being formalised exactly then by botanists in their pledge to recover pre-European conditions for North American grasslands (1).

Aspects of coral gardening. The photos show (top) a diver scraping off (with the aid of a toothbrush) algae, sponges and parasites that compete for light and nutrients with the coral fragments under cultivation along suspended ropes (Cousin Island, Seychelles), (middle) coral outplantings in the Gulf of Eliat (Red Sea) hosting a diverse community of fish that clean off the biofouling for free (21), and (bottom) a donor colony farmed off Onna (Okinawa, Japan) (12). Photos courtesy of Luca Saponari (Cousin), Buki Rinkevich (Eliat) and Yoshimi Higa / Onna Village Fishery Cooperative.

Today, the term coral gardening encompasses the suite of methods to cultivate corals (tiny colonial jellyfish with an external skeleton and a carnivorous diet) and to outplant them into the wild to boost the growth of coral reefs following perturbations (2). In the face of the decline of coral reefs globally, due to the combination of climate change, pollution, and overfishing (3), this type of mariculture has gathered momentum in the last three decades and is currently being applied to more than 100 coral species in all the main reefs of our seas and oceans (4-6).

Read the rest of this entry »




Smoothing over content issues with co-author agreements

7 10 2021

I’ve written before about guidelines for co-authorship that I’ve formulated after years of accrued hit-and-miss experiences. Here, ‘hits’ refer to positive experiences (thankfully, the majority), and the ‘misses’ obviously refer to those times where co-authorship had become a contentious issue. While guidelines can go a long way to reducing the probability of nasty in-fighting occurring, there is never a water-tight approach that can avoid all problems.

However, the more I delve into multidisciplinary research that covers potentially controversial subjects, the more preparation for combatting future points of contention becomes necessary. What do you do when different specialists contribute material to a paper with which some other co-authors don’t necessarily agree?

Yes, this conundrum is real, and potentially flies in the face of the standard statement (and their variants) needed for most journal submissions these days:

All authors contributed to the article and approved the submitted version

Note, however, that the statement almost always includes the word ‘approved’ rather than ‘agreed with’. A subtle difference, I know, but it’s an important one.

This is where a pre-submission ‘Co-Author Agreement’ comes into play. Until quite recently, I have only ever prepared one such a document before, and that one was not terribly comprehensive.

But I’ve recently been working with a large, multidisciplinary group of specialists for which an official Co-Author Agreement made a lot of sense.

What is a Co-Author Agreement? It’s essentially a contract that prospective co-authors sign prior to submission of the manuscript to a journal so that potential disagreements can be dealt with more officiously down the track.

I looked for templates online and found a few that were suitable, and then modified it to our specific conditions.

I thought it might be a good idea to pass along a generalised template for a good Co-Author Agreement that you can modify according to your needs. I’ve broken down the content into sections:

Read the rest of this entry »




Avoiding a ghastly future — The Science Show

1 10 2021

Just thought I’d share the audio of an interview I did with the famous Robyn Williams of ABC Radio National‘s The Science Show.

I’d be surprised if any Australians with even a passing interest in science could claim not to have listened to the Science Show before, and I suspect a fair mob of people overseas would be in the same boat.

It was a real privilege to talk with Robyn about our work on the ghastly future, and as always, the production value is outstanding.

Thank you, Robyn and the ABC.

Listen below, or link to the interview directly.





PhD opportunity in control strategies of feral deer

30 09 2021

In collaboration with Biosecurity South Australia, the Global Ecology Lab at Flinders University is happy to announce a wonderful new PhD opportunity in feral deer control strategies for South Australia.

The project is tentatively entitled: Refining models of feral deer abundance and distribution to inform culling programs in South Australia

Feral fallow deer (Dama dama) digging in a mallee fowl (Leipoa ocellata) mound © Lee Williams

The project brief follows:

South Australian legislation requires that all landholders cull feral deer on their properties. Despite this, feral deer abundance and distribution are increasing across South Australia. This arises because culling by land managers and government organisations is not keeping pace with rates of population growth, and some landholders are harbouring deer for hunting, whereas some deer escape from deer farms.

There are an estimated 40,000 feral deer in South Australia, and state government agencies are working to ramp up programs to cull feral deer before their numbers reach a point where control is no longer feasible.

Planning such large-scale and costly programs requires that government agencies engage economists to measure the economic impacts of feral deer, and to predict the value of these impacts in the future. That modelling is done regularly by governments, and in the case of pest-control programs, the modelling draws on models of feral deer population growth, farmer surveys about the economic, social, and environmental impacts of feral deer, and analyses of culling programs and trials of new culling techniques.

The economic models predict and compare both the current and future costs of:

  • deer impacts on pastures, crops, native plants, and social values (including illegal hunting)
  • culling programs that achieve different objectives (e.g., contain vs. reduce vs. eradicate)

The outputs of the models also inform whether there are sufficient public benefits from the investment of public funds into the culling of feral deer.


This PhD project will collate published and unpublished data to refine models of feral deer distribution and abundance under various culling scenarios. This project will drive both high-impact publications and, because this project builds extensive collaborations with government agencies, the results will inform the management of feral deer in South Australia.

Read the rest of this entry »




Plea of the Predatory Publisher (A Lament)

21 09 2021
Illustration by David Parkins (nature.com/articles/d41586-019-03759-y)

“Salutations! I hope you are safe and doing well,
[change font] Dear Doctor [insert name, surname, and initial]”

“We read your prestigious paper [insert TITLE here],”
(hmmm — you seem to take me for a fool, I fear)

“and we’d appreciated [sic] if you could submit your Research work”
(yep, they really must think I’m a berk)

“Your participation is extremely valuable to us,
here at Scientific Archives of Researches (or some such)”

“You may submit online, or as an attachment to this email address,”
(and I guess you’ll promise a minimal assessment sans stress?)

“In the pursuit of researches of quality best,
our open-access fees are among the most modest”

“We must be clear that this is not a scam”
(just how fucking thick do you think I am?)

“We will be waiting for your positive reply”
(this is the fifth one of these I’ve received today, sigh)

“Please let us know your acceptance to join the eminent author list,
and with any query, I will be most happy to assist”

“Sincerely, Profesor [sic] Gonar L Schlidt”
(does anyone actually fall for this shit?)

Read the rest of this entry »




Video explainer — nasty alien species in Australia

15 09 2021

You know you’ve made it to the big time in Australia when Behind The News does a story on your research. Practically every kid in Australia watches the show at some point during their school years.

Although this was produced last month, I thought I’d post the entire 4-minute video here for your viewing pleasure.

When you popularise your research story for kids, it really gets the message across well.

Thank you, Natasha and BTN for this opportunity.






The very worn slur of “neo-Malthusian”

7 09 2021

After the rather astounding response to our Ghastly Future paper published in January this year (> 443,000 views and counting; 61 citations and counting), we received a Commentary that was rather critical of our article.

A Malthusian slur

We have finally published a Response to the Commentary, which is now available online (accepted version) in Frontiers in Conservation Science. Given that it is published under a Creative Commons Attribution License (CC BY), I can repost the Response here:


In their comment on our paper Underestimating the challenges of avoiding a ghastly future, Bluwstein et al.2 attempt to contravene our exposé of the enormous challenges facing the entire human population from a rapidly degrading global environment. While we broadly agree with the need for multi-disciplinary solutions, and we worry deeply about the inequality of those who pay the costs of biodiversity loss and ecological collapse, we feel obligated to correct misconceptions and incorrect statements that Bluwstein et al.2 made about our original article.

After incorrectly assuming that our message implied the existence of “one science” and a “united scientific community”, the final paragraph of their comment contradicts their own charge by calling for the scientific community to “… stand in solidarity”. Of course, there is no “one science” — we never made such a claim. Science is by its nature necessarily untidy because it is a bottom-up process driven by different individuals, cultures, perspectives, and goals. But it is solid at the core. Scientific confluence is reached by curiosity, rigorous testing of assumptions, and search for contradictions, leading to many — sometimes counter-intuitive or even conflicting — insights about how the world works. There is no one body of scientific knowledge, even though there is good chance that disagreements are eventually resolved by updated, better evidence, although perhaps too slowly. That was, in fact, a main message of our original article — that obligatory specialisation of disparate scientific fields, embedded within a highly unequal and complex socio-cultural-economic framework, reduces the capacity of society to appreciate, measure, and potentially counter the complexity of its interacting existential challenges. We agree that scientists play a role in political struggles, but we never claimed, as Bluwstein et al.2 contended, that such struggles can be “… reduced to science-led processes of positive change”. Indeed, this is exactly the reason our paper emphasized the political impotence surrounding the required responses. We obviously recognize the essential role social scientists play in creating solutions to avoid a ghastly future. Science can only provide the best available evidence that individuals and policymakers can elect to use to inform their decisions. 

We certainly recognise that there is no single policy or polity capable of addressing compounding and mounting problems, and we agree that that there is no “universal understanding of the intertwined socio-ecological challenges we face”. Bluwstein et al.2 claimed that we had suggested scientific messaging alone can “… adequately communicate to the public how socio-ecological crises should be addressed”. We did not state or imply such ideas of unilateral scientific power anywhere in our article. Indeed, the point of framing our message as pertaining to a complex adaptive system means that we cannot, and should not, work towards a single goal. Instead, humanity will be more successful tackling challenges simultaneously and from multiple perspectives, by exploiting manifold institutions, technologies, approaches, and governances to match the complexity of the predicament we are attempting to resolve.

Read the rest of this entry »




Climate change will also make us more stupid

31 08 2021

Most people are at least vaguely aware that climate change isn’t good for us.

Let’s consider the obvious direct health effects, like heat exhaustion and stroke, dehydration, increased inhalation of particulate matter from bushfires and other pollutant sources, greater expression of allergies, higher incidence of cardiovascular and respiratory diseases, greater injury rates, and higher probability of disease transmission from flooding events (see review here).

Let’s not forget the rising incidence of mental illness either.

Then there are the climatic events that increase the probability of dying violently like in a bushfire or a flood, getting caned in a major storm by debris, personal injury from storm surges exacerbated by rising sea levels, or dying slowly due to undernutrition from crop failures.

Some of the more indirect, yet just-as-insidious repercussions are those climate-driven events that worsen all of the above, such as increasing poverty, rising violent interactions (both individual-level and full-on warfare), loss of healthcare capability (less infrastructure, fewer doctors), and increased likelihood of becoming a refugee.


So, when someone says increased warming at the pace we’re witnessing now isn’t a problem, tell them they’re full of shit.

But wait! There’s more!

Yes, climate change will also make us more stupid. Perhaps one of the lesser-appreciated byproducts of an increasingly warmer world driven by rising greenhouse-gas concentrations is the direct effects of carbon dioxide on a variety of physiological functions.

Read the rest of this entry »




It’s a tough time for young conservation scientists

24 08 2021

Sure, it’s a tough time for everyone, isn’t it? But it’s a lot worse for the already disadvantaged, and it’s only going to go downhill from here. I suppose that most people who read this blog can certainly think of myriad ways they are, in fact, still privileged and very fortunate (I know that I am).

Nonetheless, quite a few of us I suspect are rather ground down by the onslaught of bad news, some of which I’ve been responsible for perpetuating myself. Add lock downs, dwindling job security, and the prospect of dying tragically due to lung infection, many have become exasperated.

I once wrote that being a conservation scientist is a particularly depressing job, because in our case, knowledge is a source of despair. But as I’ve shifted my focus from ‘preventing disaster’ to trying to lessen the degree of future shittyness, I find it easier to get out of bed in the morning.

What can we do in addition to shifting our focus to making the future a little less shitty than it could otherwise be? I have a few tips that you might find useful:

Read the rest of this entry »




Cartoon guide to biodiversity loss LXVII

13 08 2021

Here is the fourth set of biodiversity cartoons for 2021. See full stock of previous ‘Cartoon guide to biodiversity loss’ compendia here.


Read the rest of this entry »




Pest plants and animals cost Australia around $25 billion a year — and it will get worse

2 08 2021
AAP

Corey J. A. Bradshaw, Flinders University and Andrew Hoskins, CSIRO

This article is republished from The Conversation under a Creative Commons licence. Read the original article.


Shamefully, Australia has one of the highest extinction rates in the world.
And the number one threat to our species is invasive or “alien” plants and animals.

But invasive species don’t just cause extinctions and biodiversity loss – they also create a serious economic burden. Our research, published today, reveals invasive species have cost the Australian economy at least A$390 billion in the last 60 years alone.

Our paper – the most detailed assessment of its type ever published in this country – also reveals feral cats are the worst invasive species in terms of total costs, followed by rabbits and fire ants.

Without urgent action, Australia will continue to lose billions of dollars every year on invasive species.

Feral cats are Australia’s costliest invasive species. Source: Adobe Stock/240188862

Huge economic burden

Invasive species are those not native to a particular ecosystem. They are introduced either by accident or on purpose and become pests.

Some costs involve direct damage to agriculture, such as insects or fungi destroying fruit. Other examples include measures to control invasive species like feral cats and cane toads, such as paying field staff and buying fuel, ammunition, traps and poisons.

Our previous research put the global cost of invasive species at A$1.7 trillion. But this is most certainly a gross underestimate because so many data are missing.


Read more:
Attack of the alien invaders: pest plants and animals leave a frightening $1.7 trillion bill


As a wealthy nation, Australia has accumulated more reliable cost data than most other regions. These costs have increased exponentially over time – up to sixfold each decade since the 1970s.

Read the rest of this entry »




Smart genetic analysis made fast and easy

29 07 2021

If you use genetics to differentiate populations, the new package smartsnp might be your new friend. Written in R language and available from GitHub and CRAN, this package does principal component analysis with control for genetic drift, projects ancient samples onto modern genetic space, and tests for population differences in genotypes. The package has been built to load big datasets and run complex stats in the blink of an eye, and is fully described in a paper published in Methods in Ecology and Evolution (1).


In the bioinformatics era, sequencing a genome has never been so straightforward. No surprise that > 20 petabytes of genomic data are expected to be generated every year by the end of this decade (2) — if 1 byte of information was 1 mm long, we could make 29,000 round trips to the moon with 20 petabytes. Data size in genetics keeps outpacing the computer power available to handle it at any given time (3). Many will be familiar with a computer freezing if unable to load or run an analysis on a huge dataset, and how many coffees or teas we might have drunk, or computer screens might have been broken, during the wait. The bottom line is that software advances that speed up data processing and genetic analysis are always good news.

With that idea in mind, I have just published a paper presenting the new R package smartsnp (1) to run multivariate analysis of big genotype data, with applications to studies of ancestry, evolution, forensics, lineages, and overall population genetics. I am proud to say that the development of the package has been one of the most gratifying short-term collaborations in my entire career, with my colleagues Christian Huber and Ray Tobler: a true team effort!

The package is available on GitHub and the Comprehensive R Archive Network CRAN. See downloading options here, and vignettes here with step-by-step instructions to run different functionalities of our package (summarised below).

In this blog, I use “genotype” meaning the combination of gene variants (alleles) across a predefined set of positions (loci) in the genome of a given individual of animal, human, microbe, or plant. One type of those variants is single nucleotide polymorphisms (SNP), a DNA locus at which two or more alternative nucleotides occur, sometimes conditioning protein translation or gene expression. SNPs are relatively stable over time and are routinely used to identify individuals and ancestors in humans and wildlife.

What the package does

The package smartsnp is partly based on the field-standard software EIGENSOFT (4, 5) which is only available for Unix command-line environments. In fact, our driving motivation was (i) to broaden the use of EIGENSOFT tools by making them available to the rocketing community of professionals, not only academics who employ R for their work (6), and (ii) to optimise our package to handle big datasets and complex stats efficiently. Our package mimics EIGENSOFT’s principal component analysis (SMARTPCA) (5), and also runs multivariate tests for population differences in genotypes as follows:

Read the rest of this entry »




Journal ranks 2020

23 07 2021

This is the 13th year in a row that I’ve generated journal ranks based on the journal-ranking method we published several years ago.

There are few differences in how I calculated this year’s ranks, as well as some relevant updates:

  1. As always, I’ve added a few new journals (either those who have only recently been scored with the component metrics, or ones I’ve just missed before);
  2. I’ve included the new ‘Journal Citation Indicator’ (JCI) in addition to the Journal Impact Factor and Immediacy Index from Clarivate ISI. JCI “… a field-normalised metric, represents the average category-normalised citation impact for papers published in the prior three-year period.”. In other words, it’s supposed to correct for field-specific citation trends;
  3. While this isn’t my change, the Clarivate metrics are now calculated based on when an article is first published online, rather than just in an issue. You would have thought that this should have been the case for many years, but they’ve only just done it;
  4. I’ve also added the ‘CiteScore’ (CS) in addition to the Source-Normalised Impact Per Paper (SNIP) and SCImago Journal Rank (SJR) from Scopus. CS is “the number of citations, received in that year and previous 3 years, for documents published in the journal during that period (four years), divided by the total number of published documents … in the journal during the same four-year period”;
  5. Finally, you can access the raw data for 2020 (I’ve done the hard work for you) and use my RShiny app to derive your own samples of journal ranks (also see the relevant blog post). You can add new journal as well to the list if my sample isn’t comprehensive enough for you.

Since the Google Scholar metrics were just released today, I present the new 2020 ranks for: (i) 101 ecology, conservation and multidisciplinary journals, and a subset of (ii) 61 ‘ecology’ journals, (iii) 29 ‘conservation’ journals, (iv) 41 ‘sustainability’ journals (with general and energy-focussed journals included), and (v) 20 ‘marine & freshwater’ journals.

One final observation. I’ve noted that several journals are boasting about how their Impact Factors have increased this year, when they fail to mention that this is the norm across most journals. As you’ll see below, relative ranks don’t actually change that much for most journals. In fact, this is a redacted email I received from a journal that I will not identify here:

We’re pleased to let you know that the new Impact Factor for [JOURNAL NAME] marks a remarkable increase, as it now stands at X.XXX, compared to last year’s X.XXX. And what is even more important: [JOURNAL NAME] increased its rank in the relevant disciplines: [DISCIPLINE NAME].

Although the Impact Factor may not be the perfect indicator of success, it remains the most widely recognised one at journal level. Therefore, we’re excited to share this achievement with you, as it wouldn’t have been possible, had it not been for all of your contributions and support as authors, reviewers, editors and readers. A huge ‘THANK YOU’ goes to all of you!

What bullshit.

Anyway, on to the results:

Read the rest of this entry »





Interval between extremely wet years increasing?

16 07 2021

The other day I was playing around with some Bureau of Meteorology data for my little patch of the Adelaide Hills (free data — how can I resist?), when I discovered an interesting trend.

Living on a little farm with a small vineyard, I’m rather keen on understanding our local weather trends. Being a scientist, I’m also rather inclined to analyse data.

My first question was given the strong warming trend here and everywhere else, plus ample evidence of changing rainfall patterns in Australia (e.g., see here, here, here, here, here), was it drying out, getting wetter, or was the seasonal pattern of rainfall in my area changing?

I first looked to see if there was any long-term trend in total annual rainfall over time. Luckily, the station records nearest my farm go all the way back to 1890:

While the red line might suggest a slight decrease since the late 19th Century, it’s no different to an intercept-only model (evidence ratio = 0.84) — no trend.

Here’s the R code to do that analysis (you can download the data here, or provide your own data in the same format):

## IMPORT MONTHLY PRECIPITATION DATA
dat <- read.table("monthlyprecipdata.csv", header=T, sep=",")

## CALCULATE ANNUAL VECTORS
precip.yr.sum <- xtabs(dat$Monthly.Precipitation.Total..millimetres. ~ dat$Year)
precip.yr.sum <- precip.yr.sum[-length(precip.yr.sum)]
year.vec <- as.numeric(names(precip.yr.sum))

## PLOT
plot(year.vec, as.numeric(precip.yr.sum), type="l", pch=19, xlab="year", ylab="annual precipitation (mm)")
fit.yr <- lm(precip.yr.sum ~ year.vec)
abline(fit.yr, lty=2, lwd=2, col="red")
abline(h=mean(as.numeric(precip.yr.sum)),lty=2, lwd=3)

## TEST FOR TREND
# functions
AICc <- function(...) {
  models <- list(...)
  num.mod <- length(models)
  AICcs <- numeric(num.mod)
  ns <- numeric(num.mod)
  ks <- numeric(num.mod)
  AICc.vec <- rep(0,num.mod)
  for (i in 1:num.mod) {
    if (length(models[[i]]$df.residual) == 0) n <- models[[i]]$dims$N else n <- length(models[[i]]$residuals)
    if (length(models[[i]]$df.residual) == 0) k <- sum(models[[i]]$dims$ncol) else k <- (length(models[[i]]$coeff))+1
    AICcs[i] <- (-2*logLik(models[[i]])) + ((2*k*n)/(n-k-1))
    ns[i] <- n
    ks[i] <- k
    AICc.vec[i] <- AICcs[i]
  }
  return(AICc.vec)
}

delta.AIC <- function(x) x - min(x) ## where x is a vector of AIC
weight.AIC <- function(x) (exp(-0.5*x))/sum(exp(-0.5*x)) ## Where x is a vector of dAIC
ch.dev <- function(x) ((( as.numeric(x$null.deviance) - as.numeric(x$deviance) )/ as.numeric(x$null.deviance))*100) ## % change in deviance, where x is glm object

linreg.ER <- function(x,y) { # where x and y are vectors of the same length; calls AICc, delta.AIC, weight.AIC functions
  fit.full <- lm(y ~ x); fit.null <- lm(y ~ 1)
  AIC.vec <- c(AICc(fit.full),AICc(fit.null))
  dAIC.vec <- delta.AIC(AIC.vec); wAIC.vec <- weight.AIC(dAIC.vec)
  ER <- wAIC.vec[1]/wAIC.vec[2]
  r.sq.adj <- as.numeric(summary(fit.full)[9])
  return(c(ER,r.sq.adj))
}

linreg.ER(year.vec, as.numeric(precip.yr.sum))
Read the rest of this entry »




‘Living’ figures

8 07 2021

Have you ever constructed a database and then published the findings, only to realise that after the time elapsed your database is already obsolete?

This is the reality of scientific information today. There are so many of us doing so many things that information accumulates substantially in months, if not weeks. If you’re a geneticist, this probably happens for many datasets on the order of days.

While our general databasing capacity worldwide has improved enormously over the last decade with the transition to fully online and web-capable interactivity, the world of scientific publication still generally lags behind the tech. But there is a better way to communicate dynamic, evolving database results to the public.

Enter the ‘living figure’, which is a simple-enough concept where a published figure remains dynamic as its underlying database is updated.

We have, in fact, just published such a living figure based on our paper earlier this year where we reported the global costs of invasive species.

That paper was published based on version 1 of the InvaCost database, but a mere three months after publication, InvaCost is already at version 4.

Read the rest of this entry »




Losing half of tropical fish species as corals disappear

30 06 2021

When snorkelling in a reef, it’s natural to think of coral colonies as a colourful scenography where fish act in a play. But what would happen to the fish if the stage went suddenly empty, as in Peter Brook’s 1971 Midsummer Night’s Dream? Would the fish still be there acting their roles without a backdrop?


This question is not novel in coral-reef science. Ecologists have often compared reef fish diversity and biomass in selected localities before and after severe events of coral mortality. Even a temporary disappearance of corals might have substantial effects on fish communities, sometimes resulting in a local disappearance of more than half of local fish species.

Considering the multiple, complex ways fish interact with — and depend on — corals, this might appear as an obvious outcome. Still, such complexity of interactions makes it difficult to predict how the loss of corals might affect fish diversity in specific contexts, let alone at the global scale.

Focusing on species-specific fish-coral associations reveals an inconsistent picture with local-scale empirical observations. When looking at the fraction of local fish diversity that strictly depends on corals for food and other more generic habitat requirements (such as shelter and reproduction), the global picture suggests that most fish diversity in reef locality might persist in the absence of corals. 

The mismatch between this result and the empirical evidence of a stronger coral dependence suggests the existence of many hidden ecological paths connecting fish to corals, and that those paths might entrap many fish species for which the association to corals is not apparent.

Read the rest of this entry »







%d bloggers like this: