How do you edit someone else’s code?

As academics I like to think that we’ve become fairly used to editing text documents. Whether handwriting on printed documents (fairly old school, but cool), adding comments on PDFs, or using some form of “track changes” I think we’ve learned how to do the editing, and how to incorporate those edits into a finished draft. Large collaborative projects are still often a source of difficulty (how do you deal with ten simultaneous edits of the same draft?!) but we deal.

Figure 1. If your revisions look like this you should strongly question your choice of (code) reviewer.

Figure 1. If your revisions look like this you should strongly question your choice of (code) reviewer.

I’m working on several projects now that use R as a central component in analysis, and now we’re not just editing the text documents, we’re editing the code as well.

People are beginning to migrate to version control software and the literature is increasingly discussing the utility of software programming practices (e.g., Scheller et al., 2010), but given that scientific adoption of programming tools is still in its early stages, there’s no sense that we can expect people to immediately pick up all the associated tools that go along with them. Yes, it would be great if people would start using GitHub or BitBucket (or other version control tools) right away, but they’re still getting used to basic programming concepts (btw Tim Poisot has some great tips for Learning to Code in Ecology).

The other issue is that collaborating with graduate students is still a murky area. How much editing of code can you do before you’ve started doing their work for them? I think we generally have a sense of where the boundaries are for written work, but if code is part of ‘doing the experiment’, how much can you do? Editing is an opportunity to teach good coding practice, and to teach new tools to improve reproducibility and ease of use, but give the student too much and you’ve programmed everything for them.

