View source for Module:USHRseats
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
-- Returns the number of seats in the US House of Representatives held by a given state in a given year (If no year is given, the current number of seats is returned)
local p = {}
function p.main(frame)
state = frame.args[1]
if mw.ustring.len(state)>2 then
state = frame:expandTemplate{ title = 'ISO 3166 code', args = {"US", state} }
state = state:sub(4)
end
year = tonumber(frame.args[2])
if year then
census_number = (year - 1 - math.fmod(year-1,10))/10 - 178
end
states = {
AK = {'-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-', 1, 1, 1, 1, 1, 1, 1},
AL = {'-','-','-','-', 3, 5, 7, 7, 6, 8, 8, 9, 9, 10, 9, 9, 9, 8, 7, 7, 7, 7, 7, 7},
AR = {'-','-','-','-','-','-', 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 6, 4, 4, 4, 4, 4, 4, 4},
AZ = {'-','-','-','-','-','-','-','-','-','-','-','-','-', 1, 1, 2, 2, 3, 4, 5, 6, 8, 9, 9},
CA = {'-','-','-','-','-','-','-', 2, 3, 4, 6, 7, 8, 11, 20, 23, 30, 38, 43, 45, 52, 53, 53, 52},
CO = {'-','-','-','-','-','-','-','-','-','-', 1, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 7, 7, 8},
000
1:0
Template used on this page:
Return to Module:USHRseats.