an SQL metrics interface
A clean & modern data interface: SQL queries into JSON, CSV, and charts, done simply.
To run the simple demo:
$ npm install$ npm start
http://localhost:3000/ and play around: the testing server
creates three tables:
fake: random time-series data
select * from fake;
cats: random categorical data
select * from cats;
places: points in france
select * from points;
Then you can configure the server by editing configuration in site.js.
The example in example_server.js talks to SQLite,
but you can swap in Postgres/RedShift using the
MySQL using the
mysql module, and so on. Or you can even just point
stickshift at any URL that accepts queries over POST and returns
results as JSON.
var Stickshift = ;;
Stickshift props up the full interface and router within the given
src/components: UI components, like the chart, table, and query interface
src/stores: Flux stores for saved queries & transient table information
src/constants: Constants for actions, like 'received table results'
lib/d3 & vega, for now, until vega builds are sorted
There's no user login system built into
stickshift: like your choice of
database, this is likely to be specific to your purpose, company, usage,
and so on. Some common approaches include:
example_server.jsand integrating with a server that does authentication, like through passport. This is what we do at Mapbox.
If you run this on anything but a
localhost, it's really best practice
to create a read-only user, since this is an interface for doing analysis
that should not have permissions to modify data.
Stickshift automatically creates charts for applicable queries: those that
The supported chart types are:
These charts are rendered with Vega. They're designed for exploratory data analysis, so are relatively simple.
npm run developto continously rebuild source and run Stickshift without a node server.