Submission status

The semester is ending and there was a long way to go for the visualization to be complete in my eyes. I decided to import the entire dataset and work on the filtering aspect of it. After a lot of head breaking on how to change the layout based on the filtering as well as looking at multi-foci layouts, I ended up with this version of the visualization15thloksabhaThe visualization now works with individual filtering but gets messed up when more than one category of filters are used. I feel that this is a problem with the logic that I have used. I shall now look into fixing this. I am also looking at having a multi foci based version of this.

Submission document can be found here.

Advertisements

Back to work

I’ve been trying to locate rules/procedures that are used for the seating arrangement in the Lok Sabha. A quick google search does not give me much. A friend of mine pointed me to this. It details how things work in the Rajya Sabha and we hope that similar rules apply for the Lok Sabha.

Recognised parties and groups are allotted blocks of seats in proportion to their respective strength and the total number of seats available in the House. For the purpose of allotment of blocks of seats, recognised parties/ groups are those which have minimum strength of five members.

Individual allotment of seats within a block of seats is made in consultation with the Leader/Whip of the party or group concerned.

Seats to members belonging to small or unrecognised groups, independents or nominated members not belonging to any party/group, are allotted by the Chairman.

Members of such groups who form an association for the purpose of floor functioning and who express a desire to sit together are, as far as possible, allotted contiguous seats.

A search on google images(on wikipedia’s article on Lok Sabha) did show me towards this pictorial representation which is what I might end up resorting to.
The 15th Lok Sabha on WikipediaThe search is still on.

Milestone 2

So Friday, was our second milestone presentation. It also signalled that 4 weeks were up. Working through the night, I was able to get a barely functional prototype up and running. I chose the last slot for presentation so that I could improve it and have enough time to make a presentation.

I spoke about how I went about learning how to visualize using D3 and direction that I can possibly move in from this point onwards. I got some good feedback and some ideas from my class mates. I hope to include them in the next iteration.

For now, I am taking a short break as I team up with Shweta and work on
Visualizing Trains; an assignment given by S. Anand.

On Github

I ended up getting the first iteration of the visualization up and running at Github.
You can view it over here.

Now that there is some viewable progress, I have made this blog public.

It’s alive!!

I am nearing the end of the O’Reilly book which has helped me a lot. Armed with this limited knowledge(Chapter 11), I started to build an initial version of the visualization which was a force layout.

We had our 2nd milestone scheduled for Friday(26th July), so I decided that I will work with a smaller dataset for now. I extracted the data of the Karnataka MP’s from the excel dataset and then saved it as a csv. Using cparker15’s CSV to JSON converter, I got the necessary JSON for use in the visualization.

After some trial and error, I was able to find out that I could access the node data by using

dataset.nodes[i]["Political party"]

Therefore my first step was to try to filter the dataset based on political party. This was easier said than done and the documentation for the filter function was not clear to me. Finally past 2am on Friday, I stumbled across this post by Mike Bostock answering a similar query. That was my Eureka moment of the night.


d3.selectAll("#one")
.on("change", function() {
svg.selectAll("circle").filter(function(d,i) {
return dataset.nodes[i]["Political party"] == "Bharatiya Janata Party";})
.style("display", this.checked ? null : "none");
});

After some more tweaking I pushed this first version to Github somewhere around 4am.

Carto Magic

S. Anand (of Gramener) came over to take a one day session on data visualization. We discussed quite a bit about the topic

I asked him about the problem geo-coding constituencies and creating a cartogram. He pointed me to the excel macro that he had written to make this.His illustration of using a scatterplot to create a cartogram was mindblowing.

karnataka scatterplot

could be squeezed to form

karnataka cartogram

which resembles the state of Karnataka.