Skip to content

Instantly share code, notes, and snippets.

@suneric1
suneric1 / bmw_data.csv
Last active January 18, 2016 21:00
Week 1: CSV data.
Model SalesIn2014 SalesIn2015 StartingPrice
1/2 Series 6621 10877 32850
3 Series 87451 89265 33150
4 Series 35583 40481 41650
5 Series 47187 41177 50200
6 Series 7757 6685 77300
7 Series 8648 8026 81300
X1 20217 12651 34800
X3 31029 28798 38950
X5 40933 48747 53900
@suneric1
suneric1 / bmw_data.csv
Created January 20, 2016 00:25
D3.CSV test
1/2 Series 6621 10877 32850
3 Series 87451 89265 33150
4 Series 35583 40481 41650
5 Series 47187 41177 50200
6 Series 7757 6685 77300
7 Series 8648 8026 81300
X1 20217 12651 34800
X3 31029 28798 38950
X5 40933 48747 53900
@suneric1
suneric1 / bmw_data_2014.csv
Last active January 25, 2016 07:19
Week2: Two Charts.
Model SalesIn2014
1/2 Series 6621
3 Series 87451
4 Series 35583
5 Series 47187
6 Series 7757
7 Series 8648
X1 20217
X3 31029
X5 40933
@suneric1
suneric1 / index.html
Last active February 1, 2016 22:27
Week 3: D3 Table.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:900' rel='stylesheet' type='text/css'>
<title>Audi is catching up with BMW in the U.S.</title>
<style>
body{
@suneric1
suneric1 / index.html
Created February 8, 2016 20:25
Week4: Sortable Heatmap table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:900' rel='stylesheet' type='text/css'>
<title>Audi is catching up with BMW in the U.S.</title>
<style>
body{
@suneric1
suneric1 / index.html
Created February 8, 2016 20:52
Week 4: SVG fixes
<html lang="en">
<head>
<meta charset="utf-8">
<title>SVG Shapes</title>
<style>
svg{
background: #ccc;
}
line{
stroke-width: 3px;
@suneric1
suneric1 / index.html
Last active February 8, 2016 23:37
Week4: Starter Bars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:900' rel='stylesheet' type='text/css'>
<title>Audi is catching up with BMW in the U.S.</title>
<style>
body{
@suneric1
suneric1 / betterlifeindex.csv
Created February 10, 2016 02:26
Week 5: Scatterplot Made in Class
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 25 columns, instead of 1. in line 6.
country,dwellingsWithoutBasicFacilities,housingExpenditure,roomsPerPerson,householdNetAdjustedDisposableIncome,householdNetFinancialWealth,employmentRate,jobSecurity,longTermUnemploymentRate,personalEarnings,qualityOfSupportNetwork,educationalAttainment,studentSkills,yearsInEducation,airPollution,waterQuality,consultationOnRuleMaking,voterTurnout,lifeExpectancy,selfReportedHealth,lifeSatisfaction,assaultRate,homicideRate,employeesWorkingVeryLongHours,timeDevotedToLeisureAndPersonalCare
Australia,1.1,20,2.3,31197,38482,72,4.4,1.06,46585,93,74,512,18.8,13,93,10.5,93,82,85,7.4,2.1,0.8,14.23,14.41
Austria,1,21,1.6,29256,48125,73,3.4,1.07,43837,95,82,500,16.9,27,95,7.1,75,81.1,69,7.5,3.4,0.5,8.61,14.46
Belgium,1.9,20,2.3,27811,78368,62,4.5,3.37,47276,91,71,509,18.8,21,84,4.5,89,80.5,74,7.1,6.6,1.2,4.41,15.71
Brazil,6.7,21,1.4,10310,6875,67,4.8,2.17,7909,90,43,402,16.3,18,67,4,79,73.4,69,7.2,7.9,25.5,10.74,14.97
Canada,0.2,22,2.5,30212,63261,72,6.6,0.9,44017,94,89,522,17,15,90,10.5,61,81,88,7.6,1.3,1.7,3.98,14.25
C
@suneric1
suneric1 / index.html
Last active February 16, 2016 03:26
Week 5: Fixed Barchart
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:900' rel='stylesheet' type='text/css'>
<title>Audi is catching up with BMW in the U.S.</title>
<style>
body{
@suneric1
suneric1 / index.html
Last active February 15, 2016 21:53
Week 5: Scatterplot with My Data
<!DOCTYPE html>
<!-- A modified example from Scott Murray's Knight d3 course. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Formatting Ticks</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style type="text/css">