diff --git a/project_uiuc/project.json b/project_uiuc/project.json new file mode 100644 index 0000000000000000000000000000000000000000..1dd8dd1fd456a8ae6625cb48109689a67cf9fb2b --- /dev/null +++ b/project_uiuc/project.json @@ -0,0 +1,5 @@ +{ + "title": "Project #1: UIUC Datasets", + "index": 20170307, + "type": "Project" +} diff --git a/project_uiuc/py/compute.py b/project_uiuc/py/compute.py new file mode 100644 index 0000000000000000000000000000000000000000..3a207025de24f7de2c64a9c63292bc20d74431c9 --- /dev/null +++ b/project_uiuc/py/compute.py @@ -0,0 +1,4 @@ +import csv +import json + +# There's no need for any Python here. diff --git a/project_uiuc/res/.keep b/project_uiuc/res/.keep new file mode 100644 index 0000000000000000000000000000000000000000..8d1c8b69c3fce7bea45c73efd06983e3c419a92f --- /dev/null +++ b/project_uiuc/res/.keep @@ -0,0 +1 @@ + diff --git a/project_uiuc/web/index.html b/project_uiuc/web/index.html new file mode 100644 index 0000000000000000000000000000000000000000..e6252ff93c23ba22fcb259cabde9803ad44a7797 --- /dev/null +++ b/project_uiuc/web/index.html @@ -0,0 +1,9 @@ +{% extends "static/templates/projectBase.html" %} +{% block projectContent %} + +<h2>Project #1</h2> +<div id="chart"></div> + +<script src="web/vis.js"></script> + +{% endblock %} diff --git a/project_uiuc/web/vis.js b/project_uiuc/web/vis.js new file mode 100644 index 0000000000000000000000000000000000000000..4e333903e0335632fc4893b0f4e39eff0cde72d5 --- /dev/null +++ b/project_uiuc/web/vis.js @@ -0,0 +1,37 @@ +"use strict"; + +/* Boilerplate jQuery */ +$(function() { + $.get("res/fileName.csv") + .done(function (csvData) { + var data = d3.parseCsv(csvData); + visualize(data); + }) + .fail(function(e) { + alert("Failed to load CSV file!"); + }); +}); + +/* Visualize the data in the visualize function */ +var visualize = function(data) { + console.log(data); + + // == BOILERPLATE == + var margin = { top: 50, right: 50, bottom: 50, left: 50 }, + width = 800 - margin.left - margin.right, + height = (data.length * 20); + + var svg = d3.select("#chart") + .append("svg") + .attr("width", width + margin.left + margin.right) + .attr("height", height + margin.top + margin.bottom) + .style("width", width + margin.left + margin.right) + .style("height", height + margin.top + margin.bottom) + .append("g") + .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); + + + + // == Your code! :) == + +};