User:Ederporto/sandbox/Acre, 2014/governor1

{{{{{|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 p:P31 ?stat_inst. ?stat_inst ps:P31 wd:Q24097670. ?stat_inst pq:P1545 "1". ?item_position (wdt:P541/wdt:P279*) wd:Q25921469. 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/Executive row
 * header_template=subst:Template:Mbabel-BSE/Executive header

State elections in Acre in 2014 for Governor, first round
class='wikitable sortable wd_can_edit' style='width:100%' !Candidate !Vice !Coallition !Votes received !Percentage - style="background-color:#9aed9e;" Tião Viana ( PT ) style="background-color:#9aed9e;" Nazareth Araújo style="background-color:#9aed9e; text-align: center" Q48912137 style="background-color:#9aed9e; text-align: center" 193253 style="background-color:#9aed9e; text-align: center" 49.73% - style="background-color:#9aed9e;" Márcio Bittar ( PSDB ) style="background-color:#9aed9e;" Antonia Rojas Sales style="background-color:#9aed9e; text-align: center" Alliance For A Better Acre style="background-color:#9aed9e; text-align: center" 116948 style="background-color:#9aed9e; text-align: center" 30.1% - style="background-color:#f8f9fa;" Tião Bocalom ( DEM ) style="background-color:#f8f9fa;" Henrique Afonso style="background-color:#f8f9fa; text-align: center" Q48943127 style="background-color:#f8f9fa; text-align: center" 76218 style="background-color:#f8f9fa; text-align: center" 19.61% - style="background-color:#f8f9fa;" Antônio Rocha ( PSOL ) style="background-color:#f8f9fa;" Dany Mendonça style="background-color:#f8f9fa; text-align: center" Socialism and Freedom Party (isolated party) style="background-color:#f8f9fa; text-align: center" 2171 style="background-color:#f8f9fa; text-align: center" 0.56%
 * }

}} = }} }} {| The election for governor counted on 4 candidates in 2014: Tião Viana (Workers' Party), Márcio Bittar (Brazilian Social Democracy Party), Tião Bocalom (Democrats), Antônio Rocha (Socialism and Liberty Party), who obtained, respectively, 193,253, 116,948, 76,218, 2,171 votes in the first round. The Superior Electoral Court also counted NaN% of abstentions this round. Since no candidate received more than half of the valid votes, there was a second round between Tião Viana and Márcio Bittar on 5 October 2014.
 * pattern=
 * replace=
 * pattern=
 * replace==
 * pattern===
 * replace====
 * pattern====
 * replace====