Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csinva/news-title-bias
Scraping and analyzing political bias in news titles using data from allsides.com
https://github.com/csinva/news-title-bias
bias natural-language-processing news politics python scraper
Last synced: 2 months ago
JSON representation
Scraping and analyzing political bias in news titles using data from allsides.com
- Host: GitHub
- URL: https://github.com/csinva/news-title-bias
- Owner: csinva
- Created: 2020-12-30T04:15:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T21:30:12.000Z (8 months ago)
- Last Synced: 2024-10-07T13:41:53.204Z (3 months ago)
- Topics: bias, natural-language-processing, news, politics, python, scraper
- Language: HTML
- Homepage: http://csinva.io/news-title-bias/app/
- Size: 7.35 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Scraping data on news title bias
Different sources cover the same news in very different ways! This project scrapes a dataset of article titles, sources, political leanings, and text from curated articles on [allsides.com](https://www.allsides.com/unbiased-balanced-news).
![](https://csinva.io/news-title-bias/app/assets/img/screenshot.jpeg)
The [scrape_data](https://github.com/csinva/news-title-bias/blob/master/notebooks/01_scrape_data.ipynb) notebook scrapes the data and saves it into a pandas dataframe (cached in the [data](data) folder).
The [data_to_html](https://github.com/csinva/news-title-bias/blob/master/notebooks/02_data_to_html.ipynb) notebook loads that dataframe into an html file, which can be viewed in [this app](https://csinva.io/news-title-bias/app/).
This data could also be useful for all kinds of tasks, such as classifying bias of different titles as well as trying to learn to translate between the same title with different political leanings.
# Reference
- uses data from [allsides.com](https://www.allsides.com/unbiased-balanced-news)
- horizontal timeline from [codyhouse](https://codyhouse.co/gem/horizontal-timeline)
- made by [@csinva_](https://twitter.com/csinva_)