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

Close-button

Average magnitude of earthquakes past day

  • Created by: Semin Ibisevic
  • Last ran: about 21 hours ago.
  • Auto-run in: about 3 hours.
  • Created on: 03 Jun 2012

545

data points

Description:

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

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

Time Recorded (time1713) Data (data1713)
19 Dec 2014 05:00:13 [1.94782608695652]
18 Dec 2014 05:00:13 [1.82049689440994]
17 Dec 2014 05:00:15 [1.80486111111111]
16 Dec 2014 05:00:14 [1.74657534246575]
15 Dec 2014 05:00:14 [1.9111801242236]
% -------------------------
% 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