Thursday, September 4, 2008

Mathworks File Exchange Profile Information - Part 1

I have been uploading files to the Mathworks File Exchange and have found that I get a sick pleasure looking at my profile page each morning and seeing what people are downloading.

So I thought I would write some MATLAB that would streamline my morning operation as well as gather some additional stats such as downloads/rank over time.

Part 1 - Retrieving File Exchange Profile Information

I've developed a simple function that will, given an Author ID download the Author's profile page from the Mathworks File Exchange and parse it for the Name, Total Downloads, Rank and the list of submitted files.

The function is available on the Mathworks File Exchange: Retrieve File Exchange Profile Information
function file_exchange_info = getFileExchangeProfileInfo(author_id)
%GETFILEEXCHANGEPROFILEINFO Retrieve File Exchange information
% file_exchange_info = GETFILEEXCHANGEPROFILEINFO(author_id) retrieves an
% Author's information from the Mathworks File Exchange
% (http://www.mathworks.com/matlabcentral/fileexchange/)
%
% file_exchange_info is a structure with the following fields:
%
% .author_id - As supplied to the function
% .author_name - Author name
% .rank - Author rank
% .num_downloads - Total number of downloads
% .submitted_files - An array of structures with the following fields:
% .id - File Exchange submission ID
% .num_downloads - Number of downloads for this submission
% .name - Number of reviews for this file
%
% If the File Exchange page could not be loaded, file_exchange_info will be
% returned empty.
%
% Examples:
% file_exchange_info = getFileExchangeProfileInfo(1109866) % My profile
%
% See also urlread


To use the script simply call it supplying the author if interest's Author ID. For example lets have a look at Stuart McGarrity's profile page with Author ID 126174 (currently the number 1 ranked author):
>> info = getFileExchangeProfileInfo(126174)
info =
author_id: 126174
author_name: 'Stuart McGarrity'
rank: 1
num_downloads: 163181
submitted_files: [1x23 struct]
Looking at each submitted file in particular:
>> for i = 1:length(info.submitted_files)
info.submitted_files(i)
end


ans =
id: 2262
name: '802.11b PHY Simulink Model'
num_downloads: 21054
ans =
id: 722
name: 'Bluetooth modulation and frequency hopping'
num_downloads: 19999
ans =
id: 724
name: 'DTMF generator and receiver'
num_downloads: 15117
ans =
id: 907
name: 'Bluetooth voice transmission'
num_downloads: 12225
ans =
id: 3213
name: '802.11b PHY MATLAB Code'
num_downloads: 11803
ans =
id: 2283
name: 'Bluetooth Full Duplex Voice and Data Transmission'
num_downloads: 10830
ans =
id: 746
name: 'IS-95A CDMA Power Control'
num_downloads: 10406
ans =
id: 787
name: 'IS-95A Mobile Phone Call Processing'
num_downloads: 9214
ans =
id: 4380
name: 'MATLAB for C/C++ Programmers'
num_downloads: 9174
ans =
id: 9060
name: 'Handling Large Data Sets Efficiently in MATLAB'
num_downloads: 8329
ans =
id: 7595
name: [1x59 char]
num_downloads: 8165
ans =
id: 2596
name: '10Base-T Ethernet'
num_downloads: 5366
ans =
id: 1550
name: 'Packet Switch'
num_downloads: 4564
ans =
id: 9622
name: 'MDF Import Tool and Function'
num_downloads: 3491
ans =
id: 3939
name: 'Import Fig File to Axes'
num_downloads: 2386
ans =
id: 6528
name: 'Introduction to MATLAB 7 Webinar Demonstrations'
num_downloads: 2168
ans =
id: 13548
name: 'chkmem'
num_downloads: 1941
ans =
id: 18972
name: [1x78 char]
num_downloads: 1941
ans =
id: 16075
name: 'Textscantool'
num_downloads: 1511
ans =
id: 18971
name: [1x70 char]
num_downloads: 1410
ans =
id: 14438
name: [1x69 char]
num_downloads: 924
ans =
id: 9298
name: 'Data and M-Files for Demonstrations on MATLAB Demo Page'
num_downloads: 663
ans =
id: 19540
name: [1x77 char]
num_downloads: 614

Part 2 of this post will detail how I will be using the information returned by this function over time.

Now all I need to do is write it!

No comments:

Post a Comment