Skip to content

Instantly share code, notes, and snippets.

View jowang0319's full-sized avatar

Zhizhou Wang jowang0319

View GitHub Profile
@jowang0319
jowang0319 / data2.csv
Created November 2, 2015 16:08
Week 10: tooltips
Causes 0-27 days 1-59 months 5-14 years 15-29 years 30-49 years 50-59 years 60-69 years 70+ years
HIV/AIDS 446 44911 43579 108754 313285 43264 13563 4391
Diarrhoealdiseases 4085 147953 45706 22471 23188 10032 14348 29802
Parasiticandvectordiseases 3 228985 25280 14979 14638 6294 5890 10246
Malaria 0 227114 14597 10483 9700 3565 3552 7474
Respiratoryinfections 28787 183134 34728 27111 26234 20657 36572 121805
Lowerrespiratoryinfections 28748 182660 34563 27033 26158 20598 36490 121568
Neonatalconditions 356160 37225 0 0 0 0 0 0
Pretermbirthcomplications 143914 22427 0 0 0 0 0 0
Birthasphyxiaandbirthtrauma 128327 11613 0 0 0 0 0 0
country year value
Aruba 1961 102.8116
Aruba 1962 99.417
Aruba 1963 94.4542
Aruba 1964 89.4914
Aruba 1965 84.5286
Aruba 1966 79.5658
Aruba 1967 74.603
Aruba 1968 71.665
Aruba 1969 68.727
Causes 0-27 days 1-59 months 5-14 years 15-29 years 30-49 years 50-59 years 60-69 years 70+ years
HIV/AIDS 446 44911 43579 108754 313285 43264 13563 4391
Diarrhoeal diseases 4085 147953 45706 22471 23188 10032 14348 29802
Parasitic and vector diseases 3 228985 25280 14979 14638 6294 5890 10246
Malaria 0 227114 14597 10483 9700 3565 3552 7474
Respiratory infections 28787 183134 34728 27111 26234 20657 36572 121805
Lower respiratory infections 28748 182660 34563 27033 26158 20598 36490 121568
Neonatal conditions 356160 37225 0 0 0 0 0 0
Preterm birth complications 143914 22427 0 0 0 0 0 0
Birth asphyxia and birth trauma 128327 11613 0 0 0 0 0 0
HIV/AIDS 446 44911 43579 108754 313285 43264 13563 4391
Diarrhoealdiseases 4085 147953 45706 22471 23188 10032 14348 29802
Parasiticandvectordiseases 3 228985 25280 14979 14638 6294 5890 10246
Malaria 0 227114 14597 10483 9700 3565 3552 7474
Respiratoryinfections 28787 183134 34728 27111 26234 20657 36572 121805
Lowerrespiratoryinfections 28748 182660 34563 27033 26158 20598 36490 121568
Neonatalconditions 356160 37225 0 0 0 0 0 0
Pretermbirthcomplications 143914 22427 0 0 0 0 0 0
Birthasphyxiaandbirthtrauma 128327 11613 0 0 0 0 0 0
Country Year Meningitis_encephalitis Respiratory_infections Sepsis Pertussis Malaria Measles HIV_Aids Diarrhoeal_diseases Asphyxia_trauma
Angola Year 2013 5461 26392 7199 897 19405 627 1778 22465 14245
Angola Year 2012 5747 26910 7149 893 19692 1278 1769 23655 14150
Angola Year 2000 9282 25989 4172 931 21138 1103 1179 27209 9800
Angola Year 2001 9452 26463 4784 918 21232 3889 1276 27064 9715
Angola Year 2011 6107 27282 7044 911 21331 573 1704 24567 13909
Angola Year 2002 9628 27141 5269 931 21793 5054 1373 26969 10068
Angola Year 2006 10465 30754 6064 1047 22022 602 1590 27001 12620
Angola Year 2003 9840 28190 5219 964 22530 1786 1466 27015 11186
Angola Year 2005 10242 29865 5742 1014 23066 297 1601 26962 12292
@jowang0319
jowang0319 / data2.csv
Created October 22, 2015 16:32
question _w9
HIV/AIDS 446 44911 43579 108754 313285 43264 13563 4391
Diarrhoeal diseases 4085 147953 45706 22471 23188 10032 14348 29802
Parasitic and vector diseases 3 228985 25280 14979 14638 6294 5890 10246
Malaria 0 227114 14597 10483 9700 3565 3552 7474
Respiratory infections 28787 183134 34728 27111 26234 20657 36572 121805
Lower respiratory infections 28748 182660 34563 27033 26158 20598 36490 121568
Neonatal conditions 356160 37225 0 0 0 0 0 0
Preterm birth complications 143914 22427 0 0 0 0 0 0
Birth asphyxia and birth trauma 128327 11613 0 0 0 0 0 0
@jowang0319
jowang0319 / data.csv
Created October 19, 2015 16:08
new 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 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;
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