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

Close-button

Highest magnitude earthquake past day

835

data points

Description:

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

Time Recorded (time1714) Data (data1714)
25 Jan 2015 05:00:15 [4.9]
24 Jan 2015 05:00:17 [5.2]
23 Jan 2015 05:00:15 [6.8]
22 Jan 2015 05:00:16 [5.7]
21 Jan 2015 05:00:15 [5.6]
% -------------------------
% 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);

maxMagn = max(magnitudes_adj);

updatetrend(maxMagn );
Tags:

    Add Tags


    0 comments