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

Close-button

Premier League Point Totals

This trend is disabled.

Error using updatetrend (line 7)
The input must be a number or vector

This trend is disabled and will not collect data until re-enabled.

  • Created by: Ned Gulley
  • Last ran: 11 months ago.
  • Auto-run in: 11 months.
  • Created on: 04 Sep 2012

284

data points

Disabled

Description:

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

Time Recorded (time1798) Data (data1798)
17 Oct 2013 16:23:17 NaN
14 Jun 2013 08:15:43 [73 41 75 63 43 61 78 89 41 44 25 28 41 42 39 46 72 49 46 36]
13 Jun 2013 08:15:42 [73 41 75 63 43 61 78 89 41 44 25 28 41 42 39 46 72 49 46 36]
12 Jun 2013 08:15:48 [73 41 75 63 43 61 78 89 41 44 25 28 41 42 39 46 72 49 46 36]
11 Jun 2013 08:15:43 [73 41 75 63 43 61 78 89 41 44 25 28 41 42 39 46 72 49 46 36]
url = 'http://www.skysports.com/football/league/0,19540,11660,00.html';
html = urlread(url);

target = ['<a href="http://www1.skysports.com/football/teams/\w+">([ \w]+)</a>\s*</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>\d+</td>' ...
    '\s*<td>-?\d+</td>' ...
    '\s*<td>(\d+)</td>'];
tk = regexp(html,target,'tokens');

pts = zeros(size(tk));
for i = 1:length(tk)
    pts(i) = str2num(tk{i}{2});
end

names = [];
for i = 1:length(tk)
    names{i} = tk{i}{1};
end

[names,ix] = sort(names);
pts = pts(ix);

% fprintf('{')
% for i = 1:length(names)
%    fprintf('''%s'',\n',names{i})
% end
% fprintf('}')

updatetrend(pts)
Tags:

    Add Tags


    0 comments