User:Joalpe/sandbox/federal

{{{{{|safesubst: }}}#invoke:String|replace SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item_position wdt:P361* wd:Q17813784. ?item_position wdt:P1697 ?valids. ?item_position wdt:P31 wd:Q40231. ?item_position (wdt:P541/wdt:P279*) wd:Q20058725. OPTIONAL {?item_position p:P726 ?statement.} OPTIONAL {?item_position p:P991 ?statement.} OPTIONAL {?statement ps:P726 ?item.} OPTIONAL {?statement ps:P991 ?item.}
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{{{{|safesubst: }}}#invoke:String|replace
 * source={{Wikidata list
 * sparql=SELECT ?item ?party ?acron ?alliance ?item_position ?votes ?valids ?result ?vice WHERE {

OPTIONAL {?statement pq:P1111 ?votes.} OPTIONAL {?statement pq:P102 ?party.} OPTIONAL {?statement pq:P5832 ?alliance.} OPTIONAL {?party wdt:P1813 ?acron.} OPTIONAL {?statement pq:P6149 ?vice.}

BIND(IF (EXISTS {?item_position wdt:P991 ?item}, "9aed9e","f8f9fa") as ?result) } ORDER BY DESC(?votes) }}
 * columns=label:Candidate, ?votes:Votes received,?valids:Percentage, ?result, ?party, ?alliance, ?vice, ?acron
 * section=?item_position
 * sort=
 * min_section=1
 * thumb=128si
 * autolist=fallback
 * wdedit=yes
 * links=red
 * row_template=subst:Template:Mbabel-BSE/Legislative row
 * header_template=subst:Template:Mbabel-BSE/Legislative header

State elections in Acre in 2014 for Federal Deputy
class='wikitable sortable wd_can_edit' style='width:100%' !Candidate !Party !Coallition !Votes received !Percentage - style="background-color:#9aed9e;" Raimundo Angelim style="background-color:#9aed9e; text-align: center" Workers' Party (PT) style="background-color:#9aed9e; text-align: center" Q48939052 style="background-color:#9aed9e; text-align: center" 39844 style="background-color:#9aed9e; text-align: center" 9.98% - style="background-color:#9aed9e;" Carlos César Correia de Messias style="background-color:#9aed9e; text-align: center" Brazilian Socialist Party (PSB) style="background-color:#9aed9e; text-align: center" Q48939052 style="background-color:#9aed9e; text-align: center" 26448 style="background-color:#9aed9e; text-align: center" 6.63% - style="background-color:#9aed9e;" Major Rocha style="background-color:#9aed9e; text-align: center" Brazilian Social Democracy Party (PSDB) style="background-color:#9aed9e; text-align: center" Alliance For A Better Acre style="background-color:#9aed9e; text-align: center" 23466 style="background-color:#9aed9e; text-align: center" 5.88% - style="background-color:#9aed9e;" Leo de Brito style="background-color:#9aed9e; text-align: center" Workers' Party (PT) style="background-color:#9aed9e; text-align: center" Q48939052 style="background-color:#9aed9e; text-align: center" 20876 style="background-color:#9aed9e; text-align: center" 5.23% - style="background-color:#9aed9e;" Jéssica Sales style="background-color:#9aed9e; text-align: center" Democratic Movement Party (MDB) style="background-color:#9aed9e; text-align: center" Alliance For A Better Acre style="background-color:#9aed9e; text-align: center" 20339 style="background-color:#9aed9e; text-align: center" 5.09% - style="background-color:#9aed9e;" Sibá Machado style="background-color:#9aed9e; text-align: center" Workers' Party (PT) style="background-color:#9aed9e; text-align: center" Q48939052 style="background-color:#9aed9e; text-align: center" 18395 style="background-color:#9aed9e; text-align: center" 4.61% - style="background-color:#9aed9e;" Flaviano Melo style="background-color:#9aed9e; text-align: center" Democratic Movement Party (MDB) style="background-color:#9aed9e; text-align: center" Alliance For A Better Acre style="background-color:#9aed9e; text-align: center" 18372 style="background-color:#9aed9e; text-align: center" 4.6% - style="background-color:#9aed9e;" Alan Rick Miranda style="background-color:#9aed9e; text-align: center" Brazilian Republican Party (PRB) style="background-color:#9aed9e; text-align: center" Q48939052 style="background-color:#9aed9e; text-align: center" 17903 style="background-color:#9aed9e; text-align: center" 4.48%
 * }

}} = }} }} {| The Superior Electoral Court counted 11,851 blank votes and 7,720 spoilt votes in the decision for the office of federal deputy in the 2014 Acre gubernatorial election. With 399,201 valid votes, 8 deputies were elected. Of a total of 506,520 eligible voters, 87,748 (NaN%) did not attend the ballot in the first round.
 * pattern=
 * replace=
 * pattern=
 * replace==
 * pattern===
 * replace====
 * pattern====
 * replace====