Giter Club home page Giter Club logo

migrant_crisis_trends's Introduction

migrant_crisis_trends

An analysis of how the European refugee crisis is trending on Reddit

-- data collection (with PRAW) and analysis (with pandas) by Anca Chereches; data visualization (with D3) by Natalia Chetelat --

We're trying to understand public interest and public opinion in the European migrant crisis by analyzing Reddit activity on relevant subreddits. For now, we're focusing on /r/europe, but we hope to add other relevant subreddits to the analysis later.

grab-submissions.py

grab-submissions.py harvests the raw dataset.

The current raw dataset, harvested on Sept. 21st 2015, contains all submissions to /r/europe created between Jan. 1st 2015, 00:00:00 GMT and Sept. 13th 2015, 00:00:00 GMT. This dataset is available on my website as a Pickle file. It can be loaded into Python like so:

>>> import pickle
>>> with ('PATH_TO_FILE/r-europe_posts.pkl','r') as f:
>>>     posts = pickle.load(f)

posts is an unordered list of praw objects.

>>> posts[0].title
>>> u'Greeks\u2019 view of the debt crisis: \u2018What lies ahead is great, great hardship\u2019'
>>> len(posts)
>>> 23732

preprocessing.py

preprocessing.py reads in the pickled raw dataset and creates a pandas DataFrame.

analysis.ipynb

analysis.ipynb is an ipython notebook which loads the preprocessed dataset and does some data wrangling.

analysis.py

analysis.py loads the preprocessed dataset and writes to disk a number of .csv files which will be used for D3 visualizations.

migrant_crisis_trends's People

Contributors

ancache avatar

Watchers

James Cloos avatar  avatar

Forkers

n-chetelat

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.