Code Monkey home page Code Monkey logo

newsanalyzer's Introduction

NewsAnalyzer

Intro

This software tool allows to extract big collections of Twitter news-sharing users, their news tweets and the full data structure of the shared articles.

The application is automatic and self-powered so that it can be run for indefinitely long sessions.

Installation Guide

Requirements

  • Python (>3.4.0) and pip
  • MongoDB
  • Twitter API keys
  • (optional) Face++ keys

Setting up the application

Clone the repository:

git clone https://github.com/DataSciencePolimi/NewsAnalyzer.git

Inside the project folder initialize a python environment

virtualenv newsanalyzer-env

Activate it

source newsanalyzer-env/bin/activate

The install the requirements

pip install -r requirements.txt

Setting up keystore

If you don't have yet, obtain Twitter API credentials

Open credential.json and fill the values with your keys:

{
    "consumer_key" : "<twitter API consumer key>",
    "consumer_secret" : "<twitter API consumer secret>",
    "access_token" : "<twitter API access token>",
    "access_token_secret" : "<twitter API access token secret>",
    "faceplus_key" : "<face++ key (optional)>",
    "faceplus_secret" : "<face++ secret (optional)>"
}

Setting up database

  1. Download and install MongoDB
  2. Run command mongod to start a MongoDB server on localhost (may require priviledges)
  3. Run setup.py script inside application folder

Running the pipeline

In order to start collecting users, tweets and articles your database need to contain at least one article entity to feed the recursive pipeline.

You can run utils/get_seeds.py to get a set of initial seeds or you can download our pre-collected dataset.

Then run main_pipeline.py

newsanalyzer's People

Contributors

giovannibrena avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.