These short sessions (45min to 1hr) will be focused on tools and practices for NMFS scientists to help you be faster, more efficient and organized in your coding and in merging reports with code. The focus of these workshops is practical skills and tools. Each session will be stand-alone. While the sessions will be introductory, I will give you links to my GitHub repositories that illustrate more complex examples (and that you can copy and build on).
Target audience: You already code in R, maybe use RStudio too, but want to learn some tips about being more efficient from a seasoned R programmer who does the kind of coding and work that you do.
About me: I am a modeler/applied mathematician and I am immersed in R. I develop R packages for public use. I teach time-series analysis at the University of Washington (using R) and I teach workshops on R and reproducible research.
Before the workshops, go to Set-up for instructions. Unless you will only be listening, you’ll need a GitHub account. To actively participate in the activities, you’ll want either R, RStudio and GitHub Desktop installed on your computer or you can use RStudio Cloud. If you do the latter, you don’t need to install any software.
Please email Eli (eli.holmes@noaa.gov) from your NOAA email, and I will send you the WebEx links and link to the GitHub Classroom. It is the same link for each session.
May 28 Introduction to workflow using RStudio and Git/GitHub. The session video will be posted June 2nd but the link has my lectures notes and short videos of the skills. Lecture notes and video links
June 4. More Git skills. The 3 key Git skills. These 3 basic skills are all you need for 95% of your work with Git repositories. The lecture notes, discussion and videos
June 11. GitHub skills. We’ll learn how to use issues and releases on GitHub to be more efficient either working alone or in a team. I’ll show you how I use organizations to organize my repositories and some of the nice ‘landing page’ features of GitHub. For those curious about GitHub Actions, I give you a short demo on that too. The lecture notes and discussion
June 18. Rmarkdown for reports. Let’s make a report that updates when our data change and post that to GitHub.
June 25. Making plots with ggplot2. Learning ggplot2 will make it much easier to make plots from the big and complex datasets that you deal with on a daily basis.
July 9. Intro to R packages for data and code. How to build an R package in RStudio. In the second half of the lecture, I will show you how to make an R data package and what that can do to allow data documentation, data revision tracking, data versioning and data sharing.
July 16. Intro to roxygen2 for documentation and pkgdown for package websites. Even if you don’t do the coding on your team, you should be aware of how documentation works so you can contribute and the tools for automating tasks like a project website so your team doesn’t fall into inefficient workflows.
July 23. Advanced topics for developers. How to set up a NAMESPACE, passing R CMD check
, debugging tools, coding GitHub Actions workflows, C++ code in your package. I am going to pass on tips to help you understand how these things work so you don’t waste hours figuring it out or fall back on hacky solutions.
I will make videos of this material.
Handy clustering tools in R
Making raster plots with the raster and tmap packages. Working with spatial data is a huge area. We are going to start gently by making raster plots and using the tmap package. You’ll see how easy it easy to make maps of data on a grid.
NWFSC Math Bio Program