15.075
Bearbeitungen
(Leerzeichen vor Prozent) |
(unbekannt) |
||
| Zeile 88: | Zeile 88: | ||
t = t .. "Auszeichnungen gefunden" | t = t .. "Auszeichnungen gefunden" | ||
if attr["Geschlecht"] == nil then | if attr["Geschlecht"] == nil then | ||
local n_basis_ort_weiblich = mw.smw.ask(page_selector_basis .. page_selector_ort .. page_selector_weiblich .. "| format=count | limit=10000") | |||
local n_basis_ort_maennlich = mw.smw.ask(page_selector_basis .. page_selector_ort .. page_selector_maennlich .. "| format=count | limit=10000") | |||
local n_basis_ort_divers = mw.smw.ask(page_selector_basis .. page_selector_ort .. page_selector_divers .. "| format=count | limit=10000") | |||
local n_basis_ort_unbekannt = n_basis_ort_geschlecht - n_basis_ort_weiblich - n_basis_ort_maennlich - n_basis_ort_divers | |||
local p_basis_ort_weiblich = math.floor(n_basis_ort_weiblich / n_basis_ort_geschlecht * 100 + 0.5) | |||
local p_basis_ort_maennlich = math.floor(n_basis_ort_maennlich / n_basis_ort_geschlecht * 100 + 0.5) | |||
local p_basis_ort_divers = math.floor(n_basis_ort_divers / n_basis_ort_geschlecht * 100 + 0.5) | |||
t = t .. "<br>→ davon " .. n_basis_ort_weiblich .. " (" .. p_basis_ort_weiblich.. " %) Frauen" | t = t .. "<br>→ davon " .. n_basis_ort_weiblich .. " (" .. p_basis_ort_weiblich.. " %) Frauen" | ||
t = t .. ", " .. n_basis_ort_maennlich .. " (" .. p_basis_ort_maennlich.. " %) Männer" | t = t .. ", " .. n_basis_ort_maennlich .. " (" .. p_basis_ort_maennlich.. " %) Männer" | ||
t = t .. " und " .. n_basis_ort_divers .. " (" .. p_basis_ort_divers.. " %) Divers '''( | t = t .. " und " .. n_basis_ort_divers .. " (" .. p_basis_ort_divers.. " %) Divers" | ||
if n_basis_ort_unbekannt > 0 then | |||
t = t .. " '''(bei " .. n_basis_ort_unbekannt .. " unbekannt)'''" | |||
end | |||
end | end | ||
if attr["Geburtsort"] == nil then | if attr["Geburtsort"] == nil then | ||
local n_basis_fuerth_geschlecht = mw.smw.ask(page_selector_basis .. page_selector_fuerth .. page_selector_geschlecht .. "| format=count | limit=10000") | local n_basis_fuerth_geschlecht = mw.smw.ask(page_selector_basis .. page_selector_fuerth .. page_selector_geschlecht .. "| format=count | limit=10000") | ||
local n_basis_ausserhalb_geschlecht = mw.smw.ask(page_selector_basis .. page_selector_ausserhalb .. page_selector_geschlecht .. "| format=count | limit=10000") | local n_basis_ausserhalb_geschlecht = mw.smw.ask(page_selector_basis .. page_selector_ausserhalb .. page_selector_geschlecht .. "| format=count | limit=10000") | ||
local n_basis_unbekannt_geschlecht = n_basis_ort_geschlecht - n_basis_fuerth_geschlecht - n_basis_ausserhalb_geschlecht | |||
local p_basis_fuerth_geschlecht = math.floor(n_basis_fuerth_geschlecht / n_basis_ort_geschlecht * 100 + 0.5) | local p_basis_fuerth_geschlecht = math.floor(n_basis_fuerth_geschlecht / n_basis_ort_geschlecht * 100 + 0.5) | ||
local p_basis_ausserhalb_geschlecht = math.floor(n_basis_ausserhalb_geschlecht / n_basis_ort_geschlecht * 100 + 0.5) | local p_basis_ausserhalb_geschlecht = math.floor(n_basis_ausserhalb_geschlecht / n_basis_ort_geschlecht * 100 + 0.5) | ||
t = t .. "<br>→ davon " .. n_basis_fuerth_geschlecht .. " (" .. p_basis_fuerth_geschlecht.. " %) gebürtige Fürther" | t = t .. "<br>→ davon " .. n_basis_fuerth_geschlecht .. " (" .. p_basis_fuerth_geschlecht.. " %) gebürtige Fürther" | ||
t = t .. " und " .. n_basis_ausserhalb_geschlecht .. " (" .. p_basis_ausserhalb_geschlecht.. " %) außerhalb Fürths geboren '''(ggf. Rest nicht angegeben)'''" | t = t .. " und " .. n_basis_ausserhalb_geschlecht .. " (" .. p_basis_ausserhalb_geschlecht.. " %) außerhalb Fürths geboren '''(ggf. Rest nicht angegeben)'''" | ||
if n_basis_unbekannt_geschlecht > 0 then | |||
t = t .. " '''(bei " .. n_basis_unbekannt_geschlecht .. " unbekannt)'''" | |||
end | |||
end | end | ||
t = t .. "<br>'''" | t = t .. "<br>'''" | ||