Censa

Censa is an electoral analytics platform. A system capable of creating electoral segmentation models. I have mapped all votes from the recent history of Spanish democracy. This has allowed me to study and analyze how different geographical areas in Spain behave in electoral terms, such as voter turnout, voting loyalty, and the evolution of electoral behavior.

History

Logo del proyecto Censa. Una mano introduciendo un voto en una urna

This project was born in 2014 as a personal initiative aimed at exploring electoral behavior from a geographical and quantitative perspective. At that time, my professional experience in reporting and data analysis environments highlighted the potential of visualization and analytics tools for strategic decision-making. My interest in political analytics emerged after observing how certain actors, especially in the United States, were using advanced electoral segmentation models to understand citizen behavior patterns. From that point on, the objective became clear: to transform public electoral data into structured information capable of revealing territorial dynamics such as participation, voting loyalty, and the historical evolution of electoral behavior in Spain. Unfortunately, the project did not have the financial capacity to be sustained over time. Some milestones were achieved, but not enough to ensure its continuity. However, it did achieve a certain level of academic recognition. It was selected by the SPEGC project accelerator, nominated for Project of the Year by FULP, and even featured in Emprendedores magazine.

Currently, these are the elections included in the system.

Year Month Election type Number of records
2007 5 Elecciones Municipales. 475558
2019 5 Elecciones Municipales. 549543
2015 5 Elecciones Municipales. 514896
2011 5 Elecciones Municipales. 552660
2023 5 Elecciones Municipales. 518435

Censa in Numbers

The Tool

Participation
Electoral behavior

Value Proposition

The value that the project aimed to deliver was based on optimizing the resources invested by Spanish political parties during electoral processes. For this reason, it was launched with the following set of tools:

* A planning agenda to organize campaign activities and coordinate team members.
* A task management system allowing assignment and tracking of responsibilities.
* A communication manager to centralize electronic communications, including email and social media.
* An electoral segmentation center, which represents the core value of the platform.

This section includes electoral behavior data from all regions of Spain across recent democratic elections. It provides a rich source of information to identify where potential voters are located and how the electorate behaves across different areas. Since all votes from the recent democratic period have been mapped, it becomes possible to analyze geographical patterns in terms of voter turnout, loyalty, and evolution. These insights can be combined with other variables such as unemployment, income, or any geographically linked factor. Therefore, Censa positions itself as a valuable tool for making informed, data-driven electoral decisions.

Technical Information

Architecture

The system architecture is based on a clear separation of responsibilities, following modular design principles. Data processing is carried out through ETL pipelines that transform electoral information into normalized structures, optimized for querying and analysis. The system is designed to scale both in terms of data volume and analytical complexity.

Stack

The original 2014 project has been adapted to a modern 2026 stack, oriented towards contemporary web applications:
- Backend built with PHP 8.4 and Symfony 8
- Data persistence using PostgreSQL
- Docker containers for reproducible environments
- Data processing through batch jobs and asynchronous queues
- Frontend built with Twig, JavaScript, and visualization powered by Chart.js

Logo de Docker
Logo de PHP
Logo de Symfony
Logo de PostgreSQL

Technical Challenges

One of the main challenges has been the normalization of historical data from official sources, which required consistent extraction, cleaning, and transformation processes. Data ingestion was another major challenge, requiring the use of asynchronous strategies to successfully process large volumes of information. Performance optimization also demanded careful design of aggregated queries over large electoral datasets. Finally, ensuring geographical consistency across different administrative layers (municipalities, provinces, census sections) required precise and robust data modeling.