Skip to content
framework to analyze newspapers with respect to their political conviction using entity sentiments of party representatives.
Jupyter Notebook HTML Python
Branch: master
Clone or download
Latest commit 6441f7b Sep 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Charts adding political compass results Sep 18, 2018
Code changed citation Sep 24, 2018
Datasets adding datasets used for crawling and analysis Sep 18, 2018
.gitignore added gitignore Sep 20, 2018
LICENSE Create LICENSE Sep 18, 2018
README.md Update README.md Sep 28, 2018
requirements.txt added requirements Sep 18, 2018

README.md

Sentiment Political Compass

One answer to biased news and false information is transparancy and quantifiablity. For this reason, we introduce the Sentiment Political Compass, a data-driven framework to analyze newspapers with respect to their political conviction.

@article{falcksentiment, 
	title={Sentiment Political Compass: A Data-driven Analysis
	       of Online Newspapers regarding Political Orientation}, 
	author={Falck, Fabian and Marstaller, Julian and Stoehr, Niklas and 
	       Maucher, S{\"o}ren and Ren, Jeana and Thalhammer, Andreas 
	       and Rettinger, Achim and Studer, Rudi}, 
	booktitle={The Internet, Policy & Politics Conference 2018}, 
	year={2018}, 
}

Overview

Resources

Data Exploration

In order to explore the data and the code for creating the plots, we provide you with a jupyter notebook. If you just want to see charts, please refer to folder Charts.

Pipeline Exploration

If you want to replicate a Sentiment Polical Compass for different newspapers, times or countries, please clone this repository and refer to the section Code. All code was written in Python Version 3.6.4

git clone https://github.com/JulianMar11/SentimentPoliticalCompass
cd SentimentPoliticalCompass/
pip install -r requirements.txt

Further instructions of the pipeline steps are provided in the subfolders for the processing steps.

Dataset structure

URL information

Column Type Explanation
startdate Date beginning of time range used in url-crawling
enddate Date ending of time range used in url-crawling
date Date assumed date of article, also used as index
datetimedelta Date search range
newspaper Category name of newspaper
search_term Category name of searched entity
response_id Identifier identifier of search result
url URL article url

Sentiment information (IBM NLU API)

Column Type Explanation
entity_text String Article text of entity
entity_type Category Type of entity, (doc)
count Int Mentions in article
relevance Float Relevance of entity in text
sentiment Float Sentiment of entity in range -1, 1
sentimentcategory Category negative, positive or neutral sentiment
sentiment_id Identifier identifier of sentiment

Match information

Column Type Explanation
levenshtein Int Levenshtein distance of matched politician
match_type Category 1 = full match and searched politician
2 = full match but not searched politician
3 = surname match and searched politician
4 = surname match but not searched politician
politician Category Name of matched politician
party Category Party of matched politician
role Category Political role of matched politician

Contributors

Fabian Falck, Julian Marstaller, Niklas Stoehr, Soeren Maucher, Jeana Ren, Andreas Thalhammer, Achim Rettinger, Rudi Studer

License

The MIT License (MIT)

Copyright (c) 2018 Fabian Falck, Julian Marstaller, Niklas Stoehr, Soeren Maucher, Jeana Ren, Andreas Thalhammer, Achim Rettinger, Rudi Studer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.