文件交换Pick of the Week

我们最好的用户提交

Top Files and Authors

Sean本周将花费本周来庆祝文件交换的顶级文件和作者。

如您目前所知,Matlab Central正在庆祝其15th birthday。让我们首先使其基于文件交换生日蛋糕

生日快乐({'MATLAB''中央'},15)

内容

Top Files

我认为要看一件有趣的事情将是有史以来的最高文件,并且根据每个文件的下载总数下载的分发下载。

T = readtable('fx_downloads.xlsx');T = sortrows(T,'total_downloads',,,,'descend');

And the 15 most downloaded files are:

barh(T.total_downloads(1:15)); ax = gca; ax.YTickLabel = T.title(1:15); ax.YDir ='撤销';ax.xaxis.exponent = 0;ax.yaxis.ticklabelInterPreter ='没有任何';xlabel('Total Downloads')title('Top 15 Files'

It's not a surprise to me at all to seeexport_figat the top. We'll dig into it a bit more later. There are also three Arduino support packages up there. This isn't too surprising either given the popularity of Arduinos in recent years.

What about the distribution in number of downloads of all of the files? Let's look at a histogram of the number of files binned by number of downloads. Note, the log scale.

直方图(t.total_downloads,[logspace(0,5,30)inf] set(gca,'XScale',,,,'日志')xlabel('Total Downloads')ylabel('Number of Files')title('Download Distribution'

顶级作者

So which authors have the most files and downloads?

Sum the total number of downloads grouping by author.

作者= varfun(@sum,t,“分组”,,,,'creators_name',,,,“ inputvariobles”,,,,'total_downloads');摘要(作者)
Variables: Creators_name: 10468x1 cell string GroupCount: 10468x1 double Values: min 1 median 1 max 189 sum_total_downloads: 10468x1 double Values: min 1 median 1154 max 6.9059e+05

因此,看起来有10468个独特的作者。大多数人仅提交一个文件,一个人提交了189个文件。那是谁?

disp(作者(作者。groupcount== 189,:))
creators_name groupcount sum_total_downloads ______________________________________________________________________________________________________________________________Antonio Trujillo-Ortiz'189 3.7709E+05

What does the distribution of submitted files per author look like?

直方图(作者.groupcount)Set(GCA,'XScale',,,,'日志')axistightxlabel('Number of Files')ylabel(“作者数量”)title('Number of Files per Author'

What about the most downloaded author?

作者= sortrows(作者,'sum_total_downloads',,,,'descend');barh(furs.sum_total_downloads(1:15));ax = gca;ax.yticklabel = rution.creators_name(1:15);ax.ydir ='撤销';ax.xaxis.exponent = 0;ax.yaxis.ticklabelInterPreter ='没有任何';xlabel('Total Downloads')title('Top 15 Authors'

So what aboutexport_fig?它曾经属于原始作者奥利弗·伍德福德(Oliver Woodford)。2015年8月,Yair Altman接管了维护和所有权。我们拥有它的几年来,我们给予了Oliver的信誉是公平的。

I have another file that has export_fig's history. Read it in convert the date to约会时间for logical indexing and plotting. The original format was 'yyyyMmm', e.g. 2016M07 for July, 2016.

HistoryExportFig = readtable('monthly-export_fig_Downloads.xlsx');HistoryExportFig.MonthName_Download = datetime(HistoryExportFig.MonthName_Download,'InputFormat',,,,'yyyy''M''MM');summary(HistoryExportFig)
变量:monthame_download:88x1日期时间说明:原始列标题:'月份名称 - 下载'值:Min 01-apr-2009中位数16-NOV-2012 MAX 01-JUL-2016-JUL-2016 SourceFileID:88x1 Double Description:source liginal columd Stexplication:'source toursial column textring:'source toursial tearsing:'源文件ID'值:最小23629中位数23629最大23629 FileDownLoadCount:88x1双重说明:原始列标题:“文件下载计数”值:Min 555中位数2163.5 Max 4082

How hasexport_fig被时间使用吗?

plot(historyexportfig.monthname_download,historyexportfig.filedownloadcount)aug15 = dateTime(2015,8,0);抓住h = plot([Aug15 Aug15],ylim); legend(h,'Yair接管',,,,'地点',,,,'northwest')xlabel('时间')ylabel(“每月下载”)title('Monthly Export Fig Downloads'

So it looks likeexport_figuse is in decline. But don't worry, I don't think it's Yair's fault! MATLAB R2014b included a new graphics system in MATLAB. With this printing has become much improved which has removed usecases whereexport_figreally helped; for example, with antialiasing. As users migrate to newer releases, I'd expect to see this trend continue.

So what happens if we give Oliver credit for theexport_figdownloads leading up to August, 2015?

% Sum the file downloads before ownership transferredbeforeAug15 = HistoryExportFig.MonthName_Download < datetime(2015,8,18); export_fig_Oliver = sum(HistoryExportFig.FileDownloadCount(beforeAug15));%将其添加到Oliver的数量中idxoliver = find(strcmp(wurs.creators_name,'Oliver Woodford'));Author.sum_total_downloads(idxOliver) = Author.sum_total_downloads(idxOliver)+export_fig_Oliver;%重新分配作者= sortrows(作者,'sum_total_downloads',,,,'descend');

将奥利弗带入前15名足够了吗?

idxoliver = find(strcmp(wurs.creators_name,'Oliver Woodford'));disp([“奥利弗”的排名:'num2str(idxoliver)])
Oliver's ranking: 23

Not quite, but it brings him from 129th down to 23rd!

注释

What has been your "Top File" ever? Is there any other way you'd like me to slice this data? Let us knowhere




与Matlab®R2016A一起出版

|
  • 打印
  • 发送电子邮件

注释

To leave a comment, please clickhereto sign in to your MathWorks Account or create a new one.