Since you are new, let us show you how Trendy works.

Close-button

Average magnitude of earthquakes past day

586

data points

Description:

Including all earthquakes in the world. Data provided by the Eearthquake Notification Service ENS.

Recently Collected Data (last 5 of 586) Show All Data

Time Recorded (time1713) Data (data1713)
29 Jan 2015 05:00:14 [1.74517374517374]
28 Jan 2015 05:00:15 [1.54744897959184]
27 Jan 2015 05:00:14 [1.53502824858757]
26 Jan 2015 05:00:13 [1.9878612716763]
25 Jan 2015 05:00:14 [1.88421052631579]
% -------------------------
% import and prepare data

url = 'http://earthquake.usgs.gov/earthquakes/feed/csv/all/day';
block = urlread(url);
fmt = '%s %s %s %s %s %s %s %s %s %s %s %s %s';
readData = textscan(block, fmt, 'delimiter', ',');


% -------------------------
% process
T = size(readData{5},1);
magnitudes = zeros(T-1,1);
for t = 2:T
magnitudes(t-1) = str2double( char( readData{5}(t) ) );
end

magNAN = isnan(magnitudes);
magnitudes_adj = magnitudes(magNAN==0);

avgMagn = mean(magnitudes_adj);

updatetrend(avgMagn);
Tags:

    Add Tags


    0 comments