I’m learning as I go here, and I’d appreciate tips from others (in the comments, or on twitter), but this is what I’ve started doing when working with graduate students:

  • Commenting using a ‘special’ tag:  Comments in R are just an octothorp (#), I use #* to differentiate what I’m saying from a collaborator’s comments.  This is fairly extensible, someone else could comment ‘#s’ or ‘#a’ if you have multiple collaborators.
  • Where there are major structural changes (sticking things in functions) I’ll comment heavily at the top, then build the function once.  Inside the function I’ll explain what else needs to be done so that I haven’t done it all for them.
  • If similar things need to be done further down the code I’ll comment “This needs to be done as above” in a bit more detail, so they have a template & the know where they’re going.

The tricky part about editing code is that it needs to work, so it can be frustratingly difficult to do half-edits without introducing all sorts of bugs or errors.  So if code review is part of your editing process, how do you accomplish it?

Don’t forget the Deevey Award!

If you are a graduate student, or have completed your Ph.D within the last 9 months, and you are attending this year’s ESA to present, don’t forget to apply for the Edward S. Deevey Award.  The Deevey Award is presented to the nominee with the best presentation in paleoecology at the annual ESA meeting (this year in ).

Edward Deevey was a major contributor to our understanding of lake systems through time and moved paleolimnology from a broadly qualitative to a quantitative science, contributing to the widespread use of 14C as a tool in modern paleoecological studies.  He was also the first to publish a pollen stratigraphy for northeastern North America (Deevey, 1939) as G. Evelyn Hutchinson‘s second Ph.D student.  From Yale, Deevey continued his distinguished career through multiple postings across the United States, at Yale, Rice, Woods Hole and elsewhere.

Figure 1.  The first pollen diagram for the northeastern United States, published by Edward Deevey in 1939.  It also looks like an early use of Comic Sans.

Figure 1. The first pollen diagram for the northeastern United States, from Connecticut.  Published by Edward Deevey in 1939. It also looks like some paleo-Comic Sans lettering

Deevey’s studies mark a major milestone in North American paleoecology, as they brought together both multi-proxy analysis and deep ecological understanding of lake systems, founded on a broad survey of both paleoecological and neoecological data.

More information on Deevey can be found from his National Academy of Sciences biography (here)

Past winners of the Deevey Award include PalEON members and contributors Jason McLachlan, Bob Booth (who has a great blog: Among the Stately Trees), and Sara Hotchkiss, and more recently Alex Ireland, Ryan Kelly and W. John Calder.

If you are a paleoecology grad student, or recent graduate and you will be attending ESA be sure to submit your application by August 1st.  You can email or send the completed application form (Word or PDF) and a copy of your abstract to the Deevey Award Committee Chair at Deeveyaward@gmail.com.

Good Luck!

What do citations tell us about the climate divide?

I came across an interesting article in Geoforum this past week:

Jankó, F., Móricz, N., & Papp Vancsó, J. (2014). Reviewing the climate change reviewers: Exploring controversy through report references and citations. Geoforum, 56, 17-34.

The authors are in the Faculty of Economics and the Faculty of Forestry at the University of West-Hungary, in Sopron, about an hour directly south of Vienna, Austria. They take an interesting quantitative and human geographic perspective of the use of citations in understanding the physical science basis of climate change from both scientific and skeptical perspectives. A number of bloggers have taken on the science in the NIPCC (Richard Telford has several posts on his blog), but this paper provides interesting insight into the human aspects of scientific report writing. As such the paper falls much more easily into human geography than it does the physical sciences it seeks to understand.

Figure 1.  Heartland's funders did not particularly like the comparison between climate science and the Unabomber. (image source: wikipedia)

Figure 1. Heartland’s funders did not particularly like the comparison between climate science and the Unabomber. (image source: wikipedia)

The issue of climate change is as much part of the domain of human geography as it is physical geography. In particular the dynamic of ‘skeptical’ backlash against the consensus of anthropogenic climate change is well worth studying.  Understanding resistance to scientific knowledge around climate change will be key to eventually moving forward with adaptation policies that can find broad acceptance.  The public self-reports as being less knowledgeable about climate change than it was in 2007 (Stoutenborough et al., 2014), and multiple, competing narratives are likely to play a role in that dynamic.

Lahsen (2013) points out that without examining the differences in perception between climate groups we risk making the science behind our current understanding of anthropogenic climate change more vulnerable to public backlash, and we frequently see interaction between place and social change within the organizations (Jankó et al. mention the impact of the grossly unpopular Unabomber billboard in Chicago on the Heartland Institute’s network of funders and climate change affiliates).

To study characteristics of resistance and acceptance of the science surrounding climate change, the authors review the citation lists of both the IPCC (AR4 – WG1, the Physical Science Basis) and the NIPCC ‘s Climate Change Reconsidered.  By examining similarities and differences in citations and the use of citations we can understand how the rhetoric around climate change science changes the interpretation of the published literature. Jankó et al. use a great quote from Bruno Latour to help guide the discussion:

Whatever the tactics, the general strategy is easy to grasp: do whatever you need to the former literature to render it as helpful as possible for the claims you are going to make. The rules are simple enough: weaken your enemies, paralyse those you cannot weaken […], help your allies if they are attacked, ensure safe communications with those who supply you with indisputable instruments […], oblige your enemies to fight one another […]; if you are not sure of winning, be humble and understated” (Latour, 1987, pp. 37–38).

Figure 2.  Citations are important, but they're rarely used in an impartial manner. (image source: wikipedia)

Figure 2. Citations are important, but they’re rarely used in an impartial manner. (image source: wikipedia)

I feel like this overstates the case for the IPCC a little bit (though I may be biased). The IPCC is not set up to directly combat ‘skeptical’ literature, as is the case of the NIPCC.  The NIPCC is explicitly structured to mirror and refute the IPCC.  Regardless, we often think that as researchers we use citations in a neutral manner, but I would argue that that’s rarely the case. Citations in the literature are selected to help bolster arguments, they’re selected because we know people, and they’re occasionally massaged to change the point of an argument in an effort to support our own.

So the question becomes, how is the literature used and modified in these summaries to help develop an agenda?

Interestingly Jankó et al. show that only 4.4% of total citations (IPCC + NIPCC) were used in both reports. This was surprising to me. I had expected that many of the primary sources to explain climate systems and their modern behaviour might have made up a much larger proportion of both reports. Jankó et al. include a table with analysis of many of the overlapping citations (Appendix B)and we see that most cases of duplicate citations show similar tone in the treatment of the citations. Differences do exist however.  Where there is extensive overlap in citations Jankó et al. have some very insightful points to make here.  One surprising point was that both reports use particular language around references they like (‘find’, ‘indicate’, ‘report’, ‘show’, ‘conclude’) and don’t like (‘claim’, and ‘contend’), although how the language is applied to individual citations varies between reports (the discussion of Tropical Cyclones is well worth a read).  The other main difference in these overlapping citations is that key NIPCC citations, challenging climate change are often found in the IPCC to support understanding of uncertainties.  Thus, what the IPCC sees as an uncertainty, the NIPCC sees as evidence against anthropogenic climate change.

The real issue that piqued my interest however was the much higher proportion of paleo-journals in the NIPCC literature.  The Holocene is cited 12 times more frequently in the NIPCC than in the IPCC,  Geology and Quaternary Research are both cited 10 times more often.  Why would skeptics cite paleoecological literature at higher rates than the IPCC?  In large part this is due to a key motivation for the NIPCC, and a particular focus in the paleoclimate sections.

The analytical goal of the NIPCC is to increase the perception of uncertainty, attempting to add more ‘non-supportive’ and ‘uncertain’ literature to the argument, and to use that increased uncertainty to take apart the arguments for anthropogenic climate change.  In this way the paleo-literature becomes a tool for skeptics with which to attack our understanding of climate change science.  Indeed, of the 18 references from the Holocene in the NIPCC, only one could be considered ‘Neutral’ while the other 17 were considered to be ‘Not Supporting’ of climate change science.  For Quaternary Research 2 citations were ‘Neutral’ and ’12 were ‘Not Supporting’.  Again, what might be considered uncertainty in the IPCC is considered evidence against in the NIPCC.

Figure 1.  Does showing climate has changed in the past prove that climate change is natural?

Figure 3. Does showing climate has changed in the past prove that climate change is natural?

Jankó et al. explain this trend by showing that the NIPCC uses the past to explain the present in such a way as to downplay the unprecendented nature of modern climate change, while the IPCC uses the past to search for analogues of modern climate change.  Effectively, the NIPCC view stops at the present:  The past was warmer, therefore change is not unprecedented.  The IPCC is searching for ways to explain the future: The past had warmer periods. What caused those changes, what happened  during those periods, and how can we use the past to constrain models for the future?

This, to my mind, is the difference between the camps.  The science marshaled in the IPCC is focused toward improving hypotheses and theoretical (and mechanistic) models.  It is prescriptive science in that uncertainties are identified, and used to improve our understanding of modern and future change.  In the ‘skeptical’ camp, science is marshaled to disprove anthropogenic causes, and when it does, the avenue of research is closed.  It is effectively a descriptive model without an overarching theoretical framework.  This allows it to attach the label ‘skeptical’ to disparate threads of knowledge across the literature, without having to concern itself with how those pieces join together.  Jankó et al. point out that the narrative style of the NIPCC report is structured around an anecdotal style, summarizing each paper individually and often adding textual quotes, while the IPCC synthesizes knowledge from multiple sources and provides block references for statements.  In one we see a descriptive format that highlights any contrary (or uncertain) position, in the other we see an effort to synthesize knowledge into a theoretical framework.

The scientific basis for anthropogenic climate change is strongly grounded in a fairly simple physical model that finds broad based theoretical support across a range of physical sciences.  The scientific community has shown that over time (since at least the 1970s), counter-examples and uncertainties found in the literature have been able to highlight weaknesses in our understanding, bu, rather than collapse the structure, these weaknesses have been marshaled to improve the science and to develop a much more robust scientific understanding of climate change.

Literature Cited

Idso, Craig Douglas, & Siegfried Fred Singer. 2009. Climate change reconsidered: 2009 report of the Nongovernmental International Panel on Climate Change (NIPCC). Nongovernmental International Panel on Climate Change.

Jankó, F., Móricz, N., & Papp Vancsó, J. (2014). Reviewing the climate change reviewers: Exploring controversy through report references and citations. Geoforum56, 17-34.

Jansen, E., J. Overpeck, K.R. Briffa, J.-C. Duplessy, F. Joos, V. Masson-Delmotte, D. Olago, B. Otto-Bliesner, W.R. Peltier, S. Rahmstorf, R. Ramesh, D. Raynaud, D. Rind, O. Solomina, R. Villalba and D. Zhang, 2007: Palaeoclimate. In: Climate Change 2007: The Physical Science Basis. Contribution of Working Group I to the Fourth Assessment Report of the Intergovernmental Panel on Climate Change [Solomon, S., D. Qin, M. Manning, Z. Chen, M. Marquis, K.B. Averyt, M. Tignor and H.L. Miller (eds.)]. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA.

Latour, B. (1987). Science in action: How to follow scientists and engineers through society. Harvard university press.

Lahsen, M. (2013). Climategate: the role of the social sciencesClimatic change119(3-4), 547-558.

Stoutenborough, J. W., Liu, X., & Vedlitz, A. (2014). Trends in Public Attitudes Toward Climate Change: The Influence of the Economy and Climategate on Risk, Information, and Public Policy. Risk, Hazards & Crisis in Public Policy,5(1), 22-37.

You are suffering for the greater good of science.

When you have hayfever you are suffering for the greater good of science.
    -Me. The Larry Meiller Show, WPR. July 16, 2014 [Program Archive]

Figure 1.  Your pain is science's gain.  Pollen may go into your nose, but it also enters aquatic environments where it is preserved in lake sediments.  Photo Credit: flickr/missrogue

Figure 1. Your pain is science’s gain. Pollen may go into your nose, but it also enters aquatic environments where it is preserved in lake sediments. Photo Credit: flickr/missrogue

Of course, I was talking paleoecology and the way we use airborne pollen trapped in lake sediments to help improve models of future climate change. We improve models by reconstructing forests of the past. This is one of the central concepts in PalEON (not suffering, paleoecology): Improve ecosystem model predictions for the future by testing them on independent reconstructions of the past. Give greater weight to models that perform well, and improve models that perform poorly.

I was lucky to be on the Larry Meiller Show along with Paul Hanson to discuss PalEON and GLEON, two large scale ecological projects with strong links to The University of Wisconsin. We talked a bit about climate change, large scale research, science funding, open science and historical Wisconsin. It was lots of fun and you can check out the archive here.

I feel like I was a little more prepared for this interview than I have been in the past. Jack Williams passed along his (autographed) copy of Escape from the Ivory Tower by Nancy Baron. The book helped me map out my “message box” and gave me a much better sense of what people might want to hear, as opposed to the things I wanted to talk about (how much can I talk about uncertainty, age modelling and temporal connectivity?). It was useful, and I hope I came off as well prepared and excited by my research (because I am). Regardless, just like learning R, public outreach is a skill, and one that I am happy to practice, if only because I intend to keep doing it.

Anyway, enough science outreach for one week. With this blog post and WPR I’m well above quota!

Announcing Open Quaternary

OQ_header_left

Open Quaternary is a new, fully open access journal dedicated to the Quaternary Sciences, published by Ubiquity Press (the Call for Papers is below) with very low publishing costs (£250, about $425USD).  The journal will cover a number of related disciplines, focusing on the Quaternary, including almost anything you can put “paleo” in front of (climate, botany, ecology), geomorphology, palynology, vertebrate and invertebrate palaeontology, zooarchaeology, geoarchaeology, biological anthropology and Palaeolithic archaeology. All papers are licensed under Creative Commons CC by 3.0 license and Open Quaternary actively encourages pre-publication of submissions “as it can lead to productive exchanges, as well as earlier and greater citation of published work”.

I was lucky enough to be invited to join the Editorial Board by the excellent team of Editors in Chief, Matthew Law (Bath Spa University), Suzanne Pilaar Birch (Brown University), and Victoria Herridge (Natural History Museum, UK). The Editorial board looks great too. A very diverse group of researchers, with a broad range of expertise and career stages represented.

Another nice aspect of the journal is the institution of double blind review. Emily Darling recently published an article in Conservation Biology supporting double blind review. She shows that journals with double blind reviews appear to have higher rates of publication for female lead authors and leverages recent work by Moss-Racusin et al. (2012) showing subtle, but distinct bias by academics against “Jennifer”s in academia . Encouraging diversity is a worthwhile goal for those of us in academia, and since publications remain a key metric for advancement, changes that encourage equality across gender and background should be supported. Until broader metrics of academic advancement are accepted (Goring et al., 2014) we need to support efforts to reduce advantages gained solely on the basis of sex or background.

Open Quaternary Editorial Board
Geoff Bailey, University of York; Canan Cakirlar, Groningen University; Bethan Davies, University of Reading; Ben Gearey, University College, Cork; Tom Gilbert, University of Copenhagen; Jacquelyn Gill, University of Maine; Simon Goring, University of Wisonsin-Madison; Seren Griffiths, Freelance/ Cardiff University; Erika Guttmann-Bond, Trinity St David, University of Wales; Tom Hill, Natural History Museum; Anson Mackay, University College London; John Marston, Boston University; Kirsty Penkman, University of York; Matthew Pope, University College London; Teresa Steele, University of California, Davis.

CALL FOR PAPERS

We are now accepting submissions for the 2014 launch of our new journal, Open Quaternary.

Open Quaternary is a fully open access, double-blind peer-reviewed journal, publishing contributions that consider the changing environment of the Quaternary as well as the development of humanity.

The editors are welcoming articles from a range of disciplines relating to Quaternary science. The broad scope of the journal covers a range of specialisms such as geomorphology, palaeoclimatology, palaeobotany, palynology, vertebrate and invertebrate palaeontology, zooarchaeology, geoarchaeology, biological anthropology and Palaeolithic archaeology.

The editors welcome submissions of Research, Methods, Reviews, and Engagement papers, as well as encouraging Data publications. Data can also be deposited in the journal’s Dataverse repository, allowing data to accompany research in a fully open format. For more information on data papers, click here.

Open Quaternary publishes one issue per year, with rapid publication as soon as articles are ready, to ensure that research is available as soon as possible. All submissions are thoroughly peer-reviewed to ensure that the highest standards are met.

Article Processing Charges (APCs) have been kept to a minimum to ensure that the journal can operate whilst sustainably remaining low cost and fully open access. The £250 APC is just 10-20% that of some competitors. We never expect authors to pay the APC, but that institutions or funding bodies will cover these costs. Your institution may already have a membership with the publisher to guarantee that funds are available. Full waivers are available for those without such funds available. For further details of the APC, please click here.

We accept online submissions via our journal website. See Author Guidelines for further information. Alternatively, please contact the journal editors for more information.

New Report: Canada in a Changing Climate – Biodiversity and Protected Areas

Figure 1. Parks close to urban centers, like Thousand Islands National Park act as refuges for species at risk, and provide connectivity to help support shifting ranges associated with climate change.

Figure 1. Parks close to urban centers, like Thousand Islands National Park act as refuges for species at risk, and provide connectivity to help support shifting ranges associated with climate change. (Image credit: Ad Meskins)

I have been lucky to work with Marlow Pellatt at Parks Canada for several years now. He was a member of my thesis committee and we have published a number of papers together (Goring et al., 2009, 2010, 2013; Pellatt et al. 2012). Most recently he invited me to be a contributing author for Natural Resource Canada’s Climate Change Adaptation update along with a number of other researchers including Isabelle Côté, Philip Dearden, Nancy Kingsbury (Environment Canada), Donald McLennan (Aboriginal Affairs and Northern Development Canada), and Tory Stevens (BC Ministry of the Environment). The lead authors, Patrick Nantel, Marlow Pellatt and Karen Keenleyside (all with Parks Canada), and Paul Gray (Ontario Ministry of Natural Resources) did a tremendous job working with us, and helping to get the chapter into its finished form.

The last Adaptation plan was released in 2008 (here), and prior to that in 2004 (here).  The newest report was just released and it includes updates on research in the five years following the 2008 report.  It thus represents the “state of the science” with regards to climate change effects on natural resources, biodiversity, industry, social systems, human health and water availability and transport.

I was a contributing author for Chapter 6: Biodiversity and Protected Areas, where we examined the potential impacts of climate change on biodiversity, the social and economic implications of biodiversity loss, and the role of protected areas in maintaining biodiversity in the face of changing climate.

One of the key findings is that ecological restoration is critical to improve ecosystem resilience, but climate change means that adaptation strategies need to be integrated into these restoration plans, meaning that restoration is less  an end point and more a moving target.  A new paper in Biological Conservation by Balaguer et al. (2014) discusses ecological restoration as a process of guiding ecosystems within a historically based reference system, rather than restoring to an end point.  A similar point is made by Clewell and Aronsen (2013) with regards to the SER Primer on Ecological Restoration:  Restoration is an ongoing process whereby we consider ecosystems as dynamic units.  Given this, if we fail to consider the effects of climate change on ecosystems we’ll never be able to restore them.  Parks Canada itself explicitly acknowledges this by staking out a role for experimentation, modification and adaptation within the process of ecological restoration (Parks Canada, 2008).

But what value does restoration provide?  We know that protected areas tend to be more resilient to change than unprotected ecosystems, and that degraded ecosystems are more prone to natural disasters, leading to greater community vulnerability.  Biodiversity is also tied to human health, for example Hanski et al. (2012) indicated that lower rates of allergies were linked to higher regional biodiversity and Ostfield (2009) has tied declining biodiversity to increased rates of spread for Lyme disease and West Nile virus.  So restoration become a critical component of a landscape that retains some intact ecosystems, but has seen extensive anthropogenic change, particularly in southern Canada.

Figure 2. From Walzer et al. (2013), protected area management must include consideration of natural and management best practices, while considering the needs of the public.  Each of these may at times be at odds with one another, and so interdisciplinary research into each context is required.

Figure 2. From Walzer et al. (2013), protected area management must include consideration of natural and management best practices, while considering the needs of the public. Each of these may at times be at odds with one another, and so interdisciplinary research into each context is required.

The Chapter ultimately stakes out a position that maintaining biodiversity in the face of changing climate requires a process that involves protecting intact ecosystems, connecting protected areas and restoring degraded ecosystems, or ecosystems facing strong external pressures.  This framework helps buffer changes, provides an opportunity for ongoing management in high risk ecosystems, and highlights the need for ongoing targeted scientific advice in the ongoing management of our protected areas to be balanced with fundamental research into the impacts of climate change on ecosystems and communities at a regional and global scale.