
% Script to do simple analysis of drainage event identification array. Very
% simple stats. 

drainage_array = big_rapid_drainage_events; 
number_lakes = 512; 

number_events = size(drainage_array,1); 
disp(['Number of events is ' num2str(number_events)]) 

percentage_total = 100 / number_lakes * number_events; 
disp(['Percentage of total lakes draining rapidly is ' num2str(percentage_total)]) 

drain_date_error = mean(drainage_array(:,10)); 
disp(['Mean drainage date error is ' num2str(drain_date_error)]) 

mean_date = mean(drainage_array(:,9)); 
disp(['Mean drainage date is ' num2str(mean_date)]) 

mean_volume = mean(drainage_array(:,6)); 
disp(['Mean drainage volume is ' num2str(mean_volume)]) 

max_volume = max(drainage_array(:,6)); 
disp(['Maximum drainage volume is ' num2str(max_volume)]) 

median_volume = median(drainage_array(:,6)); 
disp(['Median drainage volume is ' num2str(median_volume)]) 

total_volume = sum(drainage_array(:,6)); 
disp(['Total drainage volume is ' num2str(total_volume)]) 

min_volume = min(drainage_array(:,6)); 
disp(['Minimum drainage volume is ' num2str(min_volume)]) 