Content deleted Content added
rank wikipedia sister project only; other sister projects in Module:NUMBEROF/other to split overhead |
|||
Line 1:
-- Return a table of statistics to be accessed once per page using mw.loadData.
--
local
'wikipedia',
local statistics = mw.ext.data.get('Wikipedia statistics/datarank.tab') -- https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/datarank.tab▼
}
local function getData(statistics)
local iSite, iArticles
for i, v in ipairs(statistics.schema.fields) do
Line 18 ⟶ 21:
end
return {
rankByIndex = rankByIndex, -- rankByIndex[1] == 'en
rankBySite = rankBySite, -- rankBySite['en
}
end
local function makeData()
-- For example, data to rank each language for sister project wikipedia is at
▲
local result = {}
for _, project in ipairs(projects) do
local file = 'Wikipedia statistics/rank/' .. project .. '.tab'
result[project] = getData(mw.ext.data.get(file))
end
return result
end
|