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

British Tabloid Hysteria Correlation

This plot is broken.

ans =

   311

Error using horzcat
Dimensions of matrices being concatenated are not consistent.

How does newspaper hysteria correlate? Do groups of newspapers feel fear at the same time?

This graph uses trends which have been calculated by looking at the front page of each associated news website and deriving a hysteria metric, the heat map corresponds to how each time series correlate with one another.

A red value indicates that two newspapers use a similar volume of hysterical keywords at any given time. A blue value on the other hand indicates a negative correlation, something which could potentially be seen between newspapers on opposing sides of the political spectrum.

Plot Image
data1362 = interp1(time1362, data1362, time1363);
data1361 = interp1(time1361, data1361, time1363);
data1360 = interp1(time1360, data1360, time1363);
data1359 = interp1(time1359, data1359, time1363);
data1358 = interp1(time1358, data1358, time1363);
data1357 = interp1(time1357, data1357, time1363);
data1356 = interp1(time1356, data1356, time1363);
data1427 = interp1(time1427, data1427, time1363);

figure;

%---------- 1

subplot(2,2,1); imagesc(corrcoef([data1363 data1362 data1361 data1360 data1359 data1358 data1357 data1356 data1427],'rows','pairwise'),[-1 1]);

mylabels = {'Telegraph', 'Guardian', 'Independent', 'Daily Star', 'BBC News','Mirror','Sun', 'Daily Mail','Times'};
myShortlabels = {'Tele', 'Guar', 'Indy', 'Star', 'BBC','Mirr','Sun', 'Mail','Times'};

set(gca, 'YTick', 1:9)
set(gca, 'YTickLabel', mylabels);
set(gca, 'XTickLabel', {});

colormap(interp1(1:3, [0 36 125; 255 255 255; 207 20 43]/256, linspace(1, 3, 64)));

myPos = get(gca, 'Position');
myPos(3) = 1/0.95*myPos(3);
myPos(2) = 0.9*myPos(2);
set(gca, 'Position', myPos)

%---------- 2

subplot(2,2,2); imagesc(fliplr(corrcoef([data1363 data1362 data1361 data1360 data1359 data1358 data1357 data1356 data1427],'rows','pairwise')),[-1 1]);

set(gca, 'YTick', 1:9)
set(gca, 'YTickLabel', mylabels);
set(gca, 'XTickLabel', {});

colormap(interp1(1:3, [0 36 125; 255 255 255; 207 20 43]/256, linspace(1, 3, 64)));
set(gca,'YAxisLocation', 'right')

myPos = get(gca, 'Position');
myPos(1) = 0.95*myPos(1);
myPos(2) = 0.9*myPos(2);
set(gca, 'Position', myPos)

%---------- 3

subplot(2,2,3); imagesc((fliplr(corrcoef([data1363 data1362 data1361 data1360 data1359 data1358 data1357 data1356 data1427],'rows','pairwise')))',[-1 1]);

set(gca, 'YTick', 1:9)
set(gca, 'YTickLabel', fliplr(mylabels));
set(gca, 'XTickLabel', {});


hText = text(1:9, 9.53*ones(1,9), myShortlabels);
set(hText,'Rotation',90,'HorizontalAlignment','right')

colormap(interp1(1:3, [0 36 125; 255 255 255; 207 20 43]/256, linspace(1, 3, 64)));

myPos = get(gca, 'Position');
myPos(3) = 1/0.95*myPos(3);
myPos(4) = 1/0.95*myPos(4);
set(gca, 'Position', myPos)

%---------- 4

subplot(2,2,4); imagesc(rot90(corrcoef([data1363 data1362 data1361 data1360 data1359 data1358 data1357 data1356 data1427],'rows','pairwise'),2),[-1 1]);

set(gca, 'YTick', 1:9)
set(gca, 'YTickLabel', fliplr(mylabels));
set(gca, 'XTickLabel', {});

hText = text(1:9, 9.53*ones(1,9), fliplr(myShortlabels));
set(hText,'Rotation',90,'HorizontalAlignment','right')

colormap(interp1(1:3, [0 36 125; 255 255 255; 207 20 43]/256, linspace(1, 3, 64)));

set(gca,'YAxisLocation', 'right')

myPos = get(gca, 'Position');
myPos(1) = 0.95*myPos(1);
myPos(4) = 1/0.95*myPos(4);
set(gca, 'Position', myPos)

% Decorations

axes('Position', [0.324 0.1 0.25 0.785], 'Visible', 'off');
colorbar('YTickLabels',{})

axes('Position', [0.095 0.461 0.815 0.2], 'Visible', 'off');
colorbar('XTickLabels',{}, 'location', 'South')
Tags:

    Add Tags


    6 comments

    Would you consider using a different colormap? Something that makes the gradient look monotonic (like the grayscale)?

    Hmmm, I see your point. I'm quite keen to distinguish zero though. I have an idea.

    (A patriotic idea)

    Well done sir. Rule Britannia!

    I'm afraid it won't look quite so authentic when the Times gets more data points. I've printed off a screenshot to hang next to my desk.

    That is truly fantastic.