Skip to content

Instantly share code, notes, and snippets.

View yan2014's full-sized avatar

Joan yan2014

View GitHub Profile
@yan2014
yan2014 / 44394_1.csv
Last active January 22, 2016 20:03
Directional Force layout
source target value
step 1.1 step 2.1 1
step 2.1 step 2.2 1
step 2.2 step 2.2 1
step 2.2 step 3.1 1
step 3.1 step 2.2 1
step 2.2 step 3.1 1
step 3.1 step 4.1 1
step 4.1 step 4.2 1
step 4.2 step 4.2 1
@yan2014
yan2014 / energy.json
Last active November 17, 2015 19:21
Week12: 3 Charts
[{"Country":"Qatar","1971":7764.897774,"1972":7810.388335,"1973":10080.65526,"1974":8014.623062,"1975":12419.76961,"1976":8794.778975,"1977":9517.705763,"1978":8445.614474,"1979":13722.34998,"1980":14803.57598,"1981":16715.66157,"1982":17348.32745,"1983":16058.38798,"1984":16483.00546,"1985":15217.74809,"1986":15058.70568,"1987":14613.48083,"1988":14529.96049,"1989":14313.37272,"1990":13697.33755,"1991":14886.8802,"1992":15421.47945,"1993":15921.85443,"1994":15882.7212,"1995":16264.77639,"1996":16892.72932,"1997":19262.16886,"1998":19478.01749,"1999":19833.55268,"2000":18401.30221,"2001":20191.22075,"2002":21517.77934,"2003":21150.57359,"2004":22762.08038,"2005":19911.94063,"2006":19819.72446,"2007":18764.49144,"2008":16375.83174,"2009":15230.3672,"2010":15882.36677,"2011":16793.11832,"2012":18813.45132,"sum":654868.7752},
{"Country":"Bahrain","1971":6380.357596,"1972":5960.211335,"1973":8483.540399,"1974":9000.916161,"1975":7996.355264,"1976":9581.250903,"1977":8187.114986,"1978":7843.399452,"1979":8813.
@yan2014
yan2014 / NeonatalRate.csv
Last active November 17, 2015 19:17
Week12: Scrollytelling
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 28 columns, instead of 18. in line 7.
ISO,Country,Y1990,Y1991,Y1992,Y1993,Y1994,Y1995,Y1996,Y1997,Y1998,Y1999,Y2000,Y2001,Y2002,Y2003,Y2004,Y2005,Y2006,Y2007,Y2008,Y2009,Y2010,Y2011,Y2012,Y2013,Y2014,Y2015
AFG,Afghanistan,52.8,51.9,50.9,49.9,49.1,48.2,47.5,47,46.1,45.6,45.2,44.5,43.9,43.2,42.5,41.7,41,40.4,39.8,39.1,38.7,38.1,37.4,36.8,36.1,35.5
ALB,Albania,13.4,13.2,13,12.9,12.9,12.7,12.5,12.3,11.9,11.7,11.3,11,10.7,10.3,9.8,9.4,8.9,8.5,8.2,7.9,7.5,7.2,7,6.8,6.5,6.2
DZA,Algeria,22.4,22.1,22,21.8,21.7,21.5,21.3,21.1,21,21,21,20.9,20.7,20.4,20,19.5,18.8,18.2,17.5,17,16.5,16.2,15.9,15.7,15.6,15.5
AND,Andorra,4.3,4,3.7,3.4,3.2,3,2.8,2.6,2.4,2.3,2.2,2.1,2.1,2,2,1.9,1.9,1.8,1.8,1.7,1.7,1.6,1.6,1.5,1.5,1.4
AGO,Angola,59.1,59.2,59.4,59.4,59.3,59.4,59.5,59.4,58.9,58.7,58.4,58.2,57.5,57.2,56.7,56.1,55.5,55,54.1,53.4,52.6,51.9,51.1,50.4,49.6,48.7
ATG,Antigua & Barbuda,14.7,14.1,13.5,12.9,12.3,11.7,11.2,10.7,10.3,9.9,9.4,9,8.6,8.2,7.9,7.5,7.2,6.9,6.6,6.3,6,5.8,5.5,5.3,5.1,4.9
ARG,Argentina,15.4,15,14.7,14.4,14,13.3,12.6,12,11.5,11.3,11.3,11.1,10.6,10,9.5,9.
@yan2014
yan2014 / NeonatalRate.csv
Last active November 11, 2015 00:37
Week 11: Choropleth Map
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 29 columns, instead of 14. in line 7.
ISO,Country,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,sum
AFG,Afghanistan,52.8,51.9,50.9,49.9,49.1,48.2,47.5,47,46.1,45.6,45.2,44.5,43.9,43.2,42.5,41.7,41,40.4,39.8,39.1,38.7,38.1,37.4,36.8,36.1,35.5,1132.9
ALB,Albania,13.4,13.2,13,12.9,12.9,12.7,12.5,12.3,11.9,11.7,11.3,11,10.7,10.3,9.8,9.4,8.9,8.5,8.2,7.9,7.5,7.2,7,6.8,6.5,6.2,263.7
DZA,Algeria,22.4,22.1,22,21.8,21.7,21.5,21.3,21.1,21,21,21,20.9,20.7,20.4,20,19.5,18.8,18.2,17.5,17,16.5,16.2,15.9,15.7,15.6,15.5,505.3
AND,Andorra,4.3,4,3.7,3.4,3.2,3,2.8,2.6,2.4,2.3,2.2,2.1,2.1,2,2,1.9,1.9,1.8,1.8,1.7,1.7,1.6,1.6,1.5,1.5,1.4,60.5
AGO,Angola,59.1,59.2,59.4,59.4,59.3,59.4,59.5,59.4,58.9,58.7,58.4,58.2,57.5,57.2,56.7,56.1,55.5,55,54.1,53.4,52.6,51.9,51.1,50.4,49.6,48.7,1458.7
ATG,Antigua & Barbuda,14.7,14.1,13.5,12.9,12.3,11.7,11.2,10.7,10.3,9.9,9.4,9,8.6,8.2,7.9,7.5,7.2,6.9,6.6,6.3,6,5.8,5.5,5.3,5.1,4.9,231.5
ARG,Argentina,15.4,15,14.7,14.4,14,13.3,12.6,12,11.5,11.3,11.3,11.1
Code ISO3 LongName IncomeGroup Region ShortName
AFG AFG Islamic State of Afghanistan Low income South Asia Afghanistan
ALB ALB Republic of Albania Upper middle income Europe & Central Asia Albania
DZA DZA People's Democratic Republic of Algeria Upper middle income Middle East & North Africa Algeria
ASM ASM American Samoa Upper middle income East Asia & Pacific American Samoa
ADO AND Principality of Andorra High income: nonOECD Europe & Central Asia Andorra
AGO AGO People's Republic of Angola Upper middle income Sub-Saharan Africa Angola
ATG ATG Antigua and Barbuda High income: nonOECD Latin America & Caribbean Antigua and Barbuda
ARG ARG Argentine Republic High income: nonOECD Latin America & Caribbean Argentina
ARM ARM Republic of Armenia Lower middle income Europe & Central Asia Armenia
@yan2014
yan2014 / flare.json
Last active November 3, 2015 18:02
Group discussion: Sunburst partition
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "Paaa11", "size": 11.45},
@yan2014
yan2014 / NeonatalRate.csv
Last active November 3, 2015 17:48
Week 10: Small Multiples
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 27 columns, instead of 4. in line 8.
Country,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
Afghanistan,52.8,51.9,50.9,49.9,49.1,48.2,47.5,47,46.1,45.6,45.2,44.5,43.9,43.2,42.5,41.7,41,40.4,39.8,39.1,38.7,38.1,37.4,36.8,36.1,35.5
Albania,13.4,13.2,13,12.9,12.9,12.7,12.5,12.3,11.9,11.7,11.3,11,10.7,10.3,9.8,9.4,8.9,8.5,8.2,7.9,7.5,7.2,7,6.8,6.5,6.2
Algeria,22.4,22.1,22,21.8,21.7,21.5,21.3,21.1,21,21,21,20.9,20.7,20.4,20,19.5,18.8,18.2,17.5,17,16.5,16.2,15.9,15.7,15.6,15.5
Andorra,4.3,4,3.7,3.4,3.2,3,2.8,2.6,2.4,2.3,2.2,2.1,2.1,2,2,1.9,1.9,1.8,1.8,1.7,1.7,1.6,1.6,1.5,1.5,1.4
Angola,59.1,59.2,59.4,59.4,59.3,59.4,59.5,59.4,58.9,58.7,58.4,58.2,57.5,57.2,56.7,56.1,55.5,55,54.1,53.4,52.6,51.9,51.1,50.4,49.6,48.7
Antigua & Barbuda,14.7,14.1,13.5,12.9,12.3,11.7,11.2,10.7,10.3,9.9,9.4,9,8.6,8.2,7.9,7.5,7.2,6.9,6.6,6.3,6,5.8,5.5,5.3,5.1,4.9
Argentina,15.4,15,14.7,14.4,14,13.3,12.6,12,11.5,11.3,11.3,11.1,10.6,10,9.5,9.2,8.8,8.5,8.1,7.8,7.5,7.2,7,6.8,6.5,6.3
Armenia,23,22.5,21
@yan2014
yan2014 / early.csv
Last active November 3, 2015 17:45
Week 10: tooltips
Country Attendance Adult Father Children ChildrenLeft Playthings total
Belarus 88 96 68 92 4 79 423
Democratic People's Republic of Korea 98 91 75 79 17 47 390
Trinidad and Tobago 75 98 63 81 1 65 382
Ukraine 52 98 71 91 7 52 364
Saint Lucia 85 93 50 68 5 59 355
Serbia 44 95 78 76 1 63 356
Argentina 63 84 57 61 8 61 326
Thailand 84 93 35 43 5 71 326
Montenegro 29 97 79 77 6 39 321
@yan2014
yan2014 / early.csv
Last active October 29, 2015 14:25
Week 9: Grouped Bars
Country Attendance Adult Father Children ChildrenLeft Playthings total
Belarus 88 96 68 92 4 79 427
Democratic People's Republic of Korea 98 91 75 79 17 47 407
Trinidad and Tobago 75 98 63 81 1 65 383
Ukraine 52 98 71 91 7 52 370
Saint Lucia 85 93 50 68 5 59 359
Serbia 44 95 78 76 1 63 357
Argentina 63 84 57 61 8 61 334
Thailand 84 93 35 43 5 71 331
Montenegro 29 97 79 77 6 39 327
@yan2014
yan2014 / early.csv
Last active October 29, 2015 14:28
Week 9: Stacked Bars Transition
Belarus 88 96 68 92 4 79 427
Democratic People's Republic of Korea 98 91 75 79 17 47 407
Trinidad and Tobago 75 98 63 81 1 65 383
Ukraine 52 98 71 91 7 52 370
Saint Lucia 85 93 50 68 5 59 359
Serbia 44 95 78 76 1 63 357
Argentina 63 84 57 61 8 61 334
Thailand 84 93 35 43 5 71 331
Montenegro 29 97 79 77 6 39 327