Skip to content

JulianMar11/SentimentPoliticalCompass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

framework to analyze newspapers with respect to their political conviction using entity sentiments of party representatives.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published