The Trendy application is being retired in the new year. The new web application, ThingSpeak, offers similar functionality. We recommend that active Trendy users who are looking to create new trends use ThingSpeak. To begin collecting your data in ThingSpeak, please read the tutorial : ThingSpeak for Trendy users. Although Trendy no longer allows the creation of new trends, the application will still remain accessible until January 13, 2016. Until that date, you can view your current trends and download your data. After that date, your data will no longer be accessible. Thanks for using Trendy and we encourage you to check out ThingSpeak.

Close-button

Number of Followers for Matthew Simoneau (matthewsim) on Twitter

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.

157

data points

Disabled

Description:

Count the number of followers for Matthew Simoneau on Twitter.

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

Time Recorded (time1291) Data (data1291)
15 Jul 2012 06:11:43 NaN
14 Jul 2012 06:11:44 NaN
13 Jul 2012 06:11:28 NaN
12 Jul 2012 06:11:42 NaN
11 Jul 2012 06:11:14 NaN
% Initialize the HTML parser, which happens to ship with MATLAB.
htmlConfiguration = org.cyberneko.html.HTMLConfiguration();
parser = org.apache.xerces.parsers.DOMParser(htmlConfiguration);

% Keep trying until we get an answer.
followers = [];
for tries = 1:10
    % Dowload and parse the page.
    parser.parse('http://twitter.com/matthewsim');
    
    % Scrape the number out of the parsed page.
    spans = parser.getDocument.getElementsByTagName('SPAN');
    for iSpans = 1:spans.getLength()
        span = spans.item(iSpans-1);
        id = char(span.getAttribute('id'));
        if strcmp(id,'follower_count')
            followers = str2double(char(span.getTextContent()));
        end
    end
    
    % How did we do?
    if isempty(followers)
        % Probably the page didn't download correctly. Wait and try again.
        pause(1)
    else
        % We're done!
        break
    end
end

% Return the result.
updatetrend(followers);
Tags:

    Add Tags


    0 comments