Coder Social home page Coder Social logo

qubole / demotrends Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 3.0 511 KB

Code required to setup the demo trends website (http://demotrends.qubole.com)

License: Apache License 2.0

Java 7.24% Python 19.49% Ruby 52.34% JavaScript 0.33% CSS 5.80% Shell 1.34% HTML 13.44%

demotrends's Introduction

A Big Data app that displays the topics that are trending on Wikipedia.

There are two main parts:

  1. Webapp in Ruby on Rails.

  2. Data pipeline hosted in Qubole Data Service

You can read more about demotrends in this Blog

Quick Start

  1. Register for a [Trial Plan] (http://www.qubole.com/try) in Qubole
  2. [Obtain the API key] (http://www.qubole.com/qds-api-reference/authentication/)
  3. Run the commands in the commands directory

Webapp

Code required to setup the demo trends website (http://demotrends.qubole.com)

Set up

  1. Create the database - ./webapp/script/init-mysql.sh
  2. Run the migrations: rake db:migrate

Populate Data in db

  1. Using Sample Data: rake db:seed These will insert one row in each of the tables.
  2. Using SQL Dump: You can also use SQL dump file to populate your DB. This file has data from processed data from 30th June 2013 - 13th August 2013. sudo mysql trend < webapp/db/sqldump/mysqldump_13AUG13.sql

Start the webapp

  1. Run ./webapp/script/restart_server.sh

Data Pipeline

Hive

Directory contains two UDFs required by the data pipeline:

  1. collect_all - A JAR UDF
  2. hive_trend_mapper - A Python UDF

Scripts

Directory contains scripts that are run in a Shell Command.

  1. pagecount_dump.py - A script to download ONE days pagecounts data from the Wikimedia website.

Commands

Directory contains all the commands to process one day's worth of data. The sequence of commands is important. The filenames start with a number specifying the sequence it should be executed in. Run the scripts using [Qubole Python SDK] (https://github.com/qubole/qds-sdk-py)

Airflow

If you want to use Apache Airflow to manage the pipeline, please look at airflow folder.

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.