Skip to content

Instantly share code, notes, and snippets.

@DimsumPanda
DimsumPanda / README.md
Last active November 15, 2015 18:52
Week 5: Scatterplot

Week 5: Scatterplot

Assignment: Create a scatterplot using any of the data in the CSV file.

  • Dots for the data rows.
  • Margins set up with an object (margin.top...)
  • Scales that use the margin settings.
  • A label on the X axis, positioned with transform, translate.
  • A special case color on the one of the dots, using an if statement.
@DimsumPanda
DimsumPanda / README.md
Last active November 15, 2015 19:11
Week 5: Bar Chart

Week 5:

Assignment: Adding labels, axis, and colors in the bar chart.

@DimsumPanda
DimsumPanda / index.html
Last active September 28, 2015 16:13
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>Maternal Mortality Rate in 2013 by Country</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
@DimsumPanda
DimsumPanda / README.md
Last active November 17, 2015 20:34
Week 5: Dot Plot

Week 5: Dot Plot

Assignment: Create a scatterplot using any of the data in the CSV file.

Selected only the data for 1990 and compare it against 2015. A lot of the challenge came from the spacing of the dots and the labels in the graph.

@DimsumPanda
DimsumPanda / index.html
Last active November 18, 2015 00:18
Week 6: Scatter tooltips
<!DOCTYPE html>
<!-- A modified example from Scott Murray's Knight d3 course. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Maternal Mortality Rate in 2013 by Country</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
@DimsumPanda
DimsumPanda / index.html
Created October 5, 2015 20:35
Week 6: My Line Plot
<!DOCTYPE html>
<!-- Modification of an example by Scott Murray from Knight D3 course -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Line Chart with Multiple Lines</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
@DimsumPanda
DimsumPanda / index.html
Last active October 12, 2015 00:56
Week 7: Dots on Lines
<!DOCTYPE html>
<!-- Modification of an example by Scott Murray from Knight D3 course -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Line Chart with Multiple Lines</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</head>
@DimsumPanda
DimsumPanda / Thumbs.db
Last active November 18, 2015 01:49
Week 7: Transition Plot
@DimsumPanda
DimsumPanda / deaths_04yearsold_2013percent.csv
Last active December 5, 2015 22:32
Week 8: Finished Bar Homework
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 8. in line 7.
Country,Meningitis_encephalitis,Respiratory_infections,Sepsis,Pertussis,Malaria,Measles,Congenital_anomalies,HIV_AIDS,Diarrhoeal_diseases,Asphyxia_trauma
India,0.042488278,0.233534888,0.145938913,0.007182025,0.009314662,0.046933792,0.123114044,0.00663867,0.184781579,0.200073149
Democratic Republic of the Congo,0.040686134,0.221728479,0.075842245,0.01386753,0.212434283,0.06908283,0.048008834,0.02005919,0.150790387,0.147500089
Indonesia,0.025829262,0.27277861,0.106128312,0.01262,0.030445137,0.076689828,0.185003315,0.017677822,0.092133369,0.180694346
Pakistan,0.042190621,0.28618202,0.163435643,0.021985945,0.001921226,0.020857808,0.075568204,0.000843982,0.175454966,0.211559586
Nigeria,0.043200357,0.207813651,0.071262349,0.016492104,0.287175958,0.007996224,0.044873945,0.042612526,0.133019132,0.145553754
Ethiopia,0.034238059,0.262054587,0.115549659,0.028521607,0.043578469,0.034427597,0.081432904,0.034783927,0.140515542,0.22489765
Afghanistan,0.052876527,0.315089385,0.112120879,0.01908775,9.43E-05,0.061885819,0.0564
@DimsumPanda
DimsumPanda / Thumbs.db
Last active November 18, 2015 02:19
Week 8: Scatter Homework