Skip to content

Instantly share code, notes, and snippets.

@ptoche
Last active August 29, 2015 14:00
Show Gist options
  • Save ptoche/872a77b5363356ff5399 to your computer and use it in GitHub Desktop.
Save ptoche/872a77b5363356ff5399 to your computer and use it in GitHub Desktop.
Piketty & Saez, Top Incomes in the U.S., 1913-2012
Year Fractile value
1 1913-01-01 Top 0.01% 0.0275501620545077
2 1914-01-01 Top 0.01% 0.0272920847365446
3 1915-01-01 Top 0.01% 0.0436035
4 1916-01-01 Top 0.01% 0.0440493410443468
5 1917-01-01 Top 0.01% 0.0333076913805183
6 1918-01-01 Top 0.01% 0.0244816293043196
7 1919-01-01 Top 0.01% 0.0222020659211262
8 1920-01-01 Top 0.01% 0.0167163862642264
9 1921-01-01 Top 0.01% 0.0168921038823408
10 1922-01-01 Top 0.01% 0.020093203672445
11 1923-01-01 Top 0.01% 0.0175159731843984
12 1924-01-01 Top 0.01% 0.0200871357325958
13 1925-01-01 Top 0.01% 0.0234507839236309
14 1926-01-01 Top 0.01% 0.0253877896987219
15 1927-01-01 Top 0.01% 0.0275813488115311
16 1928-01-01 Top 0.01% 0.0322548835908997
17 1929-01-01 Top 0.01% 0.0300578126085171
18 1930-01-01 Top 0.01% 0.0238875384911164
19 1931-01-01 Top 0.01% 0.0207441333984932
20 1932-01-01 Top 0.01% 0.0192648554937774
21 1933-01-01 Top 0.01% 0.0204461435372473
22 1934-01-01 Top 0.01% 0.0192189398243564
23 1935-01-01 Top 0.01% 0.019463370851066
24 1936-01-01 Top 0.01% 0.0223412597052131
25 1937-01-01 Top 0.01% 0.0201553805780817
26 1938-01-01 Top 0.01% 0.0166646302615225
27 1939-01-01 Top 0.01% 0.0174126029844716
28 1940-01-01 Top 0.01% 0.0177403784590743
29 1941-01-01 Top 0.01% 0.0162904807516231
30 1942-01-01 Top 0.01% 0.0132169909237434
31 1943-01-01 Top 0.01% 0.00972670872564625
32 1944-01-01 Top 0.01% 0.00924091136095122
33 1945-01-01 Top 0.01% 0.00844914173347795
34 1946-01-01 Top 0.01% 0.00916382567070993
35 1947-01-01 Top 0.01% 0.00902894048966817
36 1948-01-01 Top 0.01% 0.00953851185659535
37 1949-01-01 Top 0.01% 0.00954430715222885
38 1950-01-01 Top 0.01% 0.00826903306081205
39 1951-01-01 Top 0.01% 0.00865169333611165
40 1952-01-01 Top 0.01% 0.00745716946133215
41 1953-01-01 Top 0.01% 0.00672644671540106
42 1954-01-01 Top 0.01% 0.0070588248853422
43 1955-01-01 Top 0.01% 0.00720611634804991
44 1956-01-01 Top 0.01% 0.00681153113623968
45 1957-01-01 Top 0.01% 0.00663080522414254
46 1958-01-01 Top 0.01% 0.0064243772482168
47 1959-01-01 Top 0.01% 0.00616176677252553
48 1960-01-01 Top 0.01% 0.00596373218694061
49 1961-01-01 Top 0.01% 0.00587037566337155
50 1962-01-01 Top 0.01% 0.00561620580729985
51 1963-01-01 Top 0.01% 0.0056800334450204
52 1964-01-01 Top 0.01% 0.00531289115556104
53 1965-01-01 Top 0.01% 0.00537866517272559
54 1966-01-01 Top 0.01% 0.00602946668621911
55 1967-01-01 Top 0.01% 0.00596471683217962
56 1968-01-01 Top 0.01% 0.00581572181982537
57 1969-01-01 Top 0.01% 0.00547129567477932
58 1970-01-01 Top 0.01% 0.00525339308758492
59 1971-01-01 Top 0.01% 0.00518046459385404
60 1972-01-01 Top 0.01% 0.00520456001694618
61 1973-01-01 Top 0.01% 0.00495219711242097
62 1974-01-01 Top 0.01% 0.00562964184279479
63 1975-01-01 Top 0.01% 0.00559708516893076
64 1976-01-01 Top 0.01% 0.00561933603434702
65 1977-01-01 Top 0.01% 0.00566205825081495
66 1978-01-01 Top 0.01% 0.00580556645291427
67 1979-01-01 Top 0.01% 0.00615324723662051
68 1980-01-01 Top 0.01% 0.00654814245780515
69 1981-01-01 Top 0.01% 0.00655962290763348
70 1982-01-01 Top 0.01% 0.00774728677729561
71 1983-01-01 Top 0.01% 0.00871490989397619
72 1984-01-01 Top 0.01% 0.00980880714308469
73 1985-01-01 Top 0.01% 0.00970474391162551
74 1986-01-01 Top 0.01% 0.00996948805986818
75 1987-01-01 Top 0.01% 0.013010161292536
76 1988-01-01 Top 0.01% 0.0199031329376248
77 1989-01-01 Top 0.01% 0.01740459054025
78 1990-01-01 Top 0.01% 0.0182567689063148
79 1991-01-01 Top 0.01% 0.0160795011417191
80 1992-01-01 Top 0.01% 0.0201681694243592
81 1993-01-01 Top 0.01% 0.0173759778843185
82 1994-01-01 Top 0.01% 0.0173225057274841
83 1995-01-01 Top 0.01% 0.01815
84 1996-01-01 Top 0.01% 0.01973
85 1997-01-01 Top 0.01% 0.02195
86 1998-01-01 Top 0.01% 0.02406
87 1999-01-01 Top 0.01% 0.02633
88 2000-01-01 Top 0.01% 0.02841
89 2001-01-01 Top 0.01% 0.02402
90 2002-01-01 Top 0.01% 0.02301
91 2003-01-01 Top 0.01% 0.02438
92 2004-01-01 Top 0.01% 0.0287
93 2005-01-01 Top 0.01% 0.03288
94 2006-01-01 Top 0.01% 0.03323
95 2007-01-01 Top 0.01% 0.03529
96 2008-01-01 Top 0.01% 0.03373
97 2009-01-01 Top 0.01% 0.03065
98 2010-01-01 Top 0.01% 0.0331
99 2011-01-01 Top 0.01% 0.03158
100 2012-01-01 Top 0.01% 0.04082
101 1913-01-01 Top 0.1% 0.0861660817145581
102 1914-01-01 Top 0.1% 0.0860334089140613
103 1915-01-01 Top 0.1% 0.0921885
104 1916-01-01 Top 0.1% 0.0986653043001581
105 1917-01-01 Top 0.1% 0.0835788084805983
106 1918-01-01 Top 0.1% 0.0674116426024008
107 1919-01-01 Top 0.1% 0.0645397884830736
108 1920-01-01 Top 0.1% 0.0537143303444607
109 1921-01-01 Top 0.1% 0.0560216500839064
110 1922-01-01 Top 0.1% 0.0616852820539588
111 1923-01-01 Top 0.1% 0.0550386522487682
112 1924-01-01 Top 0.1% 0.0614012849581822
113 1925-01-01 Top 0.1% 0.0675202917964938
114 1926-01-01 Top 0.1% 0.0706817377268681
115 1927-01-01 Top 0.1% 0.074726058910537
116 1928-01-01 Top 0.1% 0.0819166227134544
117 1929-01-01 Top 0.1% 0.0762186084387362
118 1930-01-01 Top 0.1% 0.0640172303242754
119 1931-01-01 Top 0.1% 0.0567514453418838
120 1932-01-01 Top 0.1% 0.0589622449627439
121 1933-01-01 Top 0.1% 0.0605447824968753
122 1934-01-01 Top 0.1% 0.0582368062873078
123 1935-01-01 Top 0.1% 0.0579687185625506
124 1936-01-01 Top 0.1% 0.0668744941647528
125 1937-01-01 Top 0.1% 0.0616118178662899
126 1938-01-01 Top 0.1% 0.0515572030443175
127 1939-01-01 Top 0.1% 0.0545096499254963
128 1940-01-01 Top 0.1% 0.0557319620809119
129 1941-01-01 Top 0.1% 0.0528938922106923
130 1942-01-01 Top 0.1% 0.0447707387279018
131 1943-01-01 Top 0.1% 0.0378326869131054
132 1944-01-01 Top 0.1% 0.0332742289347884
133 1945-01-01 Top 0.1% 0.0331886971735655
134 1946-01-01 Top 0.1% 0.0343211676134227
135 1947-01-01 Top 0.1% 0.0323569654449576
136 1948-01-01 Top 0.1% 0.0343714397955433
137 1949-01-01 Top 0.1% 0.0333675232306147
138 1950-01-01 Top 0.1% 0.0353180142640955
139 1951-01-01 Top 0.1% 0.0311709112515463
140 1952-01-01 Top 0.1% 0.0275591254643569
141 1953-01-01 Top 0.1% 0.0250632130949151
142 1954-01-01 Top 0.1% 0.0256633605623987
143 1955-01-01 Top 0.1% 0.0248710882057968
144 1956-01-01 Top 0.1% 0.0238291532779744
145 1957-01-01 Top 0.1% 0.0235913850257539
146 1958-01-01 Top 0.1% 0.0229273444933397
147 1959-01-01 Top 0.1% 0.0219127192999306
148 1960-01-01 Top 0.1% 0.0209645478266581
149 1961-01-01 Top 0.1% 0.0205339982806908
150 1962-01-01 Top 0.1% 0.0198411735304309
151 1963-01-01 Top 0.1% 0.0196355669917545
152 1964-01-01 Top 0.1% 0.019689860769878
153 1965-01-01 Top 0.1% 0.0203718925192573
154 1966-01-01 Top 0.1% 0.0215417365201153
155 1967-01-01 Top 0.1% 0.0216000228639914
156 1968-01-01 Top 0.1% 0.0214545167445849
157 1969-01-01 Top 0.1% 0.0200115476356685
158 1970-01-01 Top 0.1% 0.0193777285199368
159 1971-01-01 Top 0.1% 0.0191442019220774
160 1972-01-01 Top 0.1% 0.0191561910282546
161 1973-01-01 Top 0.1% 0.0188635078924178
162 1974-01-01 Top 0.1% 0.0210688105615872
163 1975-01-01 Top 0.1% 0.020380327831081
164 1976-01-01 Top 0.1% 0.0201918481652624
165 1977-01-01 Top 0.1% 0.0204161444220485
166 1978-01-01 Top 0.1% 0.0207924630296456
167 1979-01-01 Top 0.1% 0.0215786692680758
168 1980-01-01 Top 0.1% 0.0223113852749561
169 1981-01-01 Top 0.1% 0.0222533972400418
170 1982-01-01 Top 0.1% 0.0245028799175089
171 1983-01-01 Top 0.1% 0.0260851928963775
172 1984-01-01 Top 0.1% 0.0282983151737629
173 1985-01-01 Top 0.1% 0.0291082881898719
174 1986-01-01 Top 0.1% 0.0286755289459759
175 1987-01-01 Top 0.1% 0.0372609421456231
176 1988-01-01 Top 0.1% 0.0521318680192422
177 1989-01-01 Top 0.1% 0.0473955994678809
178 1990-01-01 Top 0.1% 0.0489843733275509
179 1991-01-01 Top 0.1% 0.0435712850755825
180 1992-01-01 Top 0.1% 0.0521386835271032
181 1993-01-01 Top 0.1% 0.0471577998835726
182 1994-01-01 Top 0.1% 0.0470475494181799
183 1995-01-01 Top 0.1% 0.04983
184 1996-01-01 Top 0.1% 0.05325
185 1997-01-01 Top 0.1% 0.05806
186 1998-01-01 Top 0.1% 0.062
187 1999-01-01 Top 0.1% 0.06635
188 2000-01-01 Top 0.1% 0.07127
189 2001-01-01 Top 0.1% 0.06258
190 2002-01-01 Top 0.1% 0.05935
191 2003-01-01 Top 0.1% 0.06109
192 2004-01-01 Top 0.1% 0.06905
193 2005-01-01 Top 0.1% 0.07761
194 2006-01-01 Top 0.1% 0.07918
195 2007-01-01 Top 0.1% 0.08161
196 2008-01-01 Top 0.1% 0.07816
197 2009-01-01 Top 0.1% 0.07039
198 2010-01-01 Top 0.1% 0.07516
199 2011-01-01 Top 0.1% 0.07379
200 2012-01-01 Top 0.1% 0.08821
201 1913-01-01 Top 0.5% 0.147264569314871
202 1914-01-01 Top 0.5% 0.150802622430197
203 1915-01-01 Top 0.5% 0.1457755
204 1916-01-01 Top 0.5% 0.156036449461324
205 1917-01-01 Top 0.5% 0.142341917768497
206 1918-01-01 Top 0.5% 0.123854950735275
207 1919-01-01 Top 0.5% 0.122339651877482
208 1920-01-01 Top 0.5% 0.109532629518181
209 1921-01-01 Top 0.5% 0.115988330223682
210 1922-01-01 Top 0.5% 0.123762254901969
211 1923-01-01 Top 0.5% 0.113231413689003
212 1924-01-01 Top 0.5% 0.124163921511566
213 1925-01-01 Top 0.5% 0.134134914418351
214 1926-01-01 Top 0.5% 0.13747729345105
215 1927-01-01 Top 0.5% 0.143330284572369
216 1928-01-01 Top 0.5% 0.151749131176866
217 1929-01-01 Top 0.5% 0.142131252267332
218 1930-01-01 Top 0.5% 0.124172567715379
219 1931-01-01 Top 0.5% 0.113237713377459
220 1932-01-01 Top 0.5% 0.11548961982268
221 1933-01-01 Top 0.5% 0.117786833886698
222 1934-01-01 Top 0.5% 0.117959911037941
223 1935-01-01 Top 0.5% 0.116705265313908
224 1936-01-01 Top 0.5% 0.133691316878629
225 1937-01-01 Top 0.5% 0.124151890813592
226 1938-01-01 Top 0.5% 0.108163667232096
227 1939-01-01 Top 0.5% 0.11365322329434
228 1940-01-01 Top 0.5% 0.116613041454895
229 1941-01-01 Top 0.5% 0.111483723273858
230 1942-01-01 Top 0.5% 0.0959502037642814
231 1943-01-01 Top 0.5% 0.0842886193268158
232 1944-01-01 Top 0.5% 0.0760361850901455
233 1945-01-01 Top 0.5% 0.0786882864707424
234 1946-01-01 Top 0.5% 0.0828074932816505
235 1947-01-01 Top 0.5% 0.0770749873171226
236 1948-01-01 Top 0.5% 0.0802604863914972
237 1949-01-01 Top 0.5% 0.0777002197042304
238 1950-01-01 Top 0.5% 0.081353358178591
239 1951-01-01 Top 0.5% 0.0741071904314674
240 1952-01-01 Top 0.5% 0.0680780526462594
241 1953-01-01 Top 0.5% 0.0626294666649047
242 1954-01-01 Top 0.5% 0.0646923519078612
243 1955-01-01 Top 0.5% 0.0628496725657504
244 1956-01-01 Top 0.5% 0.0614399631336149
245 1957-01-01 Top 0.5% 0.0607994903215372
246 1958-01-01 Top 0.5% 0.0594226869980016
247 1959-01-01 Top 0.5% 0.0590034552278012
248 1960-01-01 Top 0.5% 0.0552097935041721
249 1961-01-01 Top 0.5% 0.0540931680164614
250 1962-01-01 Top 0.5% 0.0539915752416503
251 1963-01-01 Top 0.5% 0.0532969439130433
252 1964-01-01 Top 0.5% 0.0533322004580295
253 1965-01-01 Top 0.5% 0.0542190996116702
254 1966-01-01 Top 0.5% 0.0558546116988554
255 1967-01-01 Top 0.5% 0.0562930106572269
256 1968-01-01 Top 0.5% 0.0557852719798327
257 1969-01-01 Top 0.5% 0.0530356875286012
258 1970-01-01 Top 0.5% 0.0515607409280703
259 1971-01-01 Top 0.5% 0.0512297219891361
260 1972-01-01 Top 0.5% 0.050989755129187
261 1973-01-01 Top 0.5% 0.0507052392763528
262 1974-01-01 Top 0.5% 0.0540914043110931
263 1975-01-01 Top 0.5% 0.0530845068864423
264 1976-01-01 Top 0.5% 0.0523076239134774
265 1977-01-01 Top 0.5% 0.0525166485107628
266 1978-01-01 Top 0.5% 0.0530209499770136
267 1979-01-01 Top 0.5% 0.0538494671173106
268 1980-01-01 Top 0.5% 0.0550617878224376
269 1981-01-01 Top 0.5% 0.0542302868008697
270 1982-01-01 Top 0.5% 0.0573196895084318
271 1983-01-01 Top 0.5% 0.0593650532940477
272 1984-01-01 Top 0.5% 0.0621666989790069
273 1985-01-01 Top 0.5% 0.0639495753870692
274 1986-01-01 Top 0.5% 0.0638008688015592
275 1987-01-01 Top 0.5% 0.0776223312438589
276 1988-01-01 Top 0.5% 0.0996243372477935
277 1989-01-01 Top 0.5% 0.0937189131073039
278 1990-01-01 Top 0.5% 0.0971365566960301
279 1991-01-01 Top 0.5% 0.0890089638681778
280 1992-01-01 Top 0.5% 0.101117833333071
281 1993-01-01 Top 0.5% 0.0945196903173243
282 1994-01-01 Top 0.5% 0.0944807331516836
283 1995-01-01 Top 0.5% 0.09988
284 1996-01-01 Top 0.5% 0.10486
285 1997-01-01 Top 0.5% 0.11122
286 1998-01-01 Top 0.5% 0.1161
287 1999-01-01 Top 0.5% 0.12156
288 2000-01-01 Top 0.5% 0.12783
289 2001-01-01 Top 0.5% 0.11708
290 2002-01-01 Top 0.5% 0.11262
291 2003-01-01 Top 0.5% 0.11466
292 2004-01-01 Top 0.5% 0.12509
293 2005-01-01 Top 0.5% 0.13722
294 2006-01-01 Top 0.5% 0.14034
295 2007-01-01 Top 0.5% 0.14315
296 2008-01-01 Top 0.5% 0.13864
297 2009-01-01 Top 0.5% 0.12711
298 2010-01-01 Top 0.5% 0.13397
299 2011-01-01 Top 0.5% 0.13367
300 2012-01-01 Top 0.5% 0.1516
301 1913-01-01 Top 1% 0.179600418618677
302 1914-01-01 Top 1% 0.181579410592163
303 1915-01-01 Top 1% 0.17577725
304 1916-01-01 Top 1% 0.185730667754062
305 1917-01-01 Top 1% 0.175994874581952
306 1918-01-01 Top 1% 0.158832204355484
307 1919-01-01 Top 1% 0.158674148545227
308 1920-01-01 Top 1% 0.144590420554394
309 1921-01-01 Top 1% 0.154729299864716
310 1922-01-01 Top 1% 0.162923194904341
311 1923-01-01 Top 1% 0.149910046820313
312 1924-01-01 Top 1% 0.163159068690895
313 1925-01-01 Top 1% 0.176028065888758
314 1926-01-01 Top 1% 0.180114970143105
315 1927-01-01 Top 1% 0.186788857502351
316 1928-01-01 Top 1% 0.195987179625089
317 1929-01-01 Top 1% 0.184179042853159
318 1930-01-01 Top 1% 0.164228184164495
319 1931-01-01 Top 1% 0.152705940442233
320 1932-01-01 Top 1% 0.154784676318871
321 1933-01-01 Top 1% 0.15770913177787
322 1934-01-01 Top 1% 0.158681850764176
323 1935-01-01 Top 1% 0.156283119904622
324 1936-01-01 Top 1% 0.176373421759018
325 1937-01-01 Top 1% 0.164504342867913
326 1938-01-01 Top 1% 0.147293830254249
327 1939-01-01 Top 1% 0.15393035953166
328 1940-01-01 Top 1% 0.157339880746339
329 1941-01-01 Top 1% 0.150079783779967
330 1942-01-01 Top 1% 0.129054410636388
331 1943-01-01 Top 1% 0.114846537213808
332 1944-01-01 Top 1% 0.105386700002579
333 1945-01-01 Top 1% 0.110711939488099
334 1946-01-01 Top 1% 0.117624257705476
335 1947-01-01 Top 1% 0.109538359238743
336 1948-01-01 Top 1% 0.112698724741439
337 1949-01-01 Top 1% 0.10946064706588
338 1950-01-01 Top 1% 0.11360065498283
339 1951-01-01 Top 1% 0.10518335555719
340 1952-01-01 Top 1% 0.0975832021655474
341 1953-01-01 Top 1% 0.0908108977021864
342 1954-01-01 Top 1% 0.093904559145803
343 1955-01-01 Top 1% 0.0918052826757127
344 1956-01-01 Top 1% 0.0908697575765872
345 1957-01-01 Top 1% 0.0898188515660215
346 1958-01-01 Top 1% 0.0883357350019559
347 1959-01-01 Top 1% 0.0874785207852669
348 1960-01-01 Top 1% 0.0835659009213576
349 1961-01-01 Top 1% 0.0833760053839099
350 1962-01-01 Top 1% 0.0827367556707456
351 1963-01-01 Top 1% 0.0816393665761361
352 1964-01-01 Top 1% 0.0802075104626677
353 1965-01-01 Top 1% 0.0806506469440149
354 1966-01-01 Top 1% 0.0836818430072932
355 1967-01-01 Top 1% 0.0842533195266657
356 1968-01-01 Top 1% 0.0835194148590666
357 1969-01-01 Top 1% 0.0801742202142303
358 1970-01-01 Top 1% 0.0780384588644263
359 1971-01-01 Top 1% 0.0778608166609168
360 1972-01-01 Top 1% 0.0775412687985188
361 1973-01-01 Top 1% 0.0774199616755395
362 1974-01-01 Top 1% 0.0812361891708578
363 1975-01-01 Top 1% 0.0800588015016157
364 1976-01-01 Top 1% 0.0788919619878135
365 1977-01-01 Top 1% 0.0789922635740608
366 1978-01-01 Top 1% 0.0795260898664963
367 1979-01-01 Top 1% 0.0803240980373329
368 1980-01-01 Top 1% 0.0817671462536805
369 1981-01-01 Top 1% 0.0802607554692798
370 1982-01-01 Top 1% 0.0838993807169599
371 1983-01-01 Top 1% 0.0859290264894751
372 1984-01-01 Top 1% 0.088863707222621
373 1985-01-01 Top 1% 0.090945605795137
374 1986-01-01 Top 1% 0.091292990690664
375 1987-01-01 Top 1% 0.107462606333059
376 1988-01-01 Top 1% 0.131654807954394
377 1989-01-01 Top 1% 0.126114944786894
378 1990-01-01 Top 1% 0.129816472524931
379 1991-01-01 Top 1% 0.121673794483765
380 1992-01-01 Top 1% 0.1347974486147
381 1993-01-01 Top 1% 0.128212599201789
382 1994-01-01 Top 1% 0.128521198534133
383 1995-01-01 Top 1% 0.13528
384 1996-01-01 Top 1% 0.14107
385 1997-01-01 Top 1% 0.14771
386 1998-01-01 Top 1% 0.15294
387 1999-01-01 Top 1% 0.15873
388 2000-01-01 Top 1% 0.16494
389 2001-01-01 Top 1% 0.15371
390 2002-01-01 Top 1% 0.14989
391 2003-01-01 Top 1% 0.15214
392 2004-01-01 Top 1% 0.16337
393 2005-01-01 Top 1% 0.17681
394 2006-01-01 Top 1% 0.18059
395 2007-01-01 Top 1% 0.18327
396 2008-01-01 Top 1% 0.17892
397 2009-01-01 Top 1% 0.16679
398 2010-01-01 Top 1% 0.17451
399 2011-01-01 Top 1% 0.17467
400 2012-01-01 Top 1% 0.19337
401 1917-01-01 Top 5% 0.303345483573205
402 1918-01-01 Top 5% 0.292979482993876
403 1919-01-01 Top 5% 0.29307649555521
404 1920-01-01 Top 5% 0.274694503319667
405 1921-01-01 Top 5% 0.30457060858318
406 1922-01-01 Top 5% 0.310527850746989
407 1923-01-01 Top 5% 0.289486580563953
408 1924-01-01 Top 5% 0.309278771313489
409 1925-01-01 Top 5% 0.324655056493413
410 1926-01-01 Top 5% 0.327523532474833
411 1927-01-01 Top 5% 0.334316491815881
412 1928-01-01 Top 5% 0.3477142212976
413 1929-01-01 Top 5% 0.330483674827158
414 1930-01-01 Top 5% 0.311806842377483
415 1931-01-01 Top 5% 0.310122221839071
416 1932-01-01 Top 5% 0.3259080516095
417 1933-01-01 Top 5% 0.324864162701919
418 1934-01-01 Top 5% 0.329946429507902
419 1935-01-01 Top 5% 0.309901858662781
420 1936-01-01 Top 5% 0.326547726941797
421 1937-01-01 Top 5% 0.313792744893922
422 1938-01-01 Top 5% 0.301821920253925
423 1939-01-01 Top 5% 0.312866097058345
424 1940-01-01 Top 5% 0.312881497010535
425 1941-01-01 Top 5% 0.290172061188534
426 1942-01-01 Top 5% 0.251073982256624
427 1943-01-01 Top 5% 0.230207622634159
428 1944-01-01 Top 5% 0.217582838830582
429 1945-01-01 Top 5% 0.229034316444154
430 1946-01-01 Top 5% 0.246577402201265
431 1947-01-01 Top 5% 0.232994626478441
432 1948-01-01 Top 5% 0.236959792265937
433 1949-01-01 Top 5% 0.23461915111456
434 1950-01-01 Top 5% 0.238712895925856
435 1951-01-01 Top 5% 0.226701643151228
436 1952-01-01 Top 5% 0.218468903278189
437 1953-01-01 Top 5% 0.210073424892119
438 1954-01-01 Top 5% 0.215606826820627
439 1955-01-01 Top 5% 0.213778360969247
440 1956-01-01 Top 5% 0.213475493842216
441 1957-01-01 Top 5% 0.211674998094338
442 1958-01-01 Top 5% 0.212600179164721
443 1959-01-01 Top 5% 0.21024822758489
444 1960-01-01 Top 5% 0.205115316973401
445 1961-01-01 Top 5% 0.209068617516802
446 1962-01-01 Top 5% 0.209428122172829
447 1963-01-01 Top 5% 0.20895061215332
448 1964-01-01 Top 5% 0.20623064231697
449 1965-01-01 Top 5% 0.20699893083727
450 1966-01-01 Top 5% 0.209920587974096
451 1967-01-01 Top 5% 0.210729673795533
452 1968-01-01 Top 5% 0.209763121916299
453 1969-01-01 Top 5% 0.20680012828563
454 1970-01-01 Top 5% 0.203876974644434
455 1971-01-01 Top 5% 0.204960205678548
456 1972-01-01 Top 5% 0.20369344887545
457 1973-01-01 Top 5% 0.205706697384858
458 1974-01-01 Top 5% 0.210365420623162
459 1975-01-01 Top 5% 0.210252214435334
460 1976-01-01 Top 5% 0.208458667141275
461 1977-01-01 Top 5% 0.208333105222937
462 1978-01-01 Top 5% 0.208620768734632
463 1979-01-01 Top 5% 0.208299644089757
464 1980-01-01 Top 5% 0.211694877032183
465 1981-01-01 Top 5% 0.209690365634466
466 1982-01-01 Top 5% 0.21395668558262
467 1983-01-01 Top 5% 0.21786377166359
468 1984-01-01 Top 5% 0.220967873055661
469 1985-01-01 Top 5% 0.223771947905831
470 1986-01-01 Top 5% 0.225885294274976
471 1987-01-01 Top 5% 0.244892917278909
472 1988-01-01 Top 5% 0.269485445272657
473 1989-01-01 Top 5% 0.266634495825125
474 1990-01-01 Top 5% 0.270539690665309
475 1991-01-01 Top 5% 0.264297153905971
476 1992-01-01 Top 5% 0.278805317063871
477 1993-01-01 Top 5% 0.274117001328987
478 1994-01-01 Top 5% 0.275029648623805
479 1995-01-01 Top 5% 0.28461
480 1996-01-01 Top 5% 0.2916
481 1997-01-01 Top 5% 0.29852
482 1998-01-01 Top 5% 0.30358
483 1999-01-01 Top 5% 0.30968
484 2000-01-01 Top 5% 0.31511
485 2001-01-01 Top 5% 0.30399
486 2002-01-01 Top 5% 0.30362
487 2003-01-01 Top 5% 0.30655
488 2004-01-01 Top 5% 0.31708
489 2005-01-01 Top 5% 0.33123
490 2006-01-01 Top 5% 0.33589
491 2007-01-01 Top 5% 0.33844
492 2008-01-01 Top 5% 0.33777
493 2009-01-01 Top 5% 0.32808
494 2010-01-01 Top 5% 0.33732
495 2011-01-01 Top 5% 0.33977
496 2012-01-01 Top 5% 0.3576
497 1917-01-01 Top 10% 0.402870418752226
498 1918-01-01 Top 10% 0.399037275120226
499 1919-01-01 Top 10% 0.394813240153393
500 1920-01-01 Top 10% 0.381003874377692
501 1921-01-01 Top 10% 0.428597266399737
502 1922-01-01 Top 10% 0.429485534276513
503 1923-01-01 Top 10% 0.40589552069786
504 1924-01-01 Top 10% 0.432639146553968
505 1925-01-01 Top 10% 0.44166809347302
506 1926-01-01 Top 10% 0.440689852798539
507 1927-01-01 Top 10% 0.446657333195794
508 1928-01-01 Top 10% 0.460931821506666
509 1929-01-01 Top 10% 0.437584036034691
510 1930-01-01 Top 10% 0.430734745533906
511 1931-01-01 Top 10% 0.444049938396853
512 1932-01-01 Top 10% 0.463005258710505
513 1933-01-01 Top 10% 0.450264295057035
514 1934-01-01 Top 10% 0.451550766438589
515 1935-01-01 Top 10% 0.433929872727685
516 1936-01-01 Top 10% 0.44772366982564
517 1937-01-01 Top 10% 0.433478798533453
518 1938-01-01 Top 10% 0.430008904925141
519 1939-01-01 Top 10% 0.445688981729636
520 1940-01-01 Top 10% 0.444266375047431
521 1941-01-01 Top 10% 0.410193145763531
522 1942-01-01 Top 10% 0.354941831193665
523 1943-01-01 Top 10% 0.326699231988766
524 1944-01-01 Top 10% 0.315488699492282
525 1945-01-01 Top 10% 0.326445887062075
526 1946-01-01 Top 10% 0.346163940689304
527 1947-01-01 Top 10% 0.330171775934356
528 1948-01-01 Top 10% 0.337206376452028
529 1949-01-01 Top 10% 0.337630980951954
530 1950-01-01 Top 10% 0.338711006103991
531 1951-01-01 Top 10% 0.328199651016794
532 1952-01-01 Top 10% 0.320739620975755
533 1953-01-01 Top 10% 0.313804318683562
534 1954-01-01 Top 10% 0.321193107315453
535 1955-01-01 Top 10% 0.317720745774613
536 1956-01-01 Top 10% 0.318060239901845
537 1957-01-01 Top 10% 0.316873093765545
538 1958-01-01 Top 10% 0.321122690969275
539 1959-01-01 Top 10% 0.320332879480249
540 1960-01-01 Top 10% 0.31657437586134
541 1961-01-01 Top 10% 0.318962114739526
542 1962-01-01 Top 10% 0.32043825702061
543 1963-01-01 Top 10% 0.320096223220015
544 1964-01-01 Top 10% 0.316393178872088
545 1965-01-01 Top 10% 0.315181882926993
546 1966-01-01 Top 10% 0.319815451807518
547 1967-01-01 Top 10% 0.320458369736482
548 1968-01-01 Top 10% 0.31982618841599
549 1969-01-01 Top 10% 0.318208757051207
550 1970-01-01 Top 10% 0.315136599453495
551 1971-01-01 Top 10% 0.317538845866267
552 1972-01-01 Top 10% 0.316233669720754
553 1973-01-01 Top 10% 0.318536120048038
554 1974-01-01 Top 10% 0.323595875272461
555 1975-01-01 Top 10% 0.326211032406567
556 1976-01-01 Top 10% 0.324176637803734
557 1977-01-01 Top 10% 0.324347852351418
558 1978-01-01 Top 10% 0.324403455693034
559 1979-01-01 Top 10% 0.323456078961482
560 1980-01-01 Top 10% 0.328655054251636
561 1981-01-01 Top 10% 0.327173317129092
562 1982-01-01 Top 10% 0.332180189438648
563 1983-01-01 Top 10% 0.336913881394333
564 1984-01-01 Top 10% 0.339471766681248
565 1985-01-01 Top 10% 0.34251769473311
566 1986-01-01 Top 10% 0.345685788332791
567 1987-01-01 Top 10% 0.364828824110286
568 1988-01-01 Top 10% 0.386266739312407
569 1989-01-01 Top 10% 0.384707296898585
570 1990-01-01 Top 10% 0.388368455898338
571 1991-01-01 Top 10% 0.383809812518281
572 1992-01-01 Top 10% 0.398179005377358
573 1993-01-01 Top 10% 0.394816898550762
574 1994-01-01 Top 10% 0.395968519785061
575 1995-01-01 Top 10% 0.40542
576 1996-01-01 Top 10% 0.41155
577 1997-01-01 Top 10% 0.41725
578 1998-01-01 Top 10% 0.42124
579 1999-01-01 Top 10% 0.42668
580 2000-01-01 Top 10% 0.43108
581 2001-01-01 Top 10% 0.42229
582 2002-01-01 Top 10% 0.42364
583 2003-01-01 Top 10% 0.42762
584 2004-01-01 Top 10% 0.43643
585 2005-01-01 Top 10% 0.44939
586 2006-01-01 Top 10% 0.45498
587 2007-01-01 Top 10% 0.45666
588 2008-01-01 Top 10% 0.45963
589 2009-01-01 Top 10% 0.45468
590 2010-01-01 Top 10% 0.46352
591 2011-01-01 Top 10% 0.4663
592 2012-01-01 Top 10% 0.48155
# 3 May 2014, Patrick Toche
# Very minor edits: experiment with other styles, use of ggplot() instead of qplot().
# First version: François Briatte
# http://f.briatte.org/teaching/ida/093_practice.html
# Data from Thomas Piketty & Emmanuel Saez
# http://elsa.berkeley.edu/users/saez/TabFig2012prel.xls
# Set directory:
if(.Platform$OS.type == "windows"){
setwd("c:/R/capital21c")
} else {
setwd("~/R/capital21c")
}
# Plot Aesthetics
# http://jkunst.com/blog/post/ggplot-highcharts-taste/
# Set Colors:
colors_hc <- c("#7CB5EC", "#313131", "#F7A35C",
"#90EE7E", "#7798BF", "#AAEEEE",
"#FF0066", "#EEAAEE", "#55BF3B",
"#DF5353", "#7798BF", "#AAEEEE")
# Load theme font:
library("extrafont")
# font_import(open-sans)
loadfonts()
# Define theme:
theme_hc <- function(){
theme(
text = element_text(family = "Open Sans", size = 12), # raised size
title = element_text(hjust = 0),
axis.title.x = element_text(hjust = .5),
axis.title.y = element_text(hjust = .5),
panel.grid.major.y = element_line(color = 'gray', size = .3),
panel.grid.minor.y = element_blank(),
panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
legend.position = "bottom",
legend.title = element_blank()
)
}
# Data on Income Shares:
# Table A1: income share of the top 1% income earners (excluding capital gains)
library("xlsx")
data <- "TabFig2012prel.xls"
df <- read.xlsx(data, sheetName = "Table A1", startRow = 4, endRow = 105, colIndex = 1:7)
df <- df[-1, ] # Remove empty row
# Fix Dates:
colnames(df)[1] <- "Year"
df[,1] <- as.Date(paste0(df$Year, "-01-01"), format = "%Y-%m-%d")
# Reorder Variables:
names(df) <- c("Year", c(10, 5, 1, 0.5, 0.1, 0.01))
# order(names(df[,-1]), decreasing = FALSE) # not the desired order
## [1] 6 5 4 3 1 2
# order(as.numeric(names(df[,-1])), decreasing = FALSE) # the desired order
## [1] 6 5 4 3 2 1
names(df[,c(1,1+order(as.numeric(names(df[,-1])), decreasing = FALSE))])
## [1] "Year" "0.01" "0.1" "0.5" "1" "5" "10"
df <- df[,c(1,1+order(as.numeric(names(df[,-1])), decreasing = FALSE))]
# Rename Variables:
names(df) <- c("Year", paste0("Top ", c(0.01, 0.1, 0.5, 1, 5, 10), "%"))
View(df)
# Reshape to long format, dropping NA values:
library("reshape")
df <- melt(df, id = "Year", variable_name = "Fractile", na.rm = TRUE)
# convert value to numeric
df$value <- as.numeric(as.character(df$value))/100
View(df)
str(df)
## 'data.frame': 592 obs. of 3 variables:
## $ Year : Date, format: "1913-01-01" ...
## $ Fractile: Factor w/ 6 levels "Top 0.01%","Top 0.1%",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ value : num 0.0276 0.0273 0.0436 0.044 0.0333 ...
# Save Data
# save(df, file = "ps-income-shares.rda")
load("ps-income-shares.rda") # local copy
# write.csv(df, file = "ps-income-shares.csv")
# Figure 1
# Plot all top fractile income shares, colored by income fractile.
# This plot shows some of the same data as Figure 1 in the original Piketty-Saez paper
# It reveals a U-shaped trend, starting with a general contraction of the income share of
# top income earners at the end of World War II, and followed by an expansion in recent decades.
library("ggplot2")
library("scales")
p <- ggplot(data = df, aes(x = Year, y = value, color = Fractile))
p <- p + geom_line()
p <- p + theme_hc()
p <- p + scale_x_date(limits = as.Date(c("1911-01-01", "2023-01-01")), labels = date_format("%Y"))
p <- p + scale_y_continuous(labels = percent)
p <- p + theme(legend.position = "none")
p <- p + geom_text(data = subset(df, Year == "2012-01-01"), aes(x = Year, label = Fractile, hjust = -0.2), size = 4)
p <- p + xlab("")
p <- p + ylab("")
p <- p + ggtitle("U.S. top income shares (%)")
p
ggsave(p, file = "ps-us-top-income-shares.pdf", width = 10, height = 6)
# Data on Income Levels:
# Table_Incomegrowth: real income levels (including capital gains) for the lowest 90%, top 10% and top 1% income fractiles.
library("xlsx")
data <- "TabFig2012prel.xls"
df <- read.xlsx(data, sheetName = "Table_Incomegrowth", startRow = 1, endRow = 104, colIndex = c(10, 5, 3))
df <- df[-1, ] # Remove empty row
# Fix Dates:
df <- cbind("Year" = as.Date(paste0(1913:2012, "-01-01"), format = "%Y-%m-%d"), df)
# Reorder Variables:
names(df) <- c("Year", c(10, 1, 90))
names(df[,c(1,1+order(as.numeric(names(df[,-1])), decreasing = FALSE))])
## [1] "Year" "1" "10" "90"
df <- df[,c(1,1+order(as.numeric(names(df[,-1])), decreasing = FALSE))]
# Rename Variables:
names(df) <- c("Year", "Top 1%", "Top 10%", "Bottom 90%")
View(df)
# Reshape to long format:
library("reshape")
df <- melt(df, id = "Year", variable_name = "Fractile", na.rm = TRUE)
# convert value to numeric
df$value <- as.numeric(as.character(df$value))
View(df)
str(df)
## 'data.frame': 292 obs. of 3 variables:
## $ Year : Date, format: "1917-01-01" ...
## $ Fractile: Factor w/ 3 levels "Top 1%","Top 10%",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ value : num 279656 276230 269987 327844 304496 ...
# Save Data
# save(df, file = "ps-income-levels.rda")
load("ps-income-levels.rda") # local copy
# Figure 2
# The plots for real income growth in the United States show a sharp difference for top earners versus the rest of the population
# The difference in income growth is much more pronounced for those higher on the income scale.
library("ggplot2")
library("scales")
p <- ggplot(data = df, aes(x = Year, y = value, color = Fractile))
p <- p + geom_line()
p <- p + theme_hc()
p <- p + scale_x_date(limits = as.Date(c("1911-01-01", "2027-01-01")), labels = date_format("%Y"))
p <- p + scale_y_continuous(labels = dollar)
p <- p + theme(legend.position = "none")
p <- p + geom_text(data = subset(df, Year == "2012-01-01"), aes(x = Year, label = Fractile, hjust = -0.2), size = 4)
p <- p + xlab("")
p <- p + ylab("")
p <- p + ggtitle("Real incomes in the United States($)")
p
# Figure 3
ggsave(p, file = "ps-us-real-income.pdf", width = 10, height = 6)
# The dollar scale makes it difficult to see changes in the bottom quantiles.
# The bottom 90% income earners seem to enjoy no income growth over the entire time period.
# Using a logarithmic scale of base 10 for real income corrects for that issue.
# Change y-units to log10 dollar:
p <- p + scale_y_log10(labels = dollar)
p
ggsave(p, file = "ps-us-real-incomes-log.pdf", width = 10, height = 6)
# Income inequality is clearly apparent and growing over the recent period.
# Income levels in income fractiles that do not rely on capital gains have stagnated.
# Plot of the growth rate for each series.
# Add lagged series to data frame:
df <- ddply(df, .(Fractile), transform, lagged = c(NA, value[-length(value)]))
# Compute growth rate:
df$Growth <- with(df, (value / lagged) - 1)
# Figure 4
# Plot real income growth rates:
p <- ggplot(data = df, aes(x = Year, y = Growth,
color = ifelse(Growth > 0, "positive", "negative")))
p <- p + geom_linerange(aes(ymin = 0, ymax = Growth))
#p <- p + scale_colour_manual("", values = c("positive" = "blue", "negative" = "red"))
p <- p + geom_hline(y = 0, color = "gray")
p <- p + theme_hc()
p <- p + facet_grid(Fractile ~ .)
p <- p + scale_x_date(limits = as.Date(c("1911-01-01", "2023-01-01")), labels = date_format("%Y"))
p <- p + scale_y_continuous(labels = percent)
p <- p + theme(legend.position = "none")
p <- p + xlab("")
p <- p + ylab("")
p <- p + ggtitle("Real income growth rates (%)")
p
ggsave(p, file = "ps-us-real-income-growth.pdf", width = 10, height = 10)
# Plot the actual dollar values.
# Add differenced series:
df <- ddply(df, .(Fractile), transform, Difference = c(NA, diff(value)))
# Figure 5
# Plot real income changes:
p <- ggplot(data = df, aes(x = Year, y = Difference,
color = ifelse(Growth > 0, "positive", "negative")))
p <- p + geom_linerange(aes(ymin = 0, ymax = Difference))
p <- p + geom_hline(y = 0, color = "gray")
p <- p + theme_hc()
p <- p + facet_grid(Fractile ~ ., scale = "free_y")
p <- p + scale_x_date(limits = as.Date(c("1911-01-01", "2023-01-01")), labels = date_format("%Y"))
p <- p + scale_y_continuous(labels = dollar)
p <- p + theme(legend.position = "none")
p <- p + xlab("")
p <- p + ylab("")
p <- p + ggtitle("Changes in real income ($)")
p
ggsave(p, file = "ps-us-real-income-changes.pdf", width = 10, height = 6)
# Focus on Top 1%
# Subset the top 1% of incomes:
top1 <- subset(df, Fractile == "Top 1%")
# Create a time series 'zoo' object:
library("zoo")
top1 <- with(top1, zoo(value, Year))
str(top1)
## ‘zoo’ series from 1913-01-01 to 2012-01-01
## Data: num [1:100] 279656 276230 269987 327844 304496 ...
## Index: Date[1:100], format: "1913-01-01" "1914-01-01" "1915-01-01" ...
# Detrend the series:
dz <- lm(coredata(top1) ~ index(top1))
## Call:
## lm(formula = coredata(top1) ~ index(top1))
##
## Coefficients:
## (Intercept) index(top1)
## 586431.79 25.75
# Plot the residuals:
p <- ggplot(data = dz, aes(x = index(top1),
color = ifelse(resid(dz) > 0, "positive", "negative")))
p <- p + geom_linerange(aes(ymin = 0, ymax = resid(dz)))
p <- p + theme_hc()
p <- p + scale_x_date(limits = as.Date(c("1911-01-01", "2023-01-01")), labels = date_format("%Y"))
p <- p + scale_y_continuous(labels = dollar)
p <- p + theme(legend.position = "none")
p <- p + xlab("")
p <- p + ylab("")
p <- p + ggtitle("Detrended series of top 1% income growth")
p
ggsave(p, file = "ps-us-real-income-top-1-percent-detrended.pdf", width = 10, height = 6)
# The series is not stationary,
# insofar as its past values fail to predict large amounts of its present values.
# The last fifteen years are particularly remarkable in that respect:
# while some of the rise in income inequality has been absorbed by the model,
# the most recent years are robust to detrending.
@briatte
Copy link

briatte commented May 4, 2014

Glad you liked it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment