Skip to content

Commit

Permalink
added missing chart dep; published npm v0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kengz committed Jun 21, 2015
1 parent 332e3b3 commit 2516f85
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 49 deletions.
5 changes: 4 additions & 1 deletion .npmignore
Expand Up @@ -3,4 +3,7 @@

# un-ignore
!./index.js
!./LICENSE
!./LICENSE
# visualizer
!./chart
!./gulpfile.js
58 changes: 41 additions & 17 deletions README.md
@@ -1,39 +1,63 @@
# lomath
[![npm version](https://badge.fury.io/js/lomath.svg)](http://badge.fury.io/js/lomath) [![Build Status](https://travis-ci.org/kengz/lomath.svg?branch=master)](https://travis-ci.org/kengz/lomath) [![Coverage Status](https://coveralls.io/repos/kengz/lomath/badge.svg?branch=master)](https://coveralls.io/r/kengz/lomath?branch=master) [![Dependency Status](https://gemnasium.com/kengz/lomath.svg)](https://gemnasium.com/kengz/lomath)

A high performance, professional math module extending lodash.
A high performance, professional math module extending lodash; comes with plotting module based on highcharts.

**Installation**: `npm install lomath`

testrun:
testrun: see `demo/demo.js` for magic.

```Javascript
var _ = require('lomath');

var v = _.range(3); // use lodash as usual!
var m = [v,v,v]; // das a matrix
// use lodash as usual
var v = _.range(10);

var res = _.add(v, m); // lomath extension!
console.log(res); // magic
// lomath: generalized math functions applicable to multi-array
var vv = _.square(v);

console.log(v);
console.log(vv);

// prints all the functions
// console.log(_.functions(_));


// data visualization: highcharts plotter
// call contructor of highcharts plotter. Note the ()
var hc = _.hc();

// first, enum plots
hc.plot(
[{
name: "linear",
data: v
}, {
name: "square",
data: vv
}],
"Title 1"
)

hc.plot(
[{
name: "log",
data: _.log(_.range(20))
}],
"Title 2"
)

// Magic here! pulls up a browser (default to chrome for better support) with the plotted charts automatically.
hc.render();

console.log(_.functions(_)) // all the functions in lodash, prepended with lomath functions
```

Docs and tests coming soon.

## visualizer Roadmap
- ✓auto serializer and injector
- ✓json template; use with injector when plot() is called. Serialize.
- ✓charts image export/save button.
- ✓Nope can't do. Image autosave in folder.
- ✓1) more image formats
- ✓2) fully offline: download highcharts pkg
- ✓3) online or local package as backup
- ✓plot() wrapped gulp task in JS function, auto run gulp. Terminates browserSync for non-dev.

## Roadmap
- add aliases
- sample usage
- sample usage
- docs
- ✓tests
- performance benchmark
Expand Down
34 changes: 32 additions & 2 deletions demo/demo.js
Expand Up @@ -2,7 +2,7 @@
var _ = require(__dirname+'/../index.js')

// use lodash as usual
var v = _.range(4);
var v = _.range(10);

// lomath: generalized math functions applicable to multi-array
var vv = _.square(v);
Expand All @@ -11,4 +11,34 @@ console.log(v);
console.log(vv);

// prints all the functions
// console.log(_.functions(_));
// console.log(_.functions(_));


////////////////////////////////////////////
// data visualization: highcharts plotter //
////////////////////////////////////////////
// call contructor of highcharts plotter. Note the ()
var hc = _.hc();

// first, enum plots
hc.plot(
[{
name: "linear",
data: v
}, {
name: "square",
data: vv
}],
"Title 1"
)
hc.plot(
[{
name: "log",
data: _.log(_.range(20))
}],
"Title 2"
)

// finally, render all the enumerate plots
// pulls up a browser (default to chrome for better support) with the plotted charts
hc.render();
27 changes: 0 additions & 27 deletions demo/demoplot.js

This file was deleted.

13 changes: 11 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "lomath",
"version": "0.0.7",
"description": "A high performance, professional math module built on lodash.",
"version": "0.0.8",
"description": "A high performance, professional math module extending lodash; comes with plotting module based on highcharts.",
"main": "index.js",
"scripts": {
"start": "node demo/demo.js",
Expand Down Expand Up @@ -33,6 +33,15 @@
"lomath",
"lodash",
"math",
"data",
"visualization",
"plot",
"graph",
"graphing",
"chart",
"highcharts",
"live",
"preview",
"R",
"javascript",
"js"
Expand Down

0 comments on commit 2516f85

Please sign in to comment.