From e472ee951d9e122d267a839870a0380befbd4c35 Mon Sep 17 00:00:00 2001 From: jessier08 Date: Mon, 1 Feb 2016 19:20:58 -0500 Subject: [PATCH 1/6] final 2 --- jessier08/ps-02/scriptA.js | 6 +++--- jessier08/ps-02/scriptE.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jessier08/ps-02/scriptA.js b/jessier08/ps-02/scriptA.js index 21fd36a..42c6cce 100644 --- a/jessier08/ps-02/scriptA.js +++ b/jessier08/ps-02/scriptA.js @@ -25,8 +25,8 @@ for (var i=0; i<10; i++){ var varyW = (Math.random()*100)+100; var varyH = (Math.random()*100)+100; - var op = (Math.random()*.6); - if (op<.05){op = .1}; +// var op = (Math.random()*.6); +// if (op<.05){op = .1}; var x = nudgeX, y = nudgeY, @@ -37,7 +37,7 @@ for (var i=0; i<10; i++){ triangle(x,y,w,h); - canvas.globalAlpha = op; + canvas.globalAlpha = .2; console.log(canvas.globalAlpha); diff --git a/jessier08/ps-02/scriptE.js b/jessier08/ps-02/scriptE.js index fd27eef..c2bdc89 100644 --- a/jessier08/ps-02/scriptE.js +++ b/jessier08/ps-02/scriptE.js @@ -21,7 +21,7 @@ for (var i=0; i<25; i++){ circle(); } - + op = op - (Math.random()*.08); if (op<.05){op=.1}; From d97bfc86b62e0163839b88d23f9be876f37b726b Mon Sep 17 00:00:00 2001 From: jessier08 Date: Mon, 29 Feb 2016 00:09:08 -0500 Subject: [PATCH 2/6] survey view --- jessier08/ps-03/a.html | 27 ++ jessier08/ps-03/b.html | 57 +++ jessier08/ps-03/css/boilerplate.css | 198 ++++++++++ jessier08/ps-03/css/main.css | 120 ++++++ jessier08/ps-03/css/normalize.min.css | 1 + jessier08/ps-03/css/survey.css | 54 +++ jessier08/ps-03/index.html | 21 ++ jessier08/ps-03/js/a.js | 36 ++ jessier08/ps-03/js/b.js | 387 ++++++++++++++++++++ jessier08/ps-03/js/solutions.js | 23 ++ jessier08/ps-03/js/spreadsheet.js | 48 +++ jessier08/ps-03/js/spreadsheet2.js | 66 ++++ jessier08/ps-03/js/survey.js | 149 ++++++++ jessier08/ps-03/js/vendor/D3-LICENSE | 26 ++ jessier08/ps-03/js/vendor/d3.min.js | 5 + jessier08/ps-03/js/vendor/jquery.min.js | 4 + jessier08/ps-03/js/vendor/lodash.min.js | 102 ++++++ jessier08/ps-03/js/vendor/modernizer.min.js | 4 + jessier08/ps-03/skillsMean.csv | 2 + 19 files changed, 1330 insertions(+) create mode 100644 jessier08/ps-03/a.html create mode 100644 jessier08/ps-03/b.html create mode 100755 jessier08/ps-03/css/boilerplate.css create mode 100644 jessier08/ps-03/css/main.css create mode 100755 jessier08/ps-03/css/normalize.min.css create mode 100644 jessier08/ps-03/css/survey.css create mode 100644 jessier08/ps-03/index.html create mode 100755 jessier08/ps-03/js/a.js create mode 100644 jessier08/ps-03/js/b.js create mode 100644 jessier08/ps-03/js/solutions.js create mode 100644 jessier08/ps-03/js/spreadsheet.js create mode 100644 jessier08/ps-03/js/spreadsheet2.js create mode 100644 jessier08/ps-03/js/survey.js create mode 100644 jessier08/ps-03/js/vendor/D3-LICENSE create mode 100644 jessier08/ps-03/js/vendor/d3.min.js create mode 100755 jessier08/ps-03/js/vendor/jquery.min.js create mode 100644 jessier08/ps-03/js/vendor/lodash.min.js create mode 100755 jessier08/ps-03/js/vendor/modernizer.min.js create mode 100644 jessier08/ps-03/skillsMean.csv diff --git a/jessier08/ps-03/a.html b/jessier08/ps-03/a.html new file mode 100644 index 0000000..62679a1 --- /dev/null +++ b/jessier08/ps-03/a.html @@ -0,0 +1,27 @@ + + + + + + PS-03 Solution A + + + + + + + + + +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/jessier08/ps-03/b.html b/jessier08/ps-03/b.html new file mode 100644 index 0000000..1a2b7e6 --- /dev/null +++ b/jessier08/ps-03/b.html @@ -0,0 +1,57 @@ + + + + + + PS-03 Solution + + + + + + + + + + +
+
How much do students expect to improve in this class?
+ based on survey results on a scale of 1-10 +
+
+ + + +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/jessier08/ps-03/css/boilerplate.css b/jessier08/ps-03/css/boilerplate.css new file mode 100755 index 0000000..95751ea --- /dev/null +++ b/jessier08/ps-03/css/boilerplate.css @@ -0,0 +1,198 @@ +/*! HTML5 Boilerplate v5.0 | MIT License | http://h5bp.com/ */ + +html { + color: #222; + font-size: 1em; + line-height: 1.4; +} + +::-moz-selection { + background: #b3d4fc; + text-shadow: none; +} + +::selection { + background: #b3d4fc; + text-shadow: none; +} + +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} + +audio, +canvas, +iframe, +img, +svg, +video { + vertical-align: middle; +} + +fieldset { + border: 0; + margin: 0; + padding: 0; +} + +textarea { + resize: vertical; +} + +.browserupgrade { + margin: 0.2em 0; + background: #ccc; + color: #000; + padding: 0.2em 0; +} + + +/* ========================================================================== + Author's custom styles + ========================================================================== */ + + + + + + + + + + + + + + + +/* ========================================================================== + Media Queries + ========================================================================== */ + +@media only screen and (min-width: 35em) { + +} + +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + +} + +/* ========================================================================== + Helper classes + ========================================================================== */ + +.hidden { + display: none !important; + visibility: hidden; +} + +.visuallyhidden { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.visuallyhidden.focusable:active, +.visuallyhidden.focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; +} + +.invisible { + visibility: hidden; +} + +.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} + +.clearfix:after { + clear: both; +} + +.clearfix { + *zoom: 1; +} + +/* ========================================================================== + Print styles + ========================================================================== */ + +@media print { + *, + *:before, + *:after { + background: transparent !important; + color: #000 !important; + box-shadow: none !important; + text-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + thead { + display: table-header-group; + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } +} \ No newline at end of file diff --git a/jessier08/ps-03/css/main.css b/jessier08/ps-03/css/main.css new file mode 100644 index 0000000..0e8c675 --- /dev/null +++ b/jessier08/ps-03/css/main.css @@ -0,0 +1,120 @@ +body { + font-family: 'Railway', sans-serif; + background-color: hsla(180, 10%, 95%, 1.0); + color: hsla(0, 10%, 10%, 1.0); + margin: 2em; + font-size: 12pt; +} + +h1, +h2, +h3, +h4, +h5, +strong { + color: hsla(0, 15%, 40%, 1.0); + text-transform: uppercase; + font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin-top: 1.5em; + margin-bottom: 0em; +} + +a { + text-decoration: none; + color: hsla(180, 60%, 30%, 1.0); +} + +a:hover { + color: hsla(180, 40%, 15%, 1.0); + background-color: hsla(180, 40%, 90%, 1.0); +} + +.sub { + font-weight: normal; + margin-top: 0px; +} + +.fixed { + font-family: monospace +} + +ul, +ol { + margin: 0.2em; + padding-right: 6em; + padding-left: 1em; +} + +ul.quiet { + list-style: none; +} + +p, +li { + margin-top: 0.2em; + font-family: 'Raleway', sans-serif; + line-height: 1.7em; + color: hsla(0, 10%, 30%, 1.0); +} + +li { + margin-bottom: 0.6em; + line-height: 1.3em; + font-size: 11pt; +} + +.fixed-width { + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + +span.date { + font-family: monospace; +} + +span.title { + font-weight: bold; + text-transform: uppercase; + font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; + color: hsla(0, 5%, 60%, 1.0); +} + +code { + color: black; + padding: .1em; + border-radius: 4px; +} + +span.description { + font-weight: normal; + margin-left: 0.3em; +} + +span.title::before { + content: " – "; +} + +span.title::after { + content: ":"; +} + +ul#solutions { + margin: 0px; + padding: 0px; +} + +ul#solutions > li { + font-size: 14pt; + list-style: none; + display: inline-block; + padding: 0.5em 1em; + margin: 0px 0px 0px 0px; +} +img.illustration { + display: block; + width: 100%; + max-width: 600px; + margin-top: 1em; + margin-bottom: 1.5em; +} diff --git a/jessier08/ps-03/css/normalize.min.css b/jessier08/ps-03/css/normalize.min.css new file mode 100755 index 0000000..f6e0b65 --- /dev/null +++ b/jessier08/ps-03/css/normalize.min.css @@ -0,0 +1 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/jessier08/ps-03/css/survey.css b/jessier08/ps-03/css/survey.css new file mode 100644 index 0000000..186d3b5 --- /dev/null +++ b/jessier08/ps-03/css/survey.css @@ -0,0 +1,54 @@ + +.body{ + width:700px; + margin-left:auto; + margin-right:auto; + padding-bottom:20px; +} +.container, .container2, .container3{ + width:700px; + height:220px; + margin-bottom:10px; +} +.mainplot, .mainplot2, .mainplot3{ + width:100%; + height:100px; +} +.smallplot, .smallplot2, .smallplot3{ + width:50px; + height:120px; + float:left; + opacity:.6; +} +.maintitle{ + font-family: 'Roboto Slab', serif; + font-size:1em; + margin-top:40px; + width:700px; + height:50px; +} +.title{ + font-family: 'Roboto Slab', serif; + font-size:.8em; +} +.title2{ + font-family: 'Roboto Slab', serif; + font-size:.8em; +} +.title3{ + font-family: 'Roboto Slab', serif; + font-size:.8em; +} +.one{ + font-family: 'Roboto Slab', serif; + font-size:.8em; + opacity:.3; +} +.number{ + font-family: sans-serif; + font-size:.6em; +} +.legend{ + float:right; + margin-top:-25px; +} \ No newline at end of file diff --git a/jessier08/ps-03/index.html b/jessier08/ps-03/index.html new file mode 100644 index 0000000..0314512 --- /dev/null +++ b/jessier08/ps-03/index.html @@ -0,0 +1,21 @@ + + + + + + IDV 01 survey + + + + + + + +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/jessier08/ps-03/js/a.js b/jessier08/ps-03/js/a.js new file mode 100755 index 0000000..55892e3 --- /dev/null +++ b/jessier08/ps-03/js/a.js @@ -0,0 +1,36 @@ +var m = {t:50,r:50,b:50,l:50}, + w = d3.select('.plot').node().clientWidth - m.l - m.r, + h = d3.select('.plot').node().clientHeight - m.t - m.b; + +var plot = d3.select(".plot") + .append('svg') + .attr('class', 'canvas') + .attr('width', w) + .attr('height', h); + +var scaleX = d3.scale.linear().domain([0,10]).range([m.l,w-m.r]), + scaleY = d3.scale.linear().domain([0,10]).range([h-m.t,m.b]), + scaleR = d3.scale.linear().domain([1,10]).range([2,18]); + +var axisX = d3.svg.axis() + .orient('bottom') + .scale(scaleX) + .ticks(0); + +var axisY = d3.svg.axis() + .orient('left') + .scale(scaleY) + .ticks(0); + +var setData = function (data) { + + +}; + +$(document).ready( function () { + continuouslyLoadData("1tL7m0JNa0CZwEyU9WmB3u8j5T829jqtbnu-26ibPp5E", setData); +}); + + + + diff --git a/jessier08/ps-03/js/b.js b/jessier08/ps-03/js/b.js new file mode 100644 index 0000000..cbc56ac --- /dev/null +++ b/jessier08/ps-03/js/b.js @@ -0,0 +1,387 @@ +var m = {t:10,r:10,b:10,l:10}, + w = d3.select('.smallplot').node().clientWidth, + h = d3.select('.smallplot').node().clientHeight; + +var m = {t:10,r:10,b:10,l:10}, + wMain = d3.select('.mainplot').node().clientWidth, + hMain = d3.select('.mainplot').node().clientHeight; + +var scaleX = d3.scale.linear().domain([0,10]).range([0,w]), + scaleY = d3.scale.linear().domain([0,10]).range([h,0]); + +var scaleXmain = d3.scale.linear().domain([0,10]).range([0,wMain]), + scaleYmain = d3.scale.linear().domain([0,10]).range([hMain-m.t-m.b,0]); + +//mainplot value arrays +var avg = [7.17,7.5,6.29,6.93,3.43,5.36], + title = ["Communication","Graphic Design","Software"]; + +//var tip = d3.tip() +// .attr('class','d3-tip') +// .offset([0,0]) +// .html(function(d){return d.name;}); + +var graphSetup = function (data) { + + var draw = function (data){ + console.log(data); + + var legend = d3.select('.legend') + .append('svg').attr('width',200).attr('height',50) + .attr('opacity',.3); + + legend.append('circle') + .attr('cx',15) + .attr('cy',40) + .attr('r',4); + + legend.append('text') + .attr('transform','translate(22,43)') + .attr('class','number') + .text('current skill level'); + + legend.append('circle') + .attr('cx',113) + .attr('cy',40) + .attr('r',4) + .attr('stroke-width',1) + .attr('stroke','black') + .attr('fill','white'); + + legend.append('text') + .attr('transform','translate(120,43)') + .attr('class','number') + .text('expected skill level'); + + //main plot 1 - communication + var mainplot = d3.select('.container').selectAll('.mainplot') + .append('svg') + .attr('width',wMain) + .attr('height',hMain) + .append('g') + .attr('transform','translate(0,'+ m.t+')'); + + mainplot.append('text') + .attr('transform','translate(0,30)') + .attr('class','title') + .text('communication') + .style('fill','#b57ed9'); + + mainplot.append('text') + .attr('transform','translate(0,65)') + .attr('class','number') + .text('1') + .attr('opacity',.3); + + mainplot.append('text') + .attr('transform','translate('+wMain/1.02+',65)') + .attr('class','number') + .text('10') + .attr('opacity',.3); + + mainplot.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(0)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(10)) + .attr('stroke-width',1) + .attr('stroke','black') + .attr('opacity',.3); + + mainplot.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(7.14)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(7.5)) + .attr('stroke-width',2) + .attr('stroke','#b57ed9'); + + mainplot.append('circle') + .attr('cy', hMain/2 ) + .attr('cx', scaleXmain(7.5)) + .attr('r',8) + .attr('fill','white') + .attr('stroke-width',2) + .attr('stroke','#b57ed9'); + + mainplot.append('circle') + .attr('cy', hMain/2) + .attr('cx', scaleXmain(7.14)) + .attr('r',8) + .style('fill','#b57ed9'); + + + //small multiple 1 - communication + + var smallplot = d3.select('.container').selectAll('.smallplot') + .data(data); + + smallplot.enter() + .append('div').attr('class','smallplot'); + //.call(tip); + + smallplot.each(function(d){ + var svg = d3.select(this) + .append('svg') + .attr('class','graph') + .attr('width', w) + .attr('height', h); + + var group = svg.append('g') + .attr('transform','translate(0,'+ m.t+')'); + + group.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(0)) + .attr('x2',w/2) + .attr('y2', scaleY(10)) + .attr('stroke-width',.5) + .attr('stroke','black') + .attr('opacity',.3); + + group.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(d.criticalcommunication)) + .attr('x2',w/2) + .attr('y2', scaleY(d.criticalcommunication_2)) + .attr('stroke-width',1) + .attr('stroke','#b57ed9'); + + group.append('circle') + .attr('cx', w/2 ) + .attr('cy', scaleY(d.criticalcommunication_2)) + .attr('r',4) + .attr('fill','white') + .attr('stroke-width',1) + .attr('stroke','#b57ed9'); + //.on('mouseover','tip.show') + //.on('mouseout','tip.hide'); + + group.append('circle') + .attr('cx', w/2) + .attr('cy', scaleY(d.criticalcommunication)) + .attr('r',4) + .style('fill','#b57ed9') + .on('mouseover','tip.show') + .on('mouseout','tip.hide'); + }) + + //main plot 2 - graphic design + var mainplot2 = d3.select('.container2').selectAll('.mainplot2') + .append('svg') + .attr('width',wMain) + .attr('height',hMain) + .append('g') + .attr('transform','translate(0,'+ m.t+')'); + + mainplot2.append('text') + .attr('transform','translate(0,30)') + .attr('class','title2') + .text('graphic design') + .style('fill','#6c9ef8'); + +// mainplot2.append('text') +// .attr('transform','translate(0,65)') +// .attr('class','number') +// .text('1') +// .attr('opacity',.3); +// +// mainplot2.append('text') +// .attr('transform','translate('+wMain/1.02+',65)') +// .attr('class','number') +// .text('10') +// .attr('opacity',.3); + + mainplot2.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(0)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(10)) + .attr('stroke-width',1) + .attr('stroke','black') + .attr('opacity',.3); + + mainplot2.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(6.29)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(6.9)) + .attr('stroke-width',2) + .attr('stroke','#6c9ef8'); + + mainplot2.append('circle') + .attr('cy', hMain/2 ) + .attr('cx', scaleXmain(6.9)) + .attr('r',8) + .attr('fill','white') + .attr('stroke-width',2) + .attr('stroke','#6c9ef8'); + + mainplot2.append('circle') + .attr('cy', hMain/2) + .attr('cx', scaleXmain(6.29)) + .attr('r',8) + .attr('fill','#6c9ef8'); + + //small multiple 2 - graphic design + var smallplot2 = d3.select('.container2').selectAll('.smallplot2') + .data(data); + + smallplot2.enter() + .append('div').attr('class','smallplot2'); + + smallplot2.each(function(d){ + var svg = d3.select(this) + .append('svg') + .attr('class','graph') + .attr('width', w) + .attr('height', h); + + var group2 = svg.append('g') + .attr('transform','translate(0,'+ m.t+')'); + + group2.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(0)) + .attr('x2',w/2) + .attr('y2', scaleY(10)) + .attr('stroke-width',.5) + .attr('stroke','black') + .attr('opacity',.3); + + group2.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(d.graphicdesign)) + .attr('x2',w/2) + .attr('y2', scaleY(d.graphicdesign_2)) + .attr('stroke-width',1) + .attr('stroke','#6c9ef8'); + + group2.append('circle') + .attr('cx', w/2 ) + .attr('cy', scaleY(d.graphicdesign_2)) + .attr('r',4) + .attr('fill','white') + .attr('stroke-width',1) + .attr('stroke','#6c9ef8'); + + group2.append('circle') + .attr('cx', w/2) + .attr('cy', scaleY(d.graphicdesign)) + .attr('r',4) + .style('fill','#6c9ef8'); + }) + + //main plot 3 - software + var mainplot3 = d3.select('.container3').selectAll('.mainplot3') + .append('svg') + .attr('width',wMain) + .attr('height',hMain) + .append('g') + .attr('transform','translate(0,'+ m.t+')'); + + mainplot3.append('text') + .attr('transform','translate(0,30)') + .attr('class','title3') + .text('software') + .style('fill','#85a300'); + + mainplot3.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(0)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(10)) + .attr('stroke-width',1) + .attr('stroke','black') + .attr('opacity',.3); + + mainplot3.append('line') + .attr('y1',hMain/2) + .attr('x1', scaleXmain(3.43)) + .attr('y2',hMain/2) + .attr('x2', scaleXmain(5.36)) + .attr('stroke-width',2) + .attr('stroke','#85a300'); + + mainplot3.append('circle') + .attr('cy', hMain/2 ) + .attr('cx', scaleXmain(5.36)) + .attr('r',8) + .attr('fill','white') + .attr('stroke-width',2) + .attr('stroke','#85a300'); + + mainplot3.append('circle') + .attr('cy', hMain/2) + .attr('cx', scaleXmain(3.43)) + .attr('r',8) + .style('fill','#85a300'); + + //small multiple 2 - graphic design + var smallplot3 = d3.select('.container3').selectAll('.smallplot3') + .data(data); + + smallplot3.enter() + .append('div').attr('class','smallplot3'); + + smallplot3.each(function(d){ + var svg = d3.select(this) + .append('svg') + .attr('class','graph') + .attr('width', w) + .attr('height', h); + + var group3 = svg.append('g') + .attr('transform','translate(0,'+ m.t+')'); + + group3.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(0)) + .attr('x2',w/2) + .attr('y2', scaleY(10)) + .attr('stroke-width',.5) + .attr('stroke','black') + .attr('opacity',.3); + + group3.append('line') + .attr('x1',w/2) + .attr('y1', scaleY(d.graphicdesign)) + .attr('x2',w/2) + .attr('y2', scaleY(d.graphicdesign_2)) + .attr('stroke-width',1) + .attr('stroke','#85a300'); + + group3.append('circle') + .attr('cx', w/2 ) + .attr('cy', scaleY(d.graphicdesign_2)) + .attr('r',4) + .attr('fill','white') + .attr('stroke-width',1) + .attr('stroke','#85a300'); + + group3.append('circle') + .attr('cx', w/2) + .attr('cy', scaleY(d.graphicdesign)) + .attr('r',4) + .style('fill','#85a300'); + }) + } + + var drawmain ; + + + var setData = function (sheet) { + spreadsheetData = sheet; + draw(spreadsheetData); + }; + + $(document).ready( function () { + continuouslyLoadData("1tL7m0JNa0CZwEyU9WmB3u8j5T829jqtbnu-26ibPp5E", setData); + }); +}; + +graphSetup(); + + + + diff --git a/jessier08/ps-03/js/solutions.js b/jessier08/ps-03/js/solutions.js new file mode 100644 index 0000000..70a2bdf --- /dev/null +++ b/jessier08/ps-03/js/solutions.js @@ -0,0 +1,23 @@ +var studentsS = + "frankenbits jessier08 odonnel-p severli93 tangdru " + + "xiaoyunver KiniLuo Luegreen egunn navarjun " + + "liapetronio jiani rcmorrill" + +var students = studentsS.split(" ").sort(); + +var addSolution = function (student, problemset) { + var url = "../" + student + "/" + problemset + "/index.html"; + var tag = "
  • " + student + "
  • "; + $('#solutions').append($(tag)); +}; + +var solutions = function (problemset) { + $('#dynamic-content').append($("