GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ht3886/NewsExtraction-Python: Extract data related to specific keywords using the news API. Cleaning and transforming data.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
news_data_cleaned.json
news_data_cleaned.json
 
 
news_extraction.py
news_extraction.py
 
 

Repository files navigation

Overview

For news article data extraction, I have used Python to access news data. I have imported the newsapi package. Next, I set up news API to be used to pull news data. Finally, I used the get_everything() method to extract news data. For the keywords mentioned in the assignment, I have extracted title, description, URL, content, source and author information. The complete code is also attached in a separate python script file named news_extraction.py.

News API source

https://newsapi.org/

Target Keywords

“Canada”, “University”, “Moncton”, “Halifax”, “Toronto”, “Vancouver”, “Alberta”, “Niagara”.

File description

  • news_extraction.py: This python script file has the code for API setup, news data extraction and data cleaning process.

  • news_data_cleaned.json: This is the output JSON file with data extracted according to the target keywords.

Data Cleaning

For the news related data, I have removed emoticons, symbols, pictographs, transport/map symbols, flags(iOS), special characters and tags. For removing the special tags, I have used regex substitution. For cleaning all the emojis, symbols, etc. I have created a separate custom function named “clean_emoji”. This function also performs a regex operation to substitute and clean data.

About

Extract data related to specific keywords using the news API. Cleaning and transforming data.

Topics

big-datadata-cleaningdata-extractionjsonmongodbnews-apinosqlpythonregex

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.