Git Product home page Git Product logo

couchbase-n1ql-mba's Introduction

Couchbase Market Basket Analysis with N1QL

This repository is companion code for a blog post on our site: http://blogs.avalonconsult.com/blog/big-data/on-demand-recommendations-with-n1ql/

This project is an all in one environment that sets up a Vagrant machine with Couchbase installed with a fresh bucket and primary index for running N1QL. It has a Python script that employs an example N1QL query for gathering product recommendations on the fly for a given product ID.

Sample data taken from:

Brijs T., Swinnen G., Vanhoof K., and Wets G. (1999), The use of association rules for product
assortment decisions: a case study, in: Proceedings of the Fifth International Conference on
Knowledge Discovery and Data Mining, San Diego (USA), August 15-18, pp. 254-260. ISBN:
1-58113-143-7.

Can be found under the 'retail' link here: http://fimi.ua.ac.be/data/

Prerequisites

  1. Install Virtualbox: https://www.virtualbox.org/wiki/Downloads

  2. Install Vagrant: http://www.vagrantup.com/downloads.html

  3. Install necessary Vagrant plugins:

vagrant plugin install vagrant-hostmanager
vagrant plugin install vagrant-cachier
  1. Install Ansible
brew install ansible

Getting Started

Start by bringing up the Vagrant machine, it is configured to install everything you need to run the analysis

vagrant up

Load the sample data by SSHing into the machine and running the tocb.py script.

vagrant ssh
cd /vagrant
python tocb.py

Once the data is in Couchbase, you can run the Python script to gether recommendations for a specific ID.

python query.py 39

You can access the Couchbase UI at http://retail.vagrant:8091 with credentials: couchbase//couchbase

couchbase-n1ql-mba's People

Contributors

kruthar avatar

Watchers

 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.