/intro-to-tidyhydat-and-tidyverse

Introduction to R and the tidyverse in Hydrology

OtherNOASSERTION

img

Introduction to R and the tidyverse in Hydrology

This is the repo for Introduction to R and the tidyverse in Hydrology to be delivered at the Canadian Water Resources Association 2018 conference in Victoria, British Columbia on May 28, 2018. The workshop repo is currently under development and all materials should be considered a work in progress.

This is a 4 hour hands-on workshop that leans heavily on the book R for Data Science and on the tidyhydat package. This workshop is intended as an introduction for people interested in hydrological analysis and who would like to try using R. In this workshop you will learn how to:

  • Recognize basic elements of the R programming language
  • Use the R package tidyhydat to access realtime and historical Water Survey of Canada data directly from R
  • Conduct a variety basic data tidying steps
  • Generate high quality plots in R
  • Understand where and how to seek help for R
  • Take away your R recipes for future analysis

You will learn how to visualize and transform untidy data formats. Along the way, you will learn and use several packages from the tidyverse including ggplot2, dplyr, tidyr, and purrr. In addition, we will make use of the tidyhydat package, which imports and tidies Water Survey of Canada hydrometric data into R.

Software requirements

You will need a working installation of R and RStudio available from here:

Install R from here: https://cloud.r-project.org/

Install RStudio from here: https://www.rstudio.com/products/rstudio/download/#download

You'll need the following packages:

install.packages(c("tidyverse", "tidyhydat", "usethis", "rmarkdown"))

Then you can grab a local copy of all the slides, code and data:

usethis::use_course("https://bit.ly/2L95hCb")

To get back to this project later, double-click on "intro-to-tidyhydat-and-tidyverse.Rproj".

License

Creative Commons License

Original repo Data Science in the tidyverse by Charlotte Wickham is licensed under a Creative Commons Attribution 4.0 International License. Based on a work at https://github.com/rstudio/master-the-tidyverse.

Acknowledgements

I have forked this repo from Hadley Wickham who in turn forked it from Charlotte Wickham, who forked it from RStudio. The feel, look and flow of the material in this workshop was originally created by these authors. My main contribution was adapt the examples to hydrologically based data. Huge thanks to Hadley, Charlotte and Garrett for creating the slides and accompanying materials!