Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a4504978a92e86cd

Jump to content

Module:Legislature/US/lower

From Wikipedia, the free encyclopedia
local p = {}

p.name = "House of Representatives"
p.majority = "R"

-- just some ideas below for stuff that might be useful to include here. this would be stuff that is specific to the US House and no other legislature

-- Data structure for non-voting members
local nonVotingMembers = {
    ["AS"] = {title = "Delegate", term = 2},
    ["DC"] = {title = "Delegate", term = 2},
    ["GU"] = {title = "Delegate", term = 2},
    ["MP"] = {title = "Delegate", term = 2},
    ["PR"] = {title = "Resident Commissioner", term = 4},
    ["VI"] = {title = "Delegate", term = 2}
}

-- Function: isNonVotingEntity
-- Returns the title and term length if the input corresponds to a 
-- U.S. House non-voting jurisdiction, otherwise returns nil.
-- Use: {{#invoke:USHouseData|isNonVotingEntity|Puerto Rico}}
function p.isNonVotingEntity(frame)
    local entity = frame.args[1]
    local info = nonVotingMembers[entity]
    
    if info then
        return info.title, info.term
    end
    return nil
end

return p