User:Ederporto/sandbox/Acre, 2014/senator

{{{{{|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:Q18964326. 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 Senate
class='wikitable sortable wd_can_edit' style='width:100%' !Candidate !Party !Coallition !Votes received !Percentage - style="background-color:#9aed9e;" Gladson Cameli style="background-color:#9aed9e; text-align: center" Progressive Party (PP) style="background-color:#9aed9e; text-align: center" Alliance For A Better Acre style="background-color:#9aed9e; text-align: center" 218756 style="background-color:#9aed9e; text-align: center" 58.36% - style="background-color:#f8f9fa;" Perpétua Almeida style="background-color:#f8f9fa; text-align: center" Communist Party of Brazil (PCdoB) style="background-color:#f8f9fa; text-align: center" Q48912137 style="background-color:#f8f9fa; text-align: center" 136706 style="background-color:#f8f9fa; text-align: center" 36.47% - style="background-color:#f8f9fa;" Roberto Duarte Júnior style="background-color:#f8f9fa; text-align: center" Party of National Mobilization (PMN) style="background-color:#f8f9fa; text-align: center" Q48943127 style="background-color:#f8f9fa; text-align: center" 17119 style="background-color:#f8f9fa; text-align: center" 4.57% - style="background-color:#f8f9fa;" Fortunato Martins Filho style="background-color:#f8f9fa; text-align: center" Socialism and Freedom Party (PSOL) style="background-color:#f8f9fa; text-align: center" Socialism and Freedom Party (isolated party) style="background-color:#f8f9fa; text-align: center" 2232 style="background-color:#f8f9fa; text-align: center" 0.6%
 * }

}} = }} }} {| The election for senator counted on 4 candidates in 2014: Perpétua Almeida (Communist Party of Brazil), Q57460775Category:Articles with missing Wikidata information (Party of National Mobilization), Gladson Cameli (Progressistas), Q57461572Category:Articles with missing Wikidata information (Socialism and Liberty Party). The result of the elections for this position was for a total of 374,813 valid votes, excluding 12,319 blank votes and 31,640 spoilt votes, according to the counting made by the Superior Electoral Court. 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====