  The recent availability of large, high-resolution data sets of online human
activity allowed for the study and characterization of the mechanisms shaping
human interactions at an unprecedented level of accuracy. To this end, many
efforts have been put forward to understand how people share and retrieve
information when forging their opinion about a certain topic. Specifically, the
detection of the political leaning of a person based on its online activity can
support the forecasting of opinion trends in a given population. Here, we
tackle this challenging task by combining complex networks theory and machine
learning techniques. In particular, starting from a collection of more than 6
millions tweets, we characterize the structure and dynamics of the Italian
online political debate about the constitutional referendum held in December
2016. We analyze the discussion pattern between different political communities
and characterize the network of contacts therein. Moreover, we set up a
procedure to infer the political leaning of Italian Twitter users, which allows
us to accurately reconstruct the overall opinion trend given by official polls
(Pearson's r=0.88) as well as to predict with good accuracy the final outcome
of the referendum. Our study provides a large-scale examination of the Italian
online political discussion through sentiment-analysis, thus setting a baseline
for future studies on online political debate modeling.
