GithubHelp home page GithubHelp logo

isabella232 / tumblr-trends-simple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datasift/tumblr-trends-simple

0.0 0.0 0.0 256 KB

A simple example of a Tumblr trending wall

JavaScript 25.11% CSS 74.89%

tumblr-trends-simple's Introduction

Simple Tumblr Trending Wall

This code demonstrates a very simple trending wall for fashion brands on Tumblr, by consuming a DataSift stream.

The application relies heavily on two excellent libraries to do the heavy lifting:

Tumblr is a great data source for measuring engagement with products and brands. In this case I've chosen fashion brands, and the number of reblogs their original content generates.

Pre-Requisites

  • A local (or accessible) Redis server
  • Node.js installed
  • A DataSift account (if you register you get some free credit to play with!)

Running the Application

  • Make sure you have the Tumblr data source activated in you DataSift account
  • Clone the repository to your machine
  • Run npm install, to install node packages
  • Run node scripts/generate-csdl.js data/brands.csv to generate the CSDL definition to stream.csdl.
  • Copy the contents of stream.csdl into a new DataSift stream. Save the stream, and make a note of the resulting stream hash.
  • Create a config.json file in the project root
{
    "port": "[port to run a local webserver, e.g. 8000]",
    "datasift": {
        "username": "[your DataSift user name]",
        "apikey": "[your DataSift API key]",
        "stream": "[stream hash from above]"
    },
    "store":
    {
        "prefix": "[prefix for keys in Redis, e.g. wall1]",
        "host": "[redis server address, e.g. 127.0.0.1]",
        "port": [redis port, e.g. 6379]
    },
    "publishing":
    {
        "interval": [in milliseconds the time between pushes of results to the front-end, e.g. 5000]
    }
}
  • Check your Redis server is running
  • Run node app.js
  • Open your browser to http://localhost:8000 (or whatever port you specified)

tumblr-trends-simple's People

Contributors

jameseddyedwards 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.