Template:CountryTable

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{#def:namespace|Reference}}
 +
[[Reference:Country|«UP one level]]
 +
<small>To add/edit your information, click the edit tab above, and edit "&&"-separated information. (Remember to use "&&"!)</small>
 
<table>
 
<table>
 
<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>
Line 5: Line 8:
 
{{#lua:
 
{{#lua:
 
   local auCount = {};
 
   local auCount = {};
  local afCount = {};
 
  local au, inst;
 
 
   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 19:
 
   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 30:
 
     end
 
     end
 
   end
 
   end
  print(it);
 
 
   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 56: Line 57:
 
{{#repeatNum: TableRow3/Country|3|
 
{{#repeatNum: TableRow3/Country|3|
 
<!---START OF Author & Affiliation & Country --->
 
<!---START OF Author & Affiliation & Country --->
{{{1|}}}
+
{{#ifeq:{{#substring:{{{1|}}}|0|2}}|&&|{{#cdr:{{{1|}}}|&&}}|{{{1|}}}}}
 
<!---END OF Author & Affiliation & Country --->
 
<!---END OF Author & Affiliation & Country --->
 
|&&}}
 
|&&}}
 
|}
 
|}

Latest revision as of 01:39, 7 December 2010

«UP one level To add/edit your information, click the edit tab above, and edit "&&"-separated information. (Remember to use "&&"!)

Top 5 institutes in this country (total 0 authors)
Author Affiliation Country
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox