"Catalonia Independence sentiment analysis- Alvaro Bueno"
"12/5/2017"
The project consists of loading news content from diverse sites. The sources correspond to articles from december, november and october. I will use sentiment Analysis to discuss some events over this timeline
Since 2010 where some regional autonomy laws were stripped from Spain constitution, there has been a power struggle between catalonia and spain (the central government).
2016 Has been very intense where the first actions from the spain government against the independence movement were applied this year, after issues with a president (Artur Mas in march) and making another into exile in 2017 (Carles Puidgemont in October).
Catalonia wants to be independent even before spain.
Home to ancient comunity with traditions and language still thriving.
Catalan News, BBC, The Guardian, The independent, AbcNews, NPR, La Vanguardia, El periodico, RTE.ie, Al Jazeera and Bloomberg
After taking all the content from these pages, let's note that date was gathered in Descending order, getting the most recent news first (December and last week of november, when the ousted catalan government aides are starting to get out of prison on bail) and the ones from october (right when the vote started for independence referendum, which won by more than 90% of the vote.) in the right side of the plot.
using the analyzeSentiment library we proceed to plot the variability in sentiment across the mined documentts.
sent_english <- analyzeSentiment(as.character(df[df$lang=='EN',]$content))
sent_spanish <- analyzeSentiment(as.character(df[df$lang=='ES',]$content), language='spanish')
sent_abc <- analyzeSentiment(as.character(df[df$newscompany=='abcnews',]$content))
sent_periodico <- analyzeSentiment(as.character(df[df$newscompany=='periodico',]$content), language='spanish')
sent_ctn <- analyzeSentiment(as.character(df[df$newscompany=='CTN',]$content))
sent_jaz <- analyzeSentiment(as.character(df[df$newscompany=='aljazeera',]$content))
sent_bbc <- analyzeSentiment(as.character(df[df$newscompany=='bbc',]$content))
sent_gua <- analyzeSentiment(as.character(df[df$newscompany=='guardian',]$content))
sent_bbg <- analyzeSentiment(as.character(df[df$newscompany=='bberg',]$content))
sent_ind <- analyzeSentiment(as.character(df[df$newscompany=='indep',]$content))
sent_npr <- analyzeSentiment(as.character(df[df$newscompany=='npr',]$content))
sent_rte <- analyzeSentiment(as.character(df[df$newscompany=='rte.ie',]$content))
plotSentiment(sent_english)
plotSentiment(sent_spanish)
plotSentiment(sent_ctn)
plotSentiment(sent_jaz)
plotSentiment(sent_bbc)
plotSentiment(sent_npr)
There's an increasing amount of the variability of sentiment at the right side of the graph, you can note that specially in the third graphic, the graph corresponding to Catalan News is peaking at the end, the dates corresponding at october when the polls just started to be declared illegal by the central government in spain and the vote continued as promised.
These days were particularly evenful in the press because of the violence applied by police to voters.
THe normality in the left part (0-50) of the English graph shows that the press keeps an easy or moderate tone to inform in order to keep imparcial.
we can expect a similar increase of animosity in the days close to the new vote of december 21 if the events turn violent like as happened in october.