How much Italian politicians deal with important topics such like Europe, Work, Health etc.?
The interactive visualization that you can find at this link:
Link to the page
The complete code (used for the tweets download, text process and the visualization) and a report is available on github:
Link to github
Why this visualization?
We all have many politicians, they talk about very different topics in very different ways. Is there an easy way to compare how much they deal with a topic respect another one? Is there an easy way to understand which politician is addressing with a topic we care about?
The problem I want to solve through designing this interactive visualization is to effectively show how much the politician deals with specific topic, such as Europe, Health, LGBT rights, Environment etc.
In this visualization I stopped at “how much” the politicians deal with specific topic, because it is very difficult to visualize “how” (positive, negative, neutral) they are talking about them. Of course, there are tool of sentimental analysis that could solve also this problem, but they are not 100% accurate and there are too much for the purpose of this project.
Also computing “how much” a politician talk about a subject has some limit, all of these are due to natural language that they are using. My aim is to use very simple natural language processing tool and some information retrieval technique in order to reach the goal of the visualization. So, there should be some errors, let me make an extreme example, if the politician says: “Neapolitan Pizza is the best of all Europe!” of course it is not talking about the European Parliament or how to reform the EU, but anyway this ambiguous speech are very rare (in Italy not so much), and the overall quality of the visualization is very high, in fact the user can check and evaluate the quality of the visualization, through the visualization itself.
The components of the first part of the visualization are: two photos of the selected politicians with their names in the sides and many topics in between. The user can interact with the visualization moving its component, finding out that they try to return in the original position. They move in a very realistic (physically speaking) way, so the user can really enjoy playing with them. Every topic is a pie-chart, the bigger it is the more the politicians address the corresponding topic, the nearer to a politician the more he addresses it. The pie-charts are drawn using the proportions with which the selected politicians address the related topic. The pie-charts are not simple ones, but they rotate in order to face the right side.
I used the version 5 of the library D3 in order to create a force layout. This library has some strengths but a lot of weaknesses that I had to face. In the end, I am glad I managed all the problems and the visualization looks like exactly as I wanted.
There is a second part of the visualization that can be show if the user just clicks (and so not drag and drop) on a politician or on a topic. In the first case there will be shown the timeline of politician. In the second case there will be shown the tweets of both politicians that address the topic.