<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>elections | Dhafer Malouche</title><link>https://dhafermalouche.net/tag/elections/</link><atom:link href="https://dhafermalouche.net/tag/elections/index.xml" rel="self" type="application/rss+xml"/><description>elections</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>Dhafer Malouche © 2026</copyright><lastBuildDate>Mon, 16 Nov 2026 00:00:00 +0000</lastBuildDate><image><url>https://dhafermalouche.net/media/icon_hu294da7f24af66942b94b8e240e33fe59_2153342_512x512_fill_lanczos_center_3.png</url><title>elections</title><link>https://dhafermalouche.net/tag/elections/</link></image><item><title>Electoral Climate 2027: Polls, Attention and Social Tension</title><link>https://dhafermalouche.net/apps/fr2027electoral/</link><pubDate>Mon, 16 Nov 2026 00:00:00 +0000</pubDate><guid>https://dhafermalouche.net/apps/fr2027electoral/</guid><description>&lt;p>&lt;strong>Electoral Climate 2027&lt;/strong> follows the 2027 French presidential election through public data. It combines published opinion polls, online attention and episodes of social tension in one dashboard that is rebuilt automatically as new polls and records appear. It is an academic project, and the dashboard states that it is research, not a forecast to bet on and not financial advice.&lt;/p>
&lt;h2 id="what-it-shows">What it shows&lt;/h2>
&lt;p>The poll average is the output of a Bayesian state-space model fitted to every published first-round poll. The model weights each poll by its sample size, corrects for each institute&amp;rsquo;s usual lean and for the fact that institutes do not all offer the same list of candidates, and follows each candidate day by day. Carrying the estimate to election day many thousands of times gives each candidate a chance of reaching the run-off, with the uncertainty left visible instead of rounded away. Further sections show who is rising fastest, how online attention (Wikipedia page views) and social tension (protest and violence event counts) move around the polls, and what the model implies under a few scenarios. The dashboard is available in English and French, and it withholds poll results during the restricted period before each round, as French law requires.&lt;/p>
&lt;h2 id="why-it-is-on-this-page">Why it is on this page&lt;/h2>
&lt;p>The dashboard is a worked example of statistics applied to public data: how scattered and imperfect polls become one estimate with an interval, why polls that offer different lists of candidates cannot be compared directly, and what a model can and cannot say about a future event. It accompanies a research project and is also meant for teaching.&lt;/p>
&lt;h2 id="data-and-licence">Data and licence&lt;/h2>
&lt;p>Everything is built from public sources accessed by code. Poll results come from the Wikipedia lists of polls (CC BY-SA 4.0), daily page views from the Wikimedia API (CC0 1.0), and protest and violence events from GDELT and from ACLED, which appears only as weekly national aggregates under ACLED&amp;rsquo;s terms. The register of the Commission des sondages is used to match poll notices. Raw prediction-market prices are not republished. The dashboard&amp;rsquo;s &lt;em>Method and data&lt;/em> page lists every source with its licence and attribution; the hand-curated event calendar is released under CC BY 4.0, and the cropped candidate photographs keep their Wikimedia Commons licences, credited on the same page.&lt;/p></description></item><item><title>Municipales 2026 — French Municipal Elections Dashboard</title><link>https://dhafermalouche.net/apps/municipales2026/</link><pubDate>Tue, 02 Jun 2026 00:00:00 +0000</pubDate><guid>https://dhafermalouche.net/apps/municipales2026/</guid><description>&lt;p>An interactive dashboard that visualises the official results of the &lt;strong>2026 French municipal elections&lt;/strong> (first round on 15 March and second round on 22 March 2026) across the 96 departments of metropolitan France. It belongs to the same family of browser-based teaching and outreach tools as the Stat* apps, but turns the focus to applied electoral statistics and geographic data.&lt;/p>
&lt;h2 id="what-the-dashboard-shows">What the dashboard shows&lt;/h2>
&lt;p>The data come from the &lt;strong>Ministry of the Interior&lt;/strong>, published on &lt;a href="https://www.data.gouv.fr" target="_blank" rel="noopener">data.gouv.fr&lt;/a> at the polling-station level and aggregated up to the department. For each round the app lets the visitor:&lt;/p>
&lt;ul>
&lt;li>read a &lt;strong>choropleth map&lt;/strong> of France, coloured by the leading political bloc or by a selected party&amp;rsquo;s vote share;&lt;/li>
&lt;li>switch between &lt;strong>political blocs&lt;/strong> (left, centre, right, far-right) and individual &lt;strong>parties&lt;/strong>, with national summaries updating in step;&lt;/li>
&lt;li>inspect national indicators — registered voters (&lt;em>inscrits&lt;/em>), turnout (&lt;em>participation&lt;/em>), valid votes (&lt;em>exprimés&lt;/em>), and each party&amp;rsquo;s share of the valid vote;&lt;/li>
&lt;li>click any &lt;strong>department&lt;/strong> to open its detailed breakdown, including vote counts, vote share, the number of territories led, and the median rank of each bloc.&lt;/li>
&lt;/ul>
&lt;p>A small glossary panel defines the core electoral quantities — &lt;em>inscrits&lt;/em>, &lt;em>votants&lt;/em>, &lt;em>exprimés&lt;/em>, participation, and share of the valid vote — so the dashboard doubles as a teaching aid on how electoral indicators are constructed.&lt;/p>
&lt;h2 id="technical-notes">Technical notes&lt;/h2>
&lt;p>The data pipeline is written in &lt;strong>R&lt;/strong> with &lt;strong>tidyverse&lt;/strong> and &lt;strong>sf&lt;/strong> for cleaning, aggregation, and the geometry of the departmental boundaries. The front end is a static &lt;strong>HTML / CSS / JavaScript&lt;/strong> application using &lt;strong>Leaflet.js&lt;/strong> for the interactive cartography; it is deployed continuously on &lt;strong>Netlify&lt;/strong> and runs entirely client-side once the data layer has loaded.&lt;/p></description></item><item><title>Municipal Elections</title><link>https://dhafermalouche.net/project/municdash/</link><pubDate>Fri, 01 Jun 2018 00:00:00 +0000</pubDate><guid>https://dhafermalouche.net/project/municdash/</guid><description/></item><item><title>Municipal elections, Tunisia 2018</title><link>https://dhafermalouche.net/post/municipalelect/</link><pubDate>Fri, 01 Jun 2018 00:00:00 +0000</pubDate><guid>https://dhafermalouche.net/post/municipalelect/</guid><description>
&lt;script src="https://dhafermalouche.net/post/municipalelect/index_files/header-attrs/header-attrs.js">&lt;/script>
&lt;iframe width="100%" height="150" name="iframe" src="municdash.html" frameborder="0" scrolling="no">
&lt;/iframe></description></item></channel></rss>