In this interview series, the RSE team talk to University of Sheffield students about the role of coding in their research.
She's in the final year of her PhD in the Department of Animal and Plant Sciences studying the interactions between land-use and climate change in tropical rainforests and what this means for biodiversity conservation. She's currently looking into how deforestation affects forest connectivity, so lots of spatial analyses. She mainly codes in R but also I dabbles in a bit of Python.
How did you first get into coding?
What motivated you to learn? How and what did you start learning?
When I was an undergrad we did our statistics in R commander, which is a GUI (Graphical User Interface) for R. A supervisor wisely told me that there’d come a point when I couldn’t do what I needed using R commander alone, so I spent the summer before my final year grappling with R and cursing it profusely until I was somewhat competent.
What are your favourite coding tools?
I’m pretty in love with the R + RStudio + tidyverse combo. RStudio is an integrated development environment (IDE) for R, which basically makes coding look far less hideous, and which allows you to write, save and run code in a more efficient way. The tidyverse is “an opinionated collection of R packages designed for data science”. The various packages make data management/analysis/presentation much more intuitive for many people.
How do you think coding has helped you in your work?
For one thing it got me an internship at UNEP-WCMC (UN Environment World Conservation Monitoring Centre) after I finished my undergrad, and it subsequently helped me to get this PhD position! More fundamentally, coding has sped things up, enhanced the reproducibility of my work and my ability to collaborate with others, and has helped me tackle complex problems that I couldn’t have done manually.
Tell us about your favourite coding achievement.
I wrote a teeny R package to estimate the time of sunrise and sunset based on date and location. It’s actually a really simple implementation of solar calculations developed by NOAA for MS Excel, but it was instrumental to one of my thesis chapters and it was my first experience of making an R package. Check it out here: https://github.com/rasenior/SolarCalc!
How do you think these skills can be better supported in academia?
Since all researchers (students and supervisors alike) are judged primarily on their publication output, encouraging students to publish software would be an obvious place to start. In my field, the journal Methods in Ecology and Evolution is a very popular option for people seeking to publish R packages.
That said, not all coding results in something publishable and, in any case, the sharing of software via peer-reviewed publications is not always a good measure of its usefulness anyway. I think students should be encouraged to share their coding achievements with peers, and more broadly via online platforms such as GitHub and Gist. Software has made its way into academic impact reporting, so perhaps coding should also be more valued within progress reports and theses?
It would be great to see the teaching of coding broaden beyond statistics, especially within the life sciences. There is so much more to coding than conducting t-tests! With continuing advances in technology we have to grapple with much bigger and more varied datasets, analyse them in sometimes very complex ways, and present the methods and results in a clear and succinct format, all the while maintaining reproducibility as much as possible. That’s a whole heap of coding skills that are very infrequently taught!
How do you see coding fitting in with your future career?
Whether I stay in academia or not, I will continue coding. I hope that my coding skills will help me secure a research position post-PhD. I’m not sure yet exactly where my research will take me, but I hope it involves developing R packages and making pretty figures in ggplot.
Any coding advice for new PhD students?
Don’t be afraid to set aside time for learning something new. Learning takes time – accept that and incorporate it into your work schedule. You’re still a student and some of the skills you learn may open doors you didn’t even know were there.