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


Plot for Truthfulness of certain Political Figures

Included from trend description:

This data is a representation of data taken from:

The data is a normalized value of truthfulness for each person, where 1 is always tells the truth, and -1 is always lies.

I was inspired by:

however, my scoring algorithm uses the following mapping:

 True          =  1
 Mostly True   =  2/3
 Half True     =  1/3
 Mostly False  = -1/3
 False         = -2/3
 Pants on Fire = -1

and then normalizes the data based on the maximum possible score they could have received to reduce the difference between people that have vastly different numbers of entries on the site.

Plot Image
% Truthfulness of certain Political Figures
%   time vector is: time2160
%   data vector is: data2160

people = {'B. Obama','J. Boehner','M. McConnell','N. Pelosi','H. Reid'};

t = time2160;
d = data2160;

for i = 1:length(people)
    diffData(:,i) = diff([-2; d(:,i)]);
    changeLocations{:, i} = find(diffData(:,i));
    changeLocations{:, i} = sort([changeLocations{:, i}-1; changeLocations{:, i}]);
    changeLocations{:, i}(1) = [];
    index{:, i} = false(1, length(d(:,i)));
    index{i}(end) = true;
    index{i}(changeLocations{i}) = true;

hPlot = plot(t(index{1}), d(index{1}, 1),'-o',...
             t(index{2}), d(index{2}, 2),'-o',...
             t(index{3}), d(index{3}, 3),'-o',...
             t(index{4}), d(index{4}, 4),'-o',...
             t(index{5}), d(index{5}, 5),'-o');
legend(people, 'Orientation', 'horizontal')

ylim([-1, 1])

hold on

line(xlim, [0, 0], 'Color', 'k')


Add Tags