Skip to content

Instantly share code, notes, and snippets.

View beckyconning's full-sized avatar

Becky Conning beckyconning

View GitHub Profile
beckyconning@Beckys-MacBook-Pro slamx % npm install -g purescript@latest
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
https://demo2.slamdata.com/api/result/nqBHk6-EGY2qDE60nrhALAkS202_lIikYAPUi-r8Zwf-8U1CqIdl_ohEvtDmBly2.csv

An intuitive, non-lossy and generalised way of combining information from disparate rows even on highly heterogenous data?

tl;dr:

what if when you had one or more tables a computer was like "hey some of these columns contain values that match up. want me to show you what its like when i put the rows that have one or more of these matching values together?"

an introductory example

the table below is made up of rows containing only sales data, rows containing only customer data and rows containing both.

 user_id | price  | id |          email
[{
"id": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"key": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"value": 1,
"doc": {
"_id": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"_rev": "3-f7153ce5b115d7c2202c0c4a268cce8b",
"delivery": {
"application": "EnvBlow",
"sender": {
[
{
"id": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"key": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"value": 1,
"doc": {
"_id": "0b62a3b0d2b88ac6a8dab439073f48811f6054af-bd_GCiluffo@dcpmidstream.com_2017-08-16T15:06:35.205Z",
"_rev": "3-f7153ce5b115d7c2202c0c4a268cce8b",
"delivery": {
"application": "EnvBlow",
{ "columns":
[ { "field": "day_timestamp", "type": "property", "format": "timestamp", "unit": "day" }
, { "field": "sum_pageview_count", "type": "measure", "format": "number" }
]
, "data":
[ [ "2016-06-06T00:00:00-04:00", 19321 ]
, [ "2016-06-05T00:00:00-04:00", 5791 ]
]
}
{ "columns":
[ { "field": "day_timestamp", "type": "property", "format": "timestamp", "unit": "day" }
, { "field": "sum_pageview_count", "type": "measure", "format": "number" }
]
, "data":
[ [ "2016-06-06T00:00:00-04:00", 19321 ]
, [ "2016-06-05T00:00:00-04:00", 5791 ]
]
}
module Test.SlamData.Property.RectanglePacking where
import SlamData.Prelude
import Data.Int as Int
import Math (abs)
import Test.StrongCheck as SC
import Test.StrongCheck.Gen as Gen
import RectanglePacking as RP
module Test.SlamData.Property.RectanglePacking where
import SlamData.Prelude
import Data.Int as Int
import Math (abs)
import Test.StrongCheck as SC
import Test.StrongCheck.Gen as Gen
import RectanglePacking as RP
module Main where
import Prelude
import Control.Alt ((<|>))
import Control.Apply (lift2)
import Data.Array (catMaybes, fromFoldable)
import Data.List (List(..), many)
import Data.List as List
import Data.String.CodeUnits (fromCharArray)