Skip to content

Instantly share code, notes, and snippets.

View amerval's full-sized avatar

Antoine amerval

  • Xero
  • Wellington, New Zealand
View GitHub Profile
@amerval
amerval / ShareOfIncome_top1percent
Last active August 29, 2015 14:17
Top 1% share of income in selected countries
Year,France,US,UK,Japan,Denmark,Canada,Australia,Holland,Sweden,Germany,India ,South Africa
1910,0.205,0.1777,0.218980335,0.1888,0.19985,,,,0.1957,0.1724,,
1915,0.1831,0.1758,0.215447699,0.196,0.2352,,,0.2358,0.2354,0.1953,,0.2195
1920,0.1795,0.1483,0.185525523,0.1709,0.1532,0.144,,0.2059,,0.1947,,0.2031
1925,0.1816,0.2024,0.193825105,0.1832,0.1254,0.1318,0.1167,0.1775,,0.113,0.1238,0.2061
1930,0.1531,0.1722,0.183123013,0.1678,0.1328,0.161,0.1067,0.1715,,0.111,0.1453,0.2053
1935,0.154,0.1668,0.173840586,0.1874,0.142,0.1699,0.1036,0.14,,0.12,0.1733,0.1887
1940,0.1335,0.1648,0.153656051,0.1645,0.1382,0.1471,0.1073,,0.1029,,0.1615,0.1602
1945,0.0754,0.1252,0.128387261,0.0643,0.1137,0.1012,0.0903,,0.1007,,0.1141,0.2044
1950,0.0898,0.1282,0.1118,0.0769,0.0944,0.1088,0.1126,0.1205,0.0733,0.116,0.1342,
@amerval
amerval / incDistr.csv
Created March 25, 2015 03:57
Income Distribution in New Zealand
tier gender ethnicity agetier value tierPos tierh
No Income male European 15-19 11793.04419 0 2000
No Income male European 20-29 4164.702396 0 2000
No Income male European 30-39 4252.62072 0 2000
No Income male European 40-49 3122.813174 0 2000
No Income male European 50-59 2400.626947 0 2000
No Income male European 60-69 1333.618204 0 2000
No Income male European 70-79 316.8485031 0 2000
No Income male European 80+ 218.654012 0 2000
No Income male Maori 15-19 3072.440845 0 2000
@amerval
amerval / index.html
Last active August 29, 2015 14:17
Assignment module 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Exercise Module 2</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
font-family: Lucida sans;
background-color: #EEEEEE;
@amerval
amerval / econ data.csv
Created March 25, 2015 22:41
Economic indicators for a set of countries (France, Canada, Japan, Denmark, US) including unemployment rate, GDP, GDP growth, GDP per capita and growth, index of labour cost (base 100=2010), share of income owned by top 1% - Years 1980 to 2010; Note that value of Labour cost index for Denmark are for years 1980 to 1989 (entered as -1))
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 33 columns, instead of 23 in line 3.
Country,Measure,Y1980,Y1981,Y1982,Y1983,Y1984,Y1985,Y1986,Y1987,Y1988,Y1989,Y1990,Y1991,Y1992,Y1993,Y1994,Y1995,Y1996,Y1997,Y1998,Y1999,Y2000,Y2001,Y2002,Y2003,Y2004,Y2005,Y2006,Y2007,Y2008,Y2009,Y2010
France,Unemployment,5.325,6.3,6.85,7.15,8.35,8.85,8.95,9.075,8.775,8.2,7.925,8.125,9.05,10.05,10.625,10.025,10.55,10.7,10.275,9.975,8.525,7.75,7.9,8.5,8.875,8.9,8.85,8,7.4,9.15,9.35
France,GDP,533181.1794,589240.3797,641494.7962,675202.0212,709816.8115,744420.8265,777294.3775,817671.3719,886360.4388,960908.3585,1025488.221,1070634.628,1112556.409,1132048.033,1183255.303,1233121.019,1273326.557,1333441.02,1404310.166,1467027.853,1582453.302,1682479.585,1761669.819,1748498.982,1820697.367,1919108.792,2054147.856,2178973.926,2262255.622,2252361.767,2332312.046
France,GDP growth,10.75034224,10.51409961,8.868098369,5.254481439,5.126582743,4.875062754,4.415990234,5.194556344,8.400571337,8.410564871,6.720709829,4.402430528,3.915601133,1.751967248,4.52341846,4.214282081,3.26046979,4.721056265,5.314756665,4.466085073,7.
Country Unemployment GDP GDPgrowth GDPcapita GDPcapgrowth Labourcost top1
France 9.35 2332312.046 3.549619807 35896.0822 3.041226592 99.999825 8.81
Canada 8.0583 1362089.961 4.636871195 40055.2562 3.477726848 100 12.3
Denmark 4.3 231931.6078 5.976660353 41812.08 5.518134905 100 6.41
Japan 5.05 4321149.324 5.930253976 33747.642 5.922808145 100 9.51
United States 9.6167 14964380 3.784241896 48307.0993 2.93460595 99.9998 19.77
@amerval
amerval / econdata2010.csv
Created April 7, 2015 09:45
Assignment module 4
Country Unemployment GDP GDPgrowth GDPcapita GDPcapgrowth Labourcost top1
France 9.35 2332312.046 3.549619807 35896.0822 3.041226592 99.999825 8.81
Canada 8.0583 1362089.961 4.636871195 40055.2562 3.477726848 100 12.3
Denmark 4.3 231931.6078 5.976660353 41812.08 5.518134905 100 6.41
Japan 5.05 4321149.324 5.930253976 33747.642 5.922808145 100 9.51
United States 9.6167 14964380 3.784241896 48307.0993 2.93460595 99.9998 19.77
Year Bog Greg M Suri B Trish Greg T Chris D Paul B Mark S Martin H Martin B Lloyd M John S Peter O Tom D
2000 4 13 2 9 5 8 13 7 13 13 13 13 10 12
2001 1 13 3 4 5 8 9 10 13 13 2 13 11 7
2002 6 13 9 8 5 11 7 1 10 13 12 13 3 3
2003 13 12 11 4 2 6 10 3 1 13 7 13 4 8
2004 3 13 11 7 8 2 10 1 6 13 9 13 5 4
2005 11 10 2 1 9 6 8 3 13 13 13 13 4 7
2006 12 1 5 4 11 8 3 9 5 13 2 13 13 10
2008 1 2 5 4 10 9 3 7 8 6 13 13 13 12
2009 5 10 1 11 13 2 9 4 13 8 7 13 13 6
Country Year Measure Value
France 1980 Unemployment 5.325
France 1981 Unemployment 6.3
France 1982 Unemployment 6.85
France 1983 Unemployment 7.15
France 1984 Unemployment 8.35
France 1985 Unemployment 8.85
France 1986 Unemployment 8.95
France 1987 Unemployment 9.075
France 1988 Unemployment 8.775
Country Year Measure Value
France 1980 Unemployment 5.325
France 1981 Unemployment 6.3
France 1982 Unemployment 6.85
France 1983 Unemployment 7.15
France 1984 Unemployment 8.35
France 1985 Unemployment 8.85
France 1986 Unemployment 8.95
France 1987 Unemployment 9.075
France 1988 Unemployment 8.775
Date Day Tmax Tmin SunHr Radiation Rain Tmaxmean Tminmean SunHrmean Radmean SunProp
1/01/2014 1 21.6 14.5 4.5 17.03 0 23.03 14.54 6.06 21.5 0.298013245
2/01/2014 2 23.1 14.5 3.6 18.4 0.4 23.06 14.39 6.74 22.27 0.238410596
3/01/2014 3 21 16.6 4.1 12.84 0 22.91 13.8 5.69 20.03 0.271523179
4/01/2014 4 21.2 14.6 4.5 18.65 9.6 22.6 14.29 5.27 19.44 0.298013245
5/01/2014 5 21.3 16.2 9.7 27.49 1.6 22.19 13.94 5.51 19.8 0.642384106
6/01/2014 6 24.2 13.8 13.7 34.46 0.8 21.8 13.13 6.13 21.36 0.907284768
7/01/2014 7 23.8 9 0.6 10.48 0 21.73 12.53 7.22 23.11 0.039735099
8/01/2014 8 21 15.4 6.3 23.04 0 22.21 12.33 7.91 25.14 0.417218543
9/01/2014 9 22.5 10.9 2.6 15.85 3.6 22.23 12.43 8.14 26.14 0.17218543