Skip to content

Instantly share code, notes, and snippets.

View jowang0319's full-sized avatar

Zhizhou Wang jowang0319

View GitHub Profile
@jowang0319
jowang0319 / data.csv
Last active October 4, 2015 21:12
"Week 6: My Line Plot.
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 55 columns, instead of 41. in line 2.
country,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
Aruba,102.8116,99.417,94.4542,89.4914,84.5286,79.5658,74.603,71.665,68.727,65.789,62.851,59.913,59.0044,58.0958,57.1872,56.2786,55.37,54.9542,54.5384,54.1226,53.7068,53.291,53.0288,52.7666,52.5044,52.2422,51.98,51.41,50.84,50.27,49.7,49.13,48.7648,48.3996,48.0344,47.6692,47.304,46.067,44.83,43.593,42.356,41.119,39.5738,38.0286,36.4834,34.9382,33.393,32.0268,30.6606,29.2944,27.9282,26.562,24.842,23.122
Afghanistan,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,146.215,147.109,148.003,148.897,149.791,150.8782,151.9654,153.0526,154.1398,155.227,156.3758,157.5246,158.6734,159.8222,160.971,161.56,162.149,162.738,163.327,163.916,164.1812,164.4464,164.7116,164.9768,165.242,161.4432,157.6444,153.
@jowang0319
jowang0319 / data.csv
Created October 4, 2015 21:14
Week 6: My Line Plot
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 55 columns, instead of 41. in line 2.
country,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
Aruba,102.8116,99.417,94.4542,89.4914,84.5286,79.5658,74.603,71.665,68.727,65.789,62.851,59.913,59.0044,58.0958,57.1872,56.2786,55.37,54.9542,54.5384,54.1226,53.7068,53.291,53.0288,52.7666,52.5044,52.2422,51.98,51.41,50.84,50.27,49.7,49.13,48.7648,48.3996,48.0344,47.6692,47.304,46.067,44.83,43.593,42.356,41.119,39.5738,38.0286,36.4834,34.9382,33.393,32.0268,30.6606,29.2944,27.9282,26.562,24.842,23.122
Afghanistan,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,146.215,147.109,148.003,148.897,149.791,150.8782,151.9654,153.0526,154.1398,155.227,156.3758,157.5246,158.6734,159.8222,160.971,161.56,162.149,162.738,163.327,163.916,164.1812,164.4464,164.7116,164.9768,165.242,161.4432,157.6444,153.
@jowang0319
jowang0319 / co2_emissions.csv
Created October 4, 2015 21:15
Week 6: Labeled Lines
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 54 columns, instead of 27. in line 2.
countryName,countryCode,indicatorName,indicatorCode,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
Afghanistan,AFG,CO2 emissions (kt),EN.ATM.CO2E.KT,491.378,689.396,707.731,839.743,1008.425,1092.766,1283.45,1224.778,942.419,1672.152,1895.839,1532.806,1639.149,1917.841,2126.86,1987.514,2390.884,2159.863,2240.537,1760.16,1983.847,2101.191,2522.896,2830.924,3509.319,3142.619,3124.284,2867.594,2775.919,2676.91,2493.56,1426.463,1375.125,1320.12,1268.782,1199.109,1114.768,1056.096,832.409,781.071,645.392,359.366,583.053,733.4,1015.759,1338.455,1991.181,3927.357,6523.593,8236.082
Albania,ALB,CO2 emissions (kt),EN.ATM.CO2E.KT,2280.874,2464.224,2082.856,2016.85,2174.531,2552.232,2680.577,3072.946,3245.295,3744.007,4352.729,5643.513,5291.481,4345.395,4594.751,4950.45,5720.52,6494.257,7587.023,5170.47,7341.334,7308.331,7
@jowang0319
jowang0319 / co2_emissions.csv
Created October 4, 2015 21:18
Week 6: Labeled Lines
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 54 columns, instead of 27. in line 2.
countryName,countryCode,indicatorName,indicatorCode,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
Afghanistan,AFG,CO2 emissions (kt),EN.ATM.CO2E.KT,491.378,689.396,707.731,839.743,1008.425,1092.766,1283.45,1224.778,942.419,1672.152,1895.839,1532.806,1639.149,1917.841,2126.86,1987.514,2390.884,2159.863,2240.537,1760.16,1983.847,2101.191,2522.896,2830.924,3509.319,3142.619,3124.284,2867.594,2775.919,2676.91,2493.56,1426.463,1375.125,1320.12,1268.782,1199.109,1114.768,1056.096,832.409,781.071,645.392,359.366,583.053,733.4,1015.759,1338.455,1991.181,3927.357,6523.593,8236.082
Albania,ALB,CO2 emissions (kt),EN.ATM.CO2E.KT,2280.874,2464.224,2082.856,2016.85,2174.531,2552.232,2680.577,3072.946,3245.295,3744.007,4352.729,5643.513,5291.481,4345.395,4594.751,4950.45,5720.52,6494.257,7587.023,5170.47,7341.334,7308.331,7
@jowang0319
jowang0319 / data2.csv
Created October 12, 2015 03:16
week7:Dots on Lines
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 58 columns, instead of 25. in line 3.
country,Region,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015
Aruba,Latin America & Caribbean,106.2062,102.8116,99.417,94.4542,89.4914,84.5286,79.5658,74.603,71.665,68.727,65.789,62.851,59.913,59.0044,58.0958,57.1872,56.2786,55.37,54.9542,54.5384,54.1226,53.7068,53.291,53.0288,52.7666,52.5044,52.2422,51.98,51.41,50.84,50.27,49.7,49.13,48.7648,48.3996,48.0344,47.6692,47.304,46.067,44.83,43.593,42.356,41.119,39.5738,38.0286,36.4834,34.9382,33.393,32.0268,30.6606,29.2944,27.9282,26.562,24.842,23.122,
Andorra,South Asia,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Afghanistan,Sub-Saharan Africa,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,145.321,146.215,147.109,148.003,148.897,149.791,150.8782,151.9654,153.0526,154.1398,15
@jowang0319
jowang0319 / data.csv
Created October 12, 2015 03:18
week7: Transition Plot
Country male female Rate
Afghanistan 62 32 97
Albania 99 99 15
Algeria 94 89 25
Angola 80 66 167
Argentina 99 99 13
Armenia 100 100 16
Azerbaijan 100 100 34
Bahrain 99 98 6
Bangladesh 78 82 41
@jowang0319
jowang0319 / index.html
Created October 15, 2015 15:34
Question about scatter transition
<!DOCTYPE html>
<!-- Modified example from enjalot: http://bl.ocks.org/enjalot/1429426 -->
<html>
<head>
<title>Bar Transition Example</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style type="text/css">
body {
padding: 50px;
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.43381E-05,0.061885819,0.0
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.43381E-05,0.061885819,0.0
@jowang0319
jowang0319 / index.html
Created October 19, 2015 16:06
Scatter Homework
<!DOCTYPE html>
<!-- Modified example from enjalot: http://bl.ocks.org/enjalot/1429426 -->
<html>
<head>
<title>Bar Transition Example</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style type="text/css">
body {
padding: 50px;