Template:CountryTable
From Metabolomics.JP
(Difference between revisions)
Line 2: | Line 2: | ||
<th colspan=2>Top 5 institutes in this country (total {{#count:{{{1|}}}}} authors)</th> | <th colspan=2>Top 5 institutes in this country (total {{#count:{{{1|}}}}} authors)</th> | ||
<tr><td> | <tr><td> | ||
− | + | {{#repeat:List_Country/inst_rank|1| | |
{{#lua: | {{#lua: | ||
local auCount = {}; | local auCount = {}; | ||
− | |||
− | |||
for au, inst, cy in stdin:gmatch("&?&?([%w\. ]+)&&([%w\., ]+)&&([^\n]+)") do | for au, inst, cy in stdin:gmatch("&?&?([%w\. ]+)&&([%w\., ]+)&&([^\n]+)") do | ||
if (inst ~= nil) then | if (inst ~= nil) then | ||
Line 18: | Line 16: | ||
local hash = {}; | local hash = {}; | ||
local list = {}; | local list = {}; | ||
+ | local afCount = {}; | ||
for inst, num in pairs(auCount) do | for inst, num in pairs(auCount) do | ||
table.insert(list, num); | table.insert(list, num); | ||
Line 28: | Line 27: | ||
end | end | ||
end | end | ||
− | |||
table.sort(list); | table.sort(list); | ||
local i=0; | local i=0; | ||
local output = ""; | local output = ""; | ||
− | local num; | + | local num, inst; |
while(i < 5) do | while(i < 5) do | ||
num = table.remove(list); | num = table.remove(list); | ||
Line 41: | Line 39: | ||
end | end | ||
print(output); | print(output); | ||
− | |{{{1|}}} }} |&&}} | + | |{{{1|}}} }} |
+ | |&&}} | ||
</td> | </td> | ||
Revision as of 00:18, 16 September 2008
Top 5 institutes in this country (total 0 authors) |
---|
Author | Affiliation | Country |
---|