Coder Social home page Coder Social logo

guardian-privacy-corpus's Introduction

Guardian Privacy Corpus

Goal: Extract a text corpus from the Guardian on Government-related Privacy News, and perform analysis.

Setup

  • Install node modules by doing npm install

  • Install python modules by doing pip install -r requirements.txt

Jupyter notebooks can be run with Python 2 and Python 3 kernels.

The Node.js script requires async/await support in the latest versions of Node.js (we used 7.7.1).

Extracting results

  • Rename config.example.json to config.json
  • Copy terms from RESULTS/Search Terms.json to config.json
  • Add Guardian API keys for each query.
  • Run URL extraction by executing sh fetch.sh. This will create a text file for each query in the ARTICLE_URLS/ folder. This is done in order to create a "cooloff" time to avoid the Guardian rate limit.
  • Run the corpus extraction by executing python extract.py. This will create a set of JSON files of each article in each search query in the CORPUS folder.

Analysis

  • Analysis scripts can be re-run by using Jupyter. The notebooks use 3.0-compatible Kernels.

Navigating the Results

The overall article corpus may be found at this link

The URLs of each category can be found in the ARTICLE_URLS folder, where each document is titled with its category.

The clusters may be found in the CLUSTER folder, with each document is titled with the category it is associated with.

The wordmaps may be found in the WORDMAP folder, and the topics for each category can be found in the TOPICS folder.

The RESULTS folder contains raw data in the form of CSV files, as well as the overall list of search terms used during the data collection process.

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.