Skip to content

Instantly share code, notes, and snippets.

// Create an svg
svg = d3.select("svg")
.attr("width", width + margin.right + margin.left)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + (margin.left - line_width) + "," + margin.top + ")");
@csessig86
csessig86 / ia_free_reduced_50_higher.csv
Created April 4, 2015 19:39
Bar chart: Free and reduced lunch in IA
District Name Enrollment FreeLunch ReducedLunch FreeorReduced FreeorReducedPrice FreeOrReducedPercent
5310 Postville 656 654 0 654 99.7 99.7
5184 Perry 1746 1104 222 1326 75.95 75.9
6219 Storm Lake 2306 1453 253 1706 73.98 74
6516 Twin Rivers 50 30 7 37 74 74
1368 Columbus 739 487 59 546 73.88 73.9
1737 Des Moines Independent 31356 19796 3163 22959 73.22 73.2
1701 Denison 2126 1273 255 1528 71.87 71.9
4104 Marshalltown 4852 2932 456 3388 69.83 69.8
6795 Waterloo 10662 6498 914 7412 69.52 69.5
@csessig86
csessig86 / ia_free_reduced_50_higher.csv
Last active August 29, 2015 14:19
Cleaned bar chart: Free and reduced lunch in IA
District Name Enrollment FreeLunch ReducedLunch FreeorReduced Price Percent
72 Albert City-Truesdale 99 36 17 53 53.54 53.5
135 Allamakee 1116 329 237 566 50.72 50.7
387 Atlantic 1499 600 155 755 50.37 50.4
594 Belmond-Klemme 716 334 37 371 51.82 51.8
882 Burlington 4001 2225 217 2442 61.03 61
916 CAL 220 117 21 138 62.73 62.7
977 Cardinal 627 306 56 362 57.74 57.7
1053 Cedar Rapids 15884 6894 1055 7949 50.04 50
1093 Central Decatur 698 339 109 448 64.18 64.2
@csessig86
csessig86 / ia_free_reduced_50_higher.csv
Created April 19, 2015 01:29
Breakdown: Students on free and reduced lunch in Iowa
Á Name Enrollment FreeLunch ReducedLunch FreeorReduced Price Percent
72 Albert City-Truesdale 99 36 17 53 53.54 53.5
135 Allamakee 1116 329 237 566 50.72 50.7
387 Atlantic 1499 600 155 755 50.37 50.4
594 Belmond-Klemme 716 334 37 371 51.82 51.8
882 Burlington 4001 2225 217 2442 61.03 61
916 CAL 220 117 21 138 62.73 62.7
977 Cardinal 627 306 56 362 57.74 57.7
1053 Cedar Rapids 15884 6894 1055 7949 50.04 50
1093 Central Decatur 698 339 109 448 64.18 64.2
<script>$('#tab-photos').addClass('display-none');$('#mediawell-photos').addClass('display-none');$('#mediawell-list > li').each(function() {if ( $(this).attr('id') === 'tab-embed-one' ) {$(this).prependTo(this.parentNode);}});</script>
@csessig86
csessig86 / gist:c9194c7f276494f2a1db
Last active August 29, 2015 14:19
Set default to gallery
<script>$('#mediawell-list li').each(function() {if ( $(this).attr('id') === 'tab-gallery' ) {$(this).prependTo(this.parentNode);}});</script>
@csessig86
csessig86 / index.html
Created April 23, 2015 03:35
D3 line chart: Album sales down
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Line Chart with Multiple Lines</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Album sales down since 2008</h1>
@csessig86
csessig86 / style.css
Created April 30, 2015 20:59
Ellipsis CSS
.ellipsis {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
width: 40px;
}
@csessig86
csessig86 / farmersmarkets.html
Last active August 29, 2015 14:20
Farmers markets embed
<div class="left">
<h3><a href="http://thegazette.com/data/farmers-markets" target="_blank">Farmers markets in Eastern Iowa </a></h3>
<a href="http://thegazette.com/data/farmers-markers" target="_blank"><img style="width: 100%;" src="http://thegazette.com/Includes/data/projects/farmers-markets/img/farmersmkt-image.png" alt="Farmers markets in Eastern Iowa" /></a>
<p class="embed-subhead">Click to find a farmers market near you.</p>
</div>
<div id="extrapicture2" class="extrapicture_ind center"></div>