This exercise is the last series of basic analysis of hydrological data. We will use a precipitation dataset from the previous exercise here and additional flow data at Saugeen here. At this time, we will explore seasonal analysis and visualization, including creating a hydrograph and a hydrograph with baseflow and additional plot and flow duration […]

# Exercises (intermediate)

## Introduction to Statistical Testing and Sampling Exercises (Part 2)

This is part 2 in a series on statistical theory using R. For part 1, go here. This tutorial concerns itself with MLE calculations and bootstrapping. Answers to the exercises are available here. Exercise 1 Set a seed to 123 and create the following dataframe: lifespans = data.frame(index = 1:200, lifespans = rgamma(200, shape = 2, […]

## Easy Web Scraping With Rvest: Exercises

The Internet is full of interesting data, there’s no doubt about it. Some sites, such as Twitter, provide users with systemized access (API) around which some neat R packages have been built. In this exercise set, we practice much more general techniques of extracting/scraping data from the web directly, using the rvest package. Note […]

## Tensorflow – Basics Part 1: Exercises

Tensorflow is an open source, software library for numerical computation using data flow graphs. Nodes in the graph are called ops (short for operations), while the graph edges represent the R multidimensional data arrays (tensors) communicated between them. An op takes zero or more Tensors, performs some computation, and produces zero or more Tensors. In […]

## Basic Time-Series Hydro-logical Data Analysis (Part 1)

Time series dataset is a well-recognized data type for modeling and forecasting purposes. However, the application in R may vary depending on the research areas. In this exercise set, we will explore basic analysis for time series hydrological data in R . We will also introduce the hydroTSM package; a useful package in hydrology. Hydro TSM is […]

## Text Data Wrangling: Exercises

In a previous exercise set, we practiced retrieving data from Twitter. In this exercise, we start getting comfortable with manipulating text data. We will start by refreshing our memory on how to use some base-R functions, then we start using the tm package. Answers to the exercises are available here. Exercise 1 Use readLines to […]

## Power Analysis: Exercises

Proper experimental design can save you a lot of headaches and wasted effort. One experimental design tool is often called a Power Analysis. A Power Analysis lets you determine if your design will have enough power to detect an effect. Statistical power is the probability of detecting a trend, given a trend actually exists. Importantly, […]

## Survival Analysis: Exercises (Part 2)

This is the second part of a series on conducting Survival Analysis in R using Survival and Survminer. It is advised to first complete the first set of exercises (here) before attempting these, as there is a direct continuation of knowledge. The second part of this series focuses on more complex and insightful methods through […]

## Building a Neural Network Using the Iris Data Set: Exercises

Neural Networks is one of the most common machine learning algorithms and with good reason. Neural networks are particularly good when applied to problems, such as image recognition and natural language processing, where there is a large amount of input data. Through an input layer, one or more hidden layers, and an output layer, a […]

## Tidy Text Mining Exercises

Text mining can be messy. Tokenization, document-term matrices, lexicons… Lots of data structures and transformations between them. Fortunately, there is the tidytext package, which will help you to tidy this mess! Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to […]