Modulo:Demografia: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
r
Moroboshi (discussione | contributi)
r
Riga 39:
end
 
local function p.get_wikidata(from)
local populationspopulations_raw = mWikidata._getProperty({'P1082', from=from, rank='normal'}, true)
local populations_reverse = {}
local years = {}
for i =1, #populationspopulations_raw do -- per il momento inserisco come anni una sequenza numerica
yearspopulations_reverse[i] = populations_raw[#populationspopulations_raw-i+1]
years[i] = i
end
return years,populationspopulations_reverse
end
 
function p._demografia(args)
local years,populations = read_array(args)
--if #years == 0 then
-- years,populations = get_wikidtaget_wikidata(args.from)
--end
local graph = {}
local popmax = 0