A platform to visualize and analyze the elections in Bulgaria since 2005.
This project is built upon a high-performance, modern web architecture that cleanly separates data processing from the frontend application. This ensures maximum scalability, performance, and maintainability.
The user interface is a sophisticated Single-Page Application (SPA) built with React and TypeScript. It leverages Vite for an accelerated development experience and an optimized build process.
- Component-Based UI: The
src/components
,src/screens
, andsrc/layout
directories enforce a modular and reusable component strategy. - High-Performance Styling: Styling is handled by Tailwind CSS, a utility-first framework that enables rapid development of custom designs without sacrificing performance.
- Routing: The application's navigation and view management are controlled by a centralized routing system in
src/routes.tsx
.
All election data is processed through a robust, offline pipeline built with TypeScript. This pipeline is the engine that transforms raw data into a structured, web-ready format.
- Automated Workflow: The pipeline reads raw data from
raw_data/
, then parses, cleans, analyzes, and structures it into the JSON files consumed by the frontend. - Modular Scripts: The
parsers/
,stats/
, andreports/
directories contain specialized scripts for each stage of the data transformation process, orchestrated byscripts/main.ts
.
The application does not rely on a traditional, dynamic backend server. Instead, it consumes data from a set of static JSON files located in the public/
directory.
- Pre-built Data: All data is pre-processed and organized by election date. The frontend fetches this data directly.
- JAMstack Principles: This approach follows JAMstack (JavaScript, APIs, Markup) principles, eliminating the need for a database and resulting in superior performance, higher security, and simplified deployment.
The entire application is deployed to Firebase Hosting. This platform provides a global Content Delivery Network (CDN), ensuring fast, reliable access for all users by serving the static assets from edge locations around the world.
-
Regions, Municipalities and Settlements. The original files provide the administrative regions of Bulgaria, and have been modified to account for the 3 electoral regions in Sofia city, and the Plovdiv city region.
-
Sofia city districts. The original files have been optimized and incorporated into the administrative regions maps.
-
World countries. The original maps have been grouped into continents.
-
Continents. The original maps have been grouped into a world map and simplified/optimized with Mapshaper and geojson.io.
- EKATTE catalog. The settlement names in English and Bulgarian.
- Settlement locations. The settlements geo locations in Bulgaria.
- Country capitals locations. The capitals of the world geo locations.