Skip to content
Snippets Groups Projects
Commit 798335bb authored by Wade Fagen-Ulmschneider (waf)'s avatar Wade Fagen-Ulmschneider (waf)
Browse files

exp_activity6

parent c65dc1bf
No related branches found
No related tags found
No related merge requests found
{
"title": "Activity 6: Winning Streaks in Illini Football",
"index": 20170212,
"type": "Experience"
}
import csv
import json
# There's no need for any Python here.
This diff is collapsed.
{% extends "static/templates/projectBase.html" %}
{% block projectContent %}
<h2>Winning Streaks in Illini Football</h2>
<div id="chart"></div>
<script src="web/vis.js"></script>
{% endblock %}
"use strict";
/* Boilerplate jQuery */
$(function() {
d3.csv("res/illiniFootballScores_streak.csv", function (data) {
visualize(data);
});
});
/* 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! :) ==
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment