Hacker News new | past | comments | ask | show | jobs | submit login
The Vector Space of the Polish Parliament in Pictures (marcinciura.wordpress.com)
130 points by mci on July 2, 2015 | hide | past | web | favorite | 22 comments



This is a wonderful analysis. For context, a little bit about the four major parties:

PO, Citizen's Platform, the center-right liberal (in the European economic sense) ruling party. Very pro-European, pro-German.

PiS, Law and Justice, mainstream right wing nationalist party, very Catholic, pro-Europe economically but fighting culture wars over in vitro, gay marriage and so on.

PSL, Polish People's Party, agrarian party with roots stretching back to before WWII. Represents rural interests.

SLD, Democratic Leftist Union, the post-Communist left that discredited itself horribly when last in power ten years ago (through corruption scandals) and is still in the political wilderness. Pro-EU, very much a modern European left party in terms of platform but dominated by faces from the bad old days.


Very cool, I did the same thing a while back for the Canadian Parliament. Unfortunately, the party discipline in Canadian politics makes it less interesting.

It has done in flash, when flash was cool... http://olihb.com/2011/02/27/legislative-explorer/


This is great. It shows that there is more to the politics than just left-right.

However, I do think the graphs are a bit misleading in that the x,y,z components are normalised in the figures, whereas actually y is far more significant than x or z.


The x direction explains 70.1% of the variance. y direction explains 8.5%.

> In our case, three initial left-singular vectors contribute 70.1%, 8.5%, and 3.6% of the total variance of R, respectively.


Tangent, but I really like the animated 3D plot. If you have to use a 3D plot, it really helps. Is there an easy way to make these?


Thanks. I like it, too. The Python code to draw it is here: https://bitbucket.org/mciura/sejm/src/886fb4fceb348468a160d5...


rgl library for R can be used to make such plots.


Very nice, but it's a bit sad that names are overlapping (thus it's harder to read/identify them). Any hopes of an interactive version? (Shiny, Bokeh, D3js, or Plot.ly... - just anything I can zoom or lookup names.)

And thanks for sharing code as well!


Thanks for the tip! Now linking to a Bokeh-based version as well.


Great and novel use of PCA for politics analysis. Best regards from your former student at polsl :)


This is really enlightening example!

I would love to see some CSV dump of the scrapped data, because this work might inspire others to experiment and do interesting things as well...


That's a great idea. I've pushed a gzipped CSV file to https://bitbucket.org/mciura/sejm/


Thanks! I'll experiment with neo4j (graph db) and let's see what can we learn more about our politicians.


Thanks! I will run my own experiments in R on this data.


Thanks a lot! I will have a look at it with some R scripts...


Nice analysis before the upcoming parliamentary elections. It is surprising that the most euro-sceptic deputy is member of the party that supports the goverment, which appears to be an EU-enthusiast. We can also observe some unusual behaviors (eg. some of the opposition members seems to be more pro-goverment), so I wonder if this analysis could be used for the prediction of deputy transfers between the parties.


I didn't put much thought into identifying the third axis. It may well be a linear combination of Euroscepticism and something else. The artefacts you see may be due to former transfers or to MPs who voted for part of the term only.


Fun! Just used the data to see which politicians vote together: http://imgur.com/pYHXO4f :)

Edit: thinned it out to politicians who vote together > 75% of the time: http://imgur.com/NfxDY6H .


Looks cool. What do the colors of the nodes mean? If they represent parties, then you have probably merged PO into PiS. Also, how do you choose which nodes to label?


Colors are mapped to parties. po is on left (light blue), pis on right (dark blue). As is pretty clear, claimed affiliations don't match real behavior.

Layout = forceatlas2 and labeling is random due to a glitch (normally biggest node in a region.)


This reminds me of the voteview project, which calculates dimensions for members of the US Congress.

http://voteview.com/ Blog at: https://voteviewblog.wordpress.com/


Someone finally using Html5 canvas for 3d shennanigans!.. oh, it's just a gif. Maybe next time.




Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: