Skip to content

Commit

Permalink
update to include CI's
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbu committed Aug 7, 2015
1 parent 709b695 commit 7c2271f
Show file tree
Hide file tree
Showing 18 changed files with 15,337 additions and 132 deletions.
36 changes: 32 additions & 4 deletions app.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,39 @@ td {
#carouselRight {position:absolute;top:50%;right:calc(16px + 20%);z-index:30;font-size:2em;}

.lowerError {
fill: LightSteelBlue;
stroke-width: 0;
/*fill: #2d6ca2;*/
fill: #4682b4;

/*fill: darkgrey;*/
/*stroke-width: 1;
stroke-color: black;*/
}

.upperError {
fill: #2d5474;
stroke-width: 0;
/*fill: #2d5474;*/
fill: silver;
/*fill: #ffbf87;*/

/*fill: grey;*/
/*fill:#b2b2ff;*/
fill-opacity: 0.65;
/*stroke-width: 1;
stroke-color: black;*/
}

.line {
/*fill: #80A0BB;*/
/*fill: #7D9CB7;*/

/*fill: #2d6ca2;*/
fill: #4682b4;

/*fill: silver;*/
/*fill: #2d6ca2;*/
/*fill: grey;*/
/*fill-opacity: 0.3;*/
}

.nofill {
fill: none;
}
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,10 @@ function layout() {
g.append('svg:circle')
.attr('class', 'node')
.attr('r', allR)
.style('fill', function(d) {
.style('fill', "yellow")// {
// console.log(d);
var myIndex = findNodeIndex(d.name);
return (d === selected_node) ? d3.rgb(d.nodeCol).brighter().toString() : d.nodeCol; })
//var myIndex = findNodeIndex(d.name);
//return (d === selected_node) ? d3.rgb(d.nodeCol).brighter().toString() : d.nodeCol; })
.style('opacity', "0.5")
// .style( fill: url(#fade); )
.style('stroke', function(d) {
Expand Down
38 changes: 26 additions & 12 deletions app_ddi.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


var production=false;
var private=true;

if(production && fileid=="") {
alert("Error: No fileid has been provided.");
Expand Down Expand Up @@ -283,7 +284,7 @@ readPreprocess(url=pURL, p=preprocess, v=null, callback=function(){
allNodes.push(obj1);
};
//,

console.log("we are here");
console.log(allNodes);
// Reading the zelig models and populating the model list in the right panel.
d3.json("data/zelig5models.json", function(error, json) {
Expand Down Expand Up @@ -798,7 +799,7 @@ function layout(v) {
.attr("id", function(d){
return "timeArc".concat(d.id);
})
.style("fill", timeColor)
.style("fill", "yellow")
.attr("fill-opacity", 0)
.on('mouseover', function(d){
d3.select(this).transition() .attr("fill-opacity", .3)
Expand Down Expand Up @@ -2170,19 +2171,25 @@ function varSummary(d) {

var summarydata = [],
tmpDataset = [], t1 = ["Mean:","Median:","Most Freq:","Occurrences:", "Median Freq:", "Occurrences:", "Least Freq:", "Occurrences:", "Stand.Dev:","Minimum:","Maximum:","Invalid:","Valid:","Uniques:","Herfindahl:"],
t2 = [(+d.mean).toPrecision(4).toString(),(+d.median).toPrecision(4).toString(),d.mode,rint(d.freqmode),d.mid, rint(d.freqmid), d.fewest, rint(d.freqfewest),(+d.sd).toPrecision(4).toString(),(+d.min).toPrecision(4).toString(),(+d.max).toPrecision(4).toString(),rint(d.invalid),rint(d.valid),rint(d.uniques),(+d.herfindahl).toPrecision(4).toString()],
t2 = [(+d.mean).toPrecision(4).toString() ,(+d.median).toPrecision(4).toString(),d.mode,rint(d.freqmode),d.mid, rint(d.freqmid), d.fewest, rint(d.freqfewest),(+d.sd).toPrecision(4).toString(),(+d.min).toPrecision(4).toString(),(+d.max).toPrecision(4).toString(),rint(d.invalid),rint(d.valid),rint(d.uniques),(+d.herfindahl).toPrecision(4).toString()],
i, j;

if (private) {
if (d.meanCI) {
t2 = [(+d.mean).toPrecision(4).toString() + " (" + (+d.meanCI.lowerBound).toPrecision(4).toString() + " - " + (+d.meanCI.upperBound).toPrecision(4).toString() + ")" ,(+d.median).toPrecision(4).toString(),d.mode,rint(d.freqmode),d.mid, rint(d.freqmid), d.fewest, rint(d.freqfewest),(+d.sd).toPrecision(4).toString(),(+d.min).toPrecision(4).toString(),(+d.max).toPrecision(4).toString(),rint(d.invalid),rint(d.valid),rint(d.uniques),(+d.herfindahl).toPrecision(4).toString()],
i, j;
}
}

for (i = 0; i < t1.length; i++) {
if(t2[i]=="NaN" | t2[i]=="NA" | t2[i]=="") continue;
if(t2[i].indexOf("NaN") > -1 | t2[i]=="NA" | t2[i]=="") continue;
tmpDataset=[];
tmpDataset.push(t1[i]);
tmpDataset.push(t2[i]);
summarydata.push(tmpDataset);
};

// console.log(summarydata);
d3.select("#tab3")
d3.select("#tab3") //tab when you mouseover a pebble
.select("p")
.html("<center><b>" +d.name+ "</b><br><i>" +d.labl+ "</i></center>")
.append("table")
Expand All @@ -2204,10 +2211,10 @@ function varSummary(d) {
.remove();
}
else if (d.plottype === "continuous") {
density(d, div="varSummary");
density(d, div="varSummary", private);
}
else if (d.plottype === "bar") {
bars(d, div="varSummary");
bars(d, div="varSummary", private);
}
else {
var plotsvg = d3.select("#tab3") // no graph to draw, but still need to remove previous graph
Expand Down Expand Up @@ -2235,7 +2242,14 @@ function popoverContent(d) {
if(d.labl != "") { outtext = outtext + "<div class='form-group'><label class='col-sm-4 control-label'>Label</label><div class='col-sm-6'><p class='form-control-static'><i>" + d.labl + "</i></p></div></div>";
}

if (d.mean != "NA") { outtext = outtext + "<div class='form-group'><label class='col-sm-4 control-label'>Mean</label><div class='col-sm-6'><p class='form-control-static'>" + (+d.mean).toPrecision(4).toString() + "</p></div></div>";
if (d.mean != "NA") {
outtext = outtext + "<div class='form-group'><label class='col-sm-4 control-label'>Mean</label><div class='col-sm-6'><p class='form-control-static'>" + (+d.mean).toPrecision(4).toString()
if (private) {
if (d.meanCI) {
outtext += " (" + (+d.meanCI.lowerBound).toPrecision(4).toString() + " - " + (+d.meanCI.upperBound).toPrecision(4).toString() + ")"
}
}
outtext += "</p></div></div>";
}

if (d.median != "NA") { outtext = outtext + "<div class='form-group'><label class='col-sm-4 control-label'>Median</label><div class='col-sm-6'><p class='form-control-static'>" + (+d.median).toPrecision(4).toString() + "</p></div></div>";
Expand Down Expand Up @@ -2336,13 +2350,13 @@ function panelPlots() {
allNodes[idArray[i]].subsetplot=false;
if (allNodes[idArray[i]].plottype === "continuous" & allNodes[idArray[i]].setxplot==false) {
allNodes[idArray[i]].setxplot=true;
density(allNodes[idArray[i]], div="setx");
density(allNodes[idArray[i]], div="setx", private);
allNodes[idArray[i]].subsetplot=true;
density(allNodes[idArray[i]], div="subset");
density(allNodes[idArray[i]], div="subset", private);
}
else if (allNodes[idArray[i]].plottype === "bar" & allNodes[idArray[i]].setxplot==false) {
allNodes[idArray[i]].setxplot=true;
bars(allNodes[idArray[i]], div="setx");
bars(allNodes[idArray[i]], div="setx", private);
allNodes[idArray[i]].subsetplot=true;
barsSubset(allNodes[idArray[i]]);
}
Expand Down
2 changes: 1 addition & 1 deletion data/fearonLaitinNewPreprocess3.json

Large diffs are not rendered by default.

Binary file added images/Thumbs.db
Binary file not shown.
Loading

0 comments on commit 7c2271f

Please sign in to comment.