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

Twitter: The number of times "classical music" was mentioned per minute.

This trend is broken.

Music Tweets/min, MinutesCovered
Index exceeds matrix dimensions.

1719

data points

Error

Description:

Twitter: The number of times "classical music" was mentioned per minute.

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

Time Recorded (time1968) Data (data1968)
05 Jun 2013 22:00:28 NaN
05 Jun 2013 21:00:28 [113.049267618468]
05 Jun 2013 20:00:31 [312.132360772866]
05 Jun 2013 19:00:29 [99.4145205238589]
05 Jun 2013 18:00:35 [137.824673487638]
% Code is based on the Scrapes Twitter to find "Mood of the World".

% Regular expression for pulling out dates/times
exp = '((31(?!\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\b|t)t?|Nov)(ember)?)))|((30|29)(?!\ Feb(ruary)?))|(29(?=\ Feb(ruary)?\ (((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8])\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\b|t)t?|Nov|Dec)(ember)?)\ ((1[6-9]|[2-9]\d)\d{2}) (([0-9])|([0-1][0-9])|([2][0-3])):(([0-9])|([0-5][0-9])):(([0-9])|([0-5][0-9]))[^[0-9]]';
urlHost = 'http://search.twitter.com/search.json';

% 1. Classical music
search{1} = '?q="classical+music"+OR+"#classical"+OR+"#classicalmusic"&rpp=100&result_type=recent';
emotion{1} = 'Classical     ';

disp('Music Tweets/min, MinutesCovered')
% I didn't realize "Trends" are scalars
% for loop=1:length(search)
loop = 1;
    url = [urlHost search{loop}];
    page = urlread(url);
    matches=regexp(page, exp, 'match');
    time1 = datenum(matches{1});

    url = [urlHost search{loop} '&page=15'];
    page = urlread(url);
    matches=regexp(page, exp, 'match');
    time2 = datenum(matches{end});

    seconds = (time1-time2)*24*60*60;
    tweetsPerMinute = (1400+length(matches))/(seconds / 60);

    disp([emotion{loop} num2str(tweetsPerMinute) ', ' num2str(seconds/60)])

% end

updatetrend(tweetsPerMinute);
Tags:

    Add Tags


    0 comments