Cubism: Difference between revisions
From charlesreid1
No edit summary |
|||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Cube and Cubism are time series plotting libraries. This page shows how to interface with them from [[Python]]. | |||
==Part 1: Hello Cube World== | ==Part 1: Hello Cube World== | ||
| Line 51: | Line 51: | ||
==Part 3: Alter/Delete== | ==Part 3: Alter/Delete== | ||
You can alter and delete records by altering and deleting records in [[MongoDB]] | |||
==Part 4: Hello Cubism World== | ==Part 4: Hello Cubism World== | ||
Hello world getting cubism installed and up and running and | Hello world getting cubism installed and up and running and showing something | ||
==References== | ==References== | ||
| Line 62: | Line 62: | ||
* http://square.github.io/cubism/ | * http://square.github.io/cubism/ | ||
* http://www.joecjr.com/2013/04/06/cubism-js-part-1-getting-cube-working/ | * http://www.joecjr.com/2013/04/06/cubism-js-part-1-getting-cube-working/ | ||
[[Category:Python]] | |||
[[Category:MongoDB]] | |||
[[Category:Data Analysis]] | |||
Latest revision as of 11:23, 17 April 2017
Cube and Cubism are time series plotting libraries. This page shows how to interface with them from Python.
Part 1: Hello Cube World
A quick and dirty tutorial to getting Cube installed and listening for new time-series data.
Step 1: install mongodb:
brew install mongodb
Step 2: install node.js
brew install node
Step 3: install cube using node package manager
npm install cube cd node_modules/cube npm install
This may spit out some kind of message, and look like it didn't install successfully, but you can just pretend like everything went fine and continue.
Step 4: In another terminal, start mongo daemon:
mongod
Step 5: start up cube's collector and evaluator:
cd node_modules/cube node bin/collector.js 2>&1 node bin/evaluator.js 2>&1
These start on ports 1080 and 1081. Now test them out: visit localhost:1080 and localhost:1081
To post stuff to mongodb, post it to http://localhost:1080/1.0/event/put
Part 2: Talk to the Cube
In which I decipher how, exactly, to "put" data into the Mongodb, what needs to go into the dict structure, how to check what's been added to the mongodb, basically how to get things INTO the db.
Part 3: Alter/Delete
You can alter and delete records by altering and deleting records in MongoDB
Part 4: Hello Cubism World
Hello world getting cubism installed and up and running and showing something