MPs of #Sri Lanka

Understanding the Parliament through Visualising

Nuwan I. Senaratna
4 min readMay 7, 2022


1/ This article describes a web app, for visualising the MPs of the @ParliamentLK.

This will help us better understand the current bunch, & be more informed, critical, & careful when it is time to elect the next.


2/ The App visualises parliament by “cutting” MPs by various dimensions.

E.g. This visualisations cuts by age and gender.

Only 12 MPs are women. And only 13 are <40 years. The remaining 200 are men >40.

#SriLanka #NoRepresentation @ParliamentLK

3/ You can choose various “cut” dimensions. From #Political Parties, to #Education & #Profession, to Voting Record, to Electoral Regions, to #Religion & #Ethnicity.


4/ “Show Statistical Trends” is a powerful feature, that tells you if apparent trends are real or just random.

E.g. Did parties vote differently for the 20th amendment? Clearly.

#SriLanka #20th #21A

5/ “Show Statistical Trends” can also prove trends to be random.

E.g. Did we favour #women in the National List?

Proportionally there are more women in the NT compared to parliament as a whole. So yes?

No! “Show Statistical Trends” shows that this could be purely due to noise.

#NotStatSig #SriLanka @ParliamentLK

6/ Let’s look at a few more examples.

Q: How many “doctors” are in parliament?

A: 16

Q: Does the National List favour “doctors”?

A: Yes!

#SriLanka @ParliamentLK

7/ Q: How many MPs have a bachelors degree or better?

A: 104

#SriLanka @ParliamentLK

8/ Q: How many MPs are over 70 years old?

A: 23

#SriLanka #TimeToRetire #TermLimits #DeathBeforeRetirement @ParliamentLK

9/ Q: What Province elects the most female MPs?

A: Sabaragamuwa (4) #StatSig

#SriLanka @ParliamentLK

10/ Q: Are political parties agnostic to religion?

A: Hell no!

@PodujanaParty favours Buddhist MPs. @sjbsrilanka Muslims. ITAK Hindus and Christians. #StatSig.

#SriLanka @ParliamentLK #CountryBeforeReligion

11/ Finally, I added a “Miscellaneous & Fun” section with some amusing but useless dimensions.

E.g. If you are an MP, you’re far more likely to have a birthday in September (12%) compared to July (3.6%).

Is this #StatSig? Well you know how to find out.

#SriLanka @ParliamentLK

12/ You can find the @reactjs app source in the @github repo below.

As usual, feel free to fork, modify, suggest improvements or report issues.

13/ All the data is from the @ParliamentLK website. You can find a scraped and cleaned data & the #python scraping code in the @github repo below.

Feel free to fork.

Finally, this is still a WIP. Please comment with suggestions. Especially what data you’d like to see here.

Democracy cannot work without an informed voter base!



Nuwan I. Senaratna

I am a Computer Scientist and Musician by training. A writer with interests in Philosophy, Economics, Technology, Politics, Business, the Arts and Fiction.