

The Vector Space of the Polish Parliament in Pictures - mci
https://marcinciura.wordpress.com/2015/07/01/the-vector-space-of-the-polish-parliament-in-pictures/

======
idlewords
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.

------
olihb
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/](http://olihb.com/2011/02/27/legislative-explorer/)

------
IshKebab
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.

~~~
hebdo
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.

------
Osmium
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?

~~~
mci
Thanks. I like it, too. The Python code to draw it is here:
[https://bitbucket.org/mciura/sejm/src/886fb4fceb348468a160d5...](https://bitbucket.org/mciura/sejm/src/886fb4fceb348468a160d5e59d80e179559abe83/plot3d.py)

------
stared
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!

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

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

------
haddr
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...

~~~
mci
That's a great idea. I've pushed a gzipped CSV file to
[https://bitbucket.org/mciura/sejm/](https://bitbucket.org/mciura/sejm/)

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

------
xylodev
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.

~~~
mci
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.

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

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

~~~
mci
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?

~~~
lmeyerov
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.)

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

[http://voteview.com/](http://voteview.com/) Blog at:
[https://voteviewblog.wordpress.com/](https://voteviewblog.wordpress.com/)

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

