Skip to main content

One post tagged with "leaders"

View All Tags

Designing the Leader Index: Election History, Party Switching & Biographical Insights

· 2 min read
JavaScript Dev

Overview​

Political leaders carry the identity of electoral shifts. I designed the Leader Index Page to give a comprehensive view of every major leader’s journey—through elections, parties, positions, and scandals.

This article explains how I structured leader data, visualized career movements, and surfaced meaningful insights.


Leader Profile Fields​

Each leader includes:

  • Name + Local name
  • Birthdate, gender, bio, education
  • Party affiliation history
  • Election records (vote counts, wins/losses)
  • Cabinet roles and government positions
  • Associated scandals and ratings

Election History Tracking​

Each leader has a timeline of contests:

{
year: 2074,
district: 'Kathmandu-4',
party: 'NC',
votes: 36500,
rank: 1
}

Visualized using a line + bar chart hybrid with annotations for debut, loss, comeback, etc.


Party Switch Insight​

Switches are detected by comparing partyId across elections and government roles. I annotate leader cards with indicators like:

  • Switched from UML to RSP in 2079
  • Left party after scandal

Biography Display​

Bios are shown with support for multiple languages, tags (e.g. “Lawyer”, “Journalist”), and dynamic quote sections. Photos are embedded if available.


Each leader’s page links to:

  • Elections contested
  • Governments served
  • Ratings and polls
  • Scandal timelines (if any)

This creates a centralized profile that’s context-aware.


Summary​

The Leader Index is not just a list—it’s a political memory map. With structured biographical fields, electoral history, and dynamic insights, it forms a powerful resource for researchers, voters, and students.

Next: I’ll cover how I handled constituency-level election results and map overlays to show spatial trends.