Giter Site home page Giter Site logo

gabegreenberg / pipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pipend/pipe

0.0 2.0 0.0 617 KB

A Web tool for querying any data source (SQL, MongoDB, ElasticSearch, Redis ...), and analyzing and visualizing the result.

Home Page: http://rf.pipend.com/

LiveScript 89.16% CSS 9.97% HTML 0.87%

pipe's Introduction

Pipe

Build Status

Pipe is a Web app for querying any data source, and analyzing and visualizing the result.

LIVE DEMO: http://rf.pipend.com/

Query |> Transform |> Visualize

Usually 3 different software are needed to write and execute a query on a database, transform the result and visualize the outcome.

How many times did you have to copy and paste the result of a SQL or MongoDB query into another tool (Excel, R, or your custom app) for further analysis and then copy the result of your analysis into another tool for sharing it on the Web or with your colleagues?

Pipe is an all-in-one solution for querying, analyzing and visualizing any data source and sharing the result.

Status

The project is currently under development

Setup

  • Start a mongodb instance
  • Start a redis instance (optional, it is only necessary if you choose redis-store value for cache-store config)
  • $ git clone https://github.com/Pipend/pipe.git
  • $ sudo npm install
  • npm run configure to create config.ls in the root of the repository. Review and update the following in the config
  • Update query-database-connection-string to the query string of your mongodb instance
  • Configure connections hash by specifying the connection details for the databses that you like to connect and query. Each connection is a LiveScript hash; you can configure as many connections as you like for the following kind databses: MongoDB, MSSQL, PostgreSQL, MySQL.
  • Configure cache-store, you can choose either redis-store or js-store (in-memory)
  • $ gulp
  • Open a browser and navigate to http://localhost:4081

For the screenshot feature make sure you have PhantomJS ≥ 2.0.1 in your PATH.

Features

Query

You can connect Pipe to almost any data source. It comes with built-in support for the following databases:

  • SQL: (MySQL, PostreSQL, MSSQL)
  • MongoDB
  • ElasticSearch
  • Redis
  • Any Web API (using curl) or Stream (using WebSockets)

Multi Query

The result of a Pipe query can be used as the input of another query: multiple Pipe queries can be joined together in a larger computation.

Transformation

Depending on your database and query language, some analysis are easier and faster done on the result of the query at client-side.

Use Transformation block to manipulate the result of your query using built-in utilities and statistical functions. (you can even import and use your favorite JavaScript library)

This snippet gives you a taste of data transformation in Pipe:

result =>
   result.map(({_id, values}) => ({
      key: _id,
      values: values
         .map(({bucket, count}) => [bucket * 3600*1000, count])
  }))

You can program your transformation snippet in ES6 JavaScript (using Underscore, Lodash, RxJS or similar libraries) or LiveScript (using Prelude.ls).

Transpilation

Pipe provides a compact and powerful syntax for writing (dynamic) MongoDB and ElasticSearch queries. It also supports macros in SQL:

SELECT ProductId, Count(*) AS Units FROM Purchases 
WHERE CustomerId IN (${customers.map(c => c.id).join(',')}$)

In this example customers array can be the result of another Pipe query that is passed as the input into this SQL query.

Using Pipe syntax a MongoDB aggregation query will look like:

$match do
  campaignId: 12341
  creationTime: 
    $gte: new Date '2016–01–01' .valueOf!
    $lte: Date.now!

$group do
  _id: bucketize 24 * 3600 * 1000, '$creationTime'
  impressions: $sum: '$impressions'
  clicks: $sum: '$clicks'

$sort impressions: -1

Visualization

Plottables are ready-to-use, standardized data visualization components. Pipe comes with many built-in Plottables (check them out here: http://pipend.github.io/pipe-web-client/).

Using a Plottable can be as easy as:

plot(withOptions(timeseries, {
    x: d => d.time
  , y: d => d.value
})

Or just plot(timeseries).

Versioning, Sharing

Pipe is a gist for your queries, you can save, fork, clone or share the source code of your query or just the final result of transformation or visualization.

Pipe supports JavaScript, ES6 Babel or LiveScript.

Dependencies

pipe's People

Contributors

furqanzafar avatar homam avatar edgarzakaryan avatar jsonnull avatar

Watchers

James Cloos avatar Gabe Greenberg 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.