Below are the solutions to here. exercises on “Seasonality and Trend Decomposition.” #################### # # # Exercise 1 # # # #################### #***This lines are setup of the the tutorial if(!require(ggplot2)){install.packages(ggplot2, dep=T)} # import datafiles # “C:/yourDir…/PAICOL.csv”#CHANGE the directory where the data is stored river_data <- read.csv(“D:/TRABAJO/BLOG/post1/PAICOL.csv”) # Convert strings values into dates river_data$DATE=as.Date(river_data$DATE,origin=river_data$DATE[1]) #*** […]

## R FOR HYDROLOGISTS – Seasonality and Trend Decomposition

R FOR HYDROLOGISTS SEASONALITY AND TREND DECOMPOSITION If you don’t have the data, please first get it from the first tutorial here. Also, you need to install and load the ggplot2 package. if(!require(ggplot2)){install.packages(ggplot2, dep=T)} Answers to these exercises are available here. Time series decomposition is a mathematical procedure which transforms a time series into multiple different […]

## R FOR HYDROLOGISTS – Correlation and Information Theory Measurements: Part 3: Exercises

R FOR HYDROLOGISTS CORRELATION AND INFORMATION THEORY MEASUREMENTS – PART 3 Before we begin, if you don’t have the data, first get it from the first tutorial here. You will also need to Install and load the ggplot2 and reshape2 packages. if(!require(ggplot2)){install.packages(ggplot2, dep=T)} if(!require(reshape2)){install.packages(reshape2, dep=T)} Answers to these exercises are available here. The mutual information quantifies […]

## R FOR HYDROLOGISTS – Correlation and Information Theory Measurements: Part 3: Solutions

Below are the solutions to these exercises on “R For Hydrologists: Part 3.” #################### # # # Exercise 1 # # # #################### #***This lines are setup of the the tutorial if(!require(ggplot2)){install.packages(ggplot2, dep=T)} if(!require(reshape2)){install.packages(reshape2, dep=T)} # import datafiles # “C:/yourDir…/PAICOL.csv”#CHANGE the directory where the data is stored river_data <- read.csv(“D:/TRABAJO/BLOG/post1/PAICOL.csv”) # Convert strings values into […]

## R FOR HYDROLOGISTS: Correlation and Information Theory Measurements – Part 2: Exercises

R FOR HYDROLOGISTS CORRELATION AND INFORMATION THEORY MEASUREMENTS (Part 2) Proposed back in the 40’s by Shannon Information theory provide a framework for the analysis of randomness in time-series, and information gain when comparing statistical models of inference. Information theory is based on probability theory and statistics. It often concerns itself with measures of information […]

## R FOR HYDROLOGISTS: Correlation and Information Theory Measurements – Part 2: Solutions

Below are the solutions to these exercises on plotting-data. #################### # # # Exercise 1 # # # #################### #***This lines are setup of the the tutorial if(!require(ggplot2)){install.packages(ggplot2, dep=T)} if(!require(reshape2)){install.packages(reshape2, dep=T)} # import datafiles # “C:/yourDir…/PAICOL.csv”#CHANGE the directory where the data is stored river_data <- read.csv(“D:/TRABAJO/BLOG/post1/PAICOL.csv”) # Convert strings values into dates river_data$DATE=as.Date(river_data$DATE,origin=river_data$DATE[1]) #*** # […]

## R FOR HYDROLOGISTS – Part 1: Correlation and Information Theory Measurements: Solution

Below are the solutions to these exercises #################### # # # Exercise 1 # # # #################### #***This lines are setup of the the tutorial if(!require(ggplot2)){install.packages(ggplot2, dep=T)} if(!require(GGally)){install.packages(GGally, dep=T)} if(!require(forecast)){install.packages(forecast, dep=T)} # import datafiles # "C:/yourDir…/PAICOL.csv"#CHANGE the directory where the data is stored river_data <- read.csv("D:/TRABAJO/BLOG/post1/PAICOL.csv") # Convert strings values into dates river_data$DATE=as.Date(river_data$DATE,origin=river_data$DATE[1]) #*** #Calculate […]

## R FOR HYDROLOGISTS – Part 1: Correlation and Information Theory Measurements

R FOR HYDROLOGISTS CORRELATION AND INFORMATION THEORY MEASUREMENTS (Part 1) In this tutorial, we will show you how to apply tools, such as the correlation, auto-correlation, entropy, and mutual information as an introductory exercise in the analysis of time series dynamics. The first measurement that we will calculate will be the linear correlation. This statistic […]

## R FOR HYDROLOGISTS – Part 3: Loading and Plotting Data: Solutions

Below are the solutions to these exercises on “Loading and Plotting Data.” #################### # # # Exercise 1 # # # #################### #***This lines are from part 1 of the tutorial # import datafile # “C:/yourDir…/PAICOL.csv”#CHANGE the directory where the data is stored river_data <- read.csv(“D:/TRABAJO/BLOG/post1/PAICOL.csv”) # Convert strings values into dates river_data$DATE=as.Date(river_data$DATE,origin=river_data$DATE[1]) # Imports […]

## R FOR HYDROLOGISTS – Part 3: Loading and Plotting Data: Exercises

R FOR HYDROLOGISTS LOADING AND PLOTTING THE DATA (Part 3) Creating a box plot of the data can be a good approach to inspect the historical behavior of the river level and can show us how the data spreads in different time indexing (Month/ Year). If you are not familiar with this, a boxplot is […]