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


Up and Coming Editors on Answers

  • Created by: Ned Gulley
  • Latest result: Plot created
  • Created on: 12 Jul 2012
  • Liked: 3 times

These are the top ten contributors to Answers that have less than 3000 points (once you get to 3000, you have all editing privileges).

Plot Image
% Top 10 Sub-3000 Contributors in Answers
%   time vector is: time1756
%   data vector is: data1756

t = time1756;
d = data1756;
keep = t>(now-182);
t = t(keep);
d = d(keep,:);
v = [];
for i = 1:length(t)
    for j = 1:(size(d,2)/2)
        v(end+1,:) = [t(i) d(i,[2*j-1 2*j])];

namelist = { ...
  4211382,'Geoff Hayes';
  1187260,'Roger Stafford';
  434782,'Walter Roberson';
  869888,'Jan Simon';
  3208495,'Sean de Wolski';
  35831,'Fangjun Jiang';
  1343420,'Image Analyst';
  2823630,'Andrei  Bobrov';
  1280935,'Kaustubha Govind';
  688530,'Matt Fig';
  1597503,'Wayne King';
  1886545,'Oleg Komarov';
  2021205,'Paulo Silva';
  1841757,'the cyclist';
  631608,'Andrew Newell';
  1455089,'Matt Tearle';
  695467,'Titus Edelhofer';
  3022333,'Arnaud Miege';
  415894,'David Young';
  2038935,'Chandra Kurniawan';
  1297596,'Honglei Chen';
  1905880,'Teja Muppirala';
  646,'Andreas Goser';
  1078046,'Cedric Wannaz';
  1861624,'Grzegorz Knor';
  1670,'per isakson';
  1061251,'Rick Rosson';
  756104,'James Tursa';
  1287414,'Edric Ellis';
  869871,'Jiro Doke';
  1248313,'Guy Rouleau';
  3092678,'Elige Grant';
  884449,'Jason Ross';
  869436,'Doug Hull';
  1415857,'Patrick Kalita';
  2391181,'Aurelien Queffurust';
  869215,'John D''Errico';
  495579,'Jarrod Rivituso';
  1251008,'Tom Lane';
  1421875,'Chirag Gupta';
  870621,'Richard Brown';
  1668388,'Laura Proctor';
  506242,'Robert Cumming';
  1068471,'Ken Atwell';
  2929937,'Greg Heath';
  2872967,'Azzi Abdelmalek';
  1440443,'Matt J';
  3559595,'Mischa Kim';
  99682,'Star Strider';

nameHash = java.util.Hashtable; 
for i = 1:size(namelist,1)

profids = d(end,1:2:end);

leaderNameList = {};
hold all
for i = 1:length(profids)
  ix = v(:,2)==profids(i);
  t1 = v(ix,1);
  d1 = v(ix,3);
  name = nameHash.get(profids(i));
  if isempty(name)
    name = 'UNKNOWN';
  leaderNameList{end+1} = name;
hold off

%% For making the name list

% url = '';
% html = urlread(url);
% % /matlabcentral/answers/contributors/646-andreas-goser"><img alt="Andreas Goser"
% tk = regexp(html,'/matlabcentral/answers/contributors/(\d+)[^"]*?"><img alt="(.*?)"','tokens');
% fprintf('namelist = { ...\n');
% for i = 1:length(tk)
%     fprintf('  %s,''%s'';\n',tk{i}{1},tk{i}{2});
% end
% fprintf('};\n');

Add Tags


Image Analyst 5 months ago

How do you run this? Copying and pasting the code gives the error

Undefined function or variable 'time1756'.
Error in test3 (line 5)
t = time1756;

The first line says "Top players in Cody" - do I need to do something in Cody first?

Ned Gulley 5 months ago

The comment about Cody was a copy-and-paste mistake. Thanks for pointing it out. Running the code outside the context of Trendy is a little tricky, since you need to bring the data down from the site. Here's a post that might help:

Image Analyst 3 months ago

There are two curves for blue, green, and red. We don't know which red curve is which person. Can you make all the colors be unique?

Ned Gulley 3 months ago

I tightened the time view a little and tried to make the colors more obviously unique.

Image Analyst about 1 month ago

Better. The two lime green lines are still pretty close by my eyes and my monitors.

Ned Gulley about 1 month ago

I've ordered the lines in the legend based on where they are from top to bottom on the last day. That should help disambiguate a little.

Image Analyst about 1 month ago

Yes, that's good. How about another trendy that works with the top 10 contributors?