Skip to content

We Analyze the polarity, sentiment, meta-cognition, bias, and many other things.

Notifications You must be signed in to change notification settings

KidQuant/Analyzing-News-Articles-With-Python

Repository files navigation

Analyzing News Articles With Python

Using Web Scraping, Data Science and Machine Learning techniques to conduct sentiment analysis on news articles using Google's Natural Language Processing API.

Featured Image

Goal

Our goals involved the following:

  • Part 1: Web scraping media stories with the purpose of extracting relevant information for sentiment analysis.
  • Part 2: Extracting the articles using an API and cleaning the text information
  • Part 3: Using Google's Natural Language API for calculating the Sentiment and Magnitude of news articles.

This analysis will allow us to analyze the slant (or bias) of media articles, as well as the degree to which emotion plays into the journalism of many news articles.

#Data

I used data from All Sides to extract stories, relevant articles, information related to the articles, and the bias for each source. We also used the news-please API to extract information related to the articles, such as the text and the author.

Enviroment and Tools

  1. requests
  2. BeautifulSoup
  3. csv
  4. re
  5. pandas
  6. pickle
  7. itertools
  8. difflib
  9. matplotlib
  10. newsplease
  11. google
  12. seaborn
  13. nltk

About

We Analyze the polarity, sentiment, meta-cognition, bias, and many other things.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published