[ Launch Inlet ]Gist #3651651 No parent Inlet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Miso.Dataset.prototype.doesExistGBVal = function(grpByCol, grpByVal) { | |
var returnVal = false; | |
this.each( | |
function(row) { | |
if (row[grpByCol] == grpByVal) { | |
returnVal = true; | |
} | |
}); | |
return returnVal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Take in a dataset, split it up by column, return an array of split datasets | |
Miso.Dataset.prototype.splitDataSets = function(columnName){ | |
var returnArr = []; //Array of split datasets | |
var valueArr = []; //A list of distinct values from columnName | |
//Find a distinct list of values | |
this.each( | |
function(row) { | |
if (!valueArr.contains(row[columnName])) { | |
valueArr.push(row[columnName]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Miso.DataView.prototype.printDVAsList = function() { | |
var outStr; | |
if (this.length > 0) { | |
outStr = "<ul>"; | |
var colNames = this.columnNames(); | |
this.each( | |
function (row){ | |
outStr = outStr + "<li>"; | |
for (var i = 0; i < colNames.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH view_info (origViewName, viewName, tableName, columnName, viewPath, nestedViewDepth) | |
AS ( | |
SELECT vCol.view_name, vCol.view_name, vCol.table_name, vCol.column_name, | |
CAST(vCol.view_name + ',' + vCol.table_name AS VARCHAR(MAX)), 1 | |
FROM INFORMATION_SCHEMA.VIEW_COLUMN_USAGE vCol | |
UNION ALL | |
SELECT vi.origViewName, vColChild.view_name, vColChild.table_name, vColChild.column_name, | |
CAST(vi.viewPath + ',' + vColChild.table_name AS VARCHAR(MAX)), | |
vi.nestedViewDepth + 1 | |
FROM INFORMATION_SCHEMA.VIEW_COLUMN_USAGE vColChild |
[ Launch Inlet ]Gist #4370049 [ Launch Inlet ]Gist #3651651 No parent Inlet
[ Launch: Stealing Enjalot's code from a year ago ] 4756902 by gelicia
[ Launch: Stealing Enjalot's code from a year ago ] 4759178 by gelicia[ Launch: Stealing Enjalot's code from a year ago ] 4756902 by gelicia
[ Launch: Simple(?) Stacked Bar Charts ] 4945496 by gelicia
OlderNewer