Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<! A mod of Michelle Chandra's block: http://bl.ocks.org/michellechandra/0b2ce4923dc9b5809922 -->
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
/* On mouse hover, lighten state color */
path {
stroke: gray;
<!DOCTYPE html>
<! A mod of Michelle Chandra's block: http://bl.ocks.org/michellechandra/0b2ce4923dc9b5809922 -->
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
/* On mouse hover, lighten state color */
path {
stroke: gray;
@luluwuluying
luluwuluying / countries.json
Last active April 4, 2016 20:23
week11 map
{"arcs":[[[7080,7327],[-5,4],[-10,-10],[5,-6]],[[7070,7315],[-16,-12],[-9,5],[-28,-4],[-12,-6],[-1,-5],[-17,-18],[-11,-16],[6,-10],[6,-18],[-2,-15],[3,-8],[-18,-35],[4,-12],[-2,-18],[-7,-5],[-13,0],[-13,4],[3,-16],[6,-6],[-1,-9],[4,-9],[-12,-14],[-8,0],[-6,-18],[2,-7],[-6,-11],[2,-30],[-8,-17],[-6,-1],[-2,8],[-15,4],[-3,-8],[-14,-12],[6,-9],[-11,-7],[-13,6],[-7,-15],[-8,-7],[-3,-19],[2,-9],[-4,-35],[-32,-17],[-16,2],[-11,-11],[-14,6],[-30,-5],[-46,26]],[[6689,6902],[27,56],[1,10],[-4,21],[-24,7],[-1,9],[1,35],[-7,43],[0,9],[7,14],[1,9],[-10,5],[0,31],[11,8],[-5,13],[7,6],[5,26],[-1,11],[4,19]],[[6701,7234],[8,-10],[13,-1],[6,-7],[1,-9],[5,8],[5,-4],[13,13],[0,24],[9,0],[4,6],[20,11],[9,15],[0,16],[5,14],[-1,9],[9,8],[12,0],[4,16],[4,3],[15,-14],[5,2]],[[6847,7334],[14,2],[7,-12],[6,6],[8,-6]],[[6882,7324],[7,-15],[7,10],[15,9],[2,5],[10,-14],[5,7],[-2,13],[4,8],[21,2],[-3,18],[5,4],[12,26],[9,-2],[7,-9],[-1,-21],[6,3],[2,-8],[-3,-14],[-1,-35],[3,-12],[7,-4],[15,19],[9,1],[3,11],[14,14],[13,-2],[-1,-12],[14,8]
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Year,PcarDriverMale,PcarDriverFemale,PcarPassengerMale,PcarPassengeFemale,LTdriverMale,LTdriverFemale,LTpassengerMale,LTpassengerFemale,PedestriansMale,PedestriansFemale,BicyclistsMale,BicyclistsFemale,MotorcyclistsMale,MotorcyclistsFemale,deathsMale,deathsFemale
1975,"15,706","3,642","6,069","5,095",542,4,88,24,"5,196","2,319",820,183,"2,863",243,"32,675","11,844"
1976,"16,013","4,078","6,206","5,330",667,6,102,34,"5,120","2,307",751,163,"2,950",282,"33,038","12,481"
1977,"16,499","4,442","6,242","5,542",760,7,104,44,"5,331","2,400",730,192,"3,676",328,"34,627","13,248"
1978,"17,974","4,782","6,373","5,659",799,15,100,49,"5,494","2,296",714,178,"4,059",389,"36,731","13,591"
1979,"18,273","4,836","6,430","5,388",817,10,140,41,"5,701","2,391",759,173,"4,295",417,"37,588","13,498"
1980,"18,110","4,877","6,439","5,438",709,9,99,49,"5,613","2,454",782,183,"4,524",430,"37,392","13,689"
1981,"17,592","4,910","5,972","5,077",680,10,94,46,"5,459","2,332",748,181,"4,348",389,"35,930","13,161"
1982,"15,129","4,534","5,
@luluwuluying
luluwuluying / index.html
Last active March 28, 2016 03:00
Week 9: JS homework
<!DOCTYPE html>
<!-- Modification of Mike Bostock's code in http://bl.ocks.org/mbostock/1157787 -->
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
margin: 20px;
padding: 20px;
}
@luluwuluying
luluwuluying / index.html
Last active March 21, 2016 21:04
Week9: Stacked Transition
<!DOCTYPE html>
<!-- mod of Mike Bostock's block http://bl.ocks.org/mbostock/3020685 -->
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<style>
body {
font: 12px font-family: 'Montserrat', sans-serif;;
padding: 50px;
}
@luluwuluying
luluwuluying / co2_emissions.csv
Created March 21, 2016 20:31
Week 9: JS homework
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
@luluwuluying
luluwuluying / AlcoholConsumption.csv
Created March 21, 2016 00:00
Week9: Stacked Transition
Country IndiaICATOR SUBJECT MEASURE FREQUENCY Year Amount Flag Codes
Australia ALCOHOL TOT LT_CAP15 A 1995 9.8
Australia ALCOHOL TOT LT_CAP15 A 1996 10
Australia ALCOHOL TOT LT_CAP15 A 1997 10.2
Australia ALCOHOL TOT LT_CAP15 A 1998 10
Australia ALCOHOL TOT LT_CAP15 A 1999 10
Australia ALCOHOL TOT LT_CAP15 A 2000 10.2
Australia ALCOHOL TOT LT_CAP15 A 2001 10
Australia ALCOHOL TOT LT_CAP15 A 2002 10.4
Australia ALCOHOL TOT LT_CAP15 A 2003 10.3
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
@luluwuluying
luluwuluying / Timespent.csv
Created March 12, 2016 18:38
My Update Plot
Activity AvgHourTotal AvgHourMen AvgHourWomen
Personal care activities 9.58 9.32 9.82
Sleeping 8.8 8.69 8.9
Eating and drinking 1.17 1.21 1.14
Household activities 1.77 1.38 2.14
Housework 0.55 0.27 0.82
Food preparation and cleanup 0.59 0.34 0.82
Lawn and garden care 0.19 0.25 0.12
Household management 0.12 0.1 0.13
Purchasing goods and services 0.74 0.6 0.87