Skip to content

Commit 8f1677c

Browse files
authored
Add chapter 5 of Rethinking 2 (#73)
* Add data file * Add chapter 5 draft * Add additional updates * Add additional code * Add extra sections * Add extra to Chapter 2 * Add additional chapter 5 * Add more chapter 5 * Update Chapter 5 * Recover cells lost in force push * Update notebook * Update notebook based on comments * Add additional comments * Add black * Add updates to Chapter 5 * Update per comments * Fix nomkl * Add cell output surpression * Update chapter 5
1 parent 78d9176 commit 8f1677c

File tree

3 files changed

+3319
-0
lines changed

3 files changed

+3319
-0
lines changed

Rethinking_2/Chp_05.ipynb

Lines changed: 3238 additions & 0 deletions
Large diffs are not rendered by default.

Rethinking_2/Data/WaffleDivorce.csv

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Location;Loc;Population;MedianAgeMarriage;Marriage;Marriage SE;Divorce;Divorce SE;WaffleHouses;South;Slaves1860;Population1860;PropSlaves1860
2+
Alabama;AL;4.78;25.3;20.2;1.27;12.7;0.79;128;1;435080;964201;0.45
3+
Alaska;AK;0.71;25.2;26.0;2.93;12.5;2.05;0;0;0;0;0
4+
Arizona;AZ;6.33;25.8;20.3;0.98;10.8;0.74;18;0;0;0;0
5+
Arkansas;AR;2.92;24.3;26.4;1.70;13.5;1.22;41;1;111115;435450;0.26
6+
California;CA;37.25;26.8;19.1;0.39;8.0;0.24;0;0;0;379994;0
7+
Colorado;CO;5.03;25.7;23.5;1.24;11.6;0.94;11;0;0;34277;0
8+
Connecticut;CT;3.57;27.6;17.1;1.06;6.7;0.77;0;0;0;460147;0
9+
Delaware;DE;0.90;26.6;23.1;2.89;8.9;1.39;3;0;1798;112216;0.016
10+
District of Columbia;DC;0.60;29.7;17.7;2.53;6.3;1.89;0;0;0;75080;0
11+
Florida;FL;18.80;26.4;17.0;0.58;8.5;0.32;133;1;61745;140424;0.44
12+
Georgia;GA;9.69;25.9;22.1;0.81;11.5;0.58;381;1;462198;1057286;0.44
13+
Hawaii;HI;1.36;26.9;24.9;2.54;8.3;1.27;0;0;0;0;0
14+
Idaho;ID;1.57;23.2;25.8;1.84;7.7;1.05;0;0;0;0;0
15+
Illinois;IL;12.83;27.0;17.9;0.58;8.0;0.45;2;0;0;1711951;0
16+
Indiana;IN;6.48;25.7;19.8;0.81;11.0;0.63;17;0;0;1350428;0
17+
Iowa;IA;3.05;25.4;21.5;1.46;10.2;0.91;0;0;0;674913;0
18+
Kansas;KS;2.85;25.0;22.1;1.48;10.6;1.09;6;0;2;107206;0.000019
19+
Kentucky;KY;4.34;24.8;22.2;1.11;12.6;0.75;64;1;225483;1155684;0
20+
Louisiana;LA;4.53;25.9;20.6;1.19;11.0;0.89;66;1;331726;708002;0.47
21+
Maine;ME;1.33;26.4;13.5;1.40;13.0;1.48;0;0;0;628279;0
22+
Maryland;MD;5.77;27.3;18.3;1.02;8.8;0.69;11;0;87189;687049;0.13
23+
Massachusetts;MA;6.55;28.5;15.8;0.70;7.8;0.52;0;0;0;1231066;0
24+
Michigan;MI;9.88;26.4;16.5;0.69;9.2;0.53;0;0;0;749113;0
25+
Minnesota;MN;5.30;26.3;15.3;0.77;7.4;0.60;0;0;0;172023;0
26+
Mississippi;MS;2.97;25.8;19.3;1.54;11.1;1.01;72;1;436631;791305;0.55
27+
Missouri;MO;5.99;25.6;18.6;0.81;9.5;0.67;39;1;114931;1182012;0.097
28+
Montana;MT;0.99;25.7;18.5;2.31;9.1;1.71;0;0;0;0;0
29+
Nebraska;NE;1.83;25.4;19.6;1.44;8.8;0.94;0;0;15;28841;0.00052
30+
New Hampshire;NH;1.32;26.8;16.7;1.76;10.1;1.61;0;0;0;326073;0
31+
New Jersey;NJ;8.79;27.7;14.8;0.59;6.1;0.46;0;0;18;672035;0.000027
32+
New Mexico;NM;2.06;25.8;20.4;1.90;10.2;1.11;2;0;0;93516;0
33+
New York;NY;19.38;28.4;16.8;0.47;6.6;0.31;0;0;0;3880735;0
34+
North Carolina;NC;9.54;25.7;20.4;0.98;9.9;0.48;142;1;331059;992622;0.33
35+
North Dakota;ND;0.67;25.3;26.7;2.93;8.0;1.44;0;0;0;0;0
36+
Ohio;OH;11.54;26.3;16.9;0.61;9.5;0.45;64;0;0;2339511;0
37+
Oklahoma;OK;3.75;24.4;23.8;1.29;12.8;1.01;16;0;0;0;0
38+
Oregon;OR;3.83;26.0;18.9;1.10;10.4;0.80;0;0;0;52465;0
39+
Pennsylvania;PA;12.70;27.1;15.5;0.48;7.7;0.43;11;0;0;2906215;0
40+
Rhode Island;RI;1.05;28.2;15.0;2.11;9.4;1.79;0;0;0;174620;0
41+
South Carolina;SC;4.63;26.4;18.1;1.18;8.1;0.70;144;1;402406;703708;0.57
42+
South Dakota;SD;0.81;25.6;20.1;2.64;10.9;2.50;0;0;0;4837;0
43+
Tennessee;TN;6.35;25.2;19.4;0.85;11.4;0.75;103;1;275719;1109801;0.2
44+
Texas;TX;25.15;25.2;21.5;0.61;10.0;0.35;99;1;182566;604215;0.30
45+
Utah;UT;2.76;23.3;29.6;1.77;10.2;0.93;0;0;0;40273;0
46+
Vermont;VT;0.63;26.9;16.4;2.40;9.6;1.87;0;0;0;315098;0
47+
Virginia;VA;8.00;26.4;20.5;0.83;8.9;0.52;40;1;490865;1219630;0.40
48+
Washington;WA;6.72;25.9;21.4;1.00;10.0;0.65;0;0;0;11594;0
49+
West Virginia;WV;1.85;25.0;22.2;1.69;10.9;1.34;4;1;18371;376688;0.049
50+
Wisconsin;WI;5.69;26.3;17.2;0.79;8.3;0.57;0;0;0;775881;0
51+
Wyoming;WY;0.56;24.2;30.7;3.92;10.3;1.9;0;0;0;0;0

Rethinking_2/Data/milk.csv

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"clade";"species";"kcal.per.g";"perc.fat";"perc.protein";"perc.lactose";"mass";"neocortex.perc"
2+
"Strepsirrhine";"Eulemur fulvus";0.49;16.6;15.42;67.98;1.95;55.16
3+
"Strepsirrhine";"E macaco";0.51;19.27;16.91;63.82;2.09;NA
4+
"Strepsirrhine";"E mongoz";0.46;14.11;16.85;69.04;2.51;NA
5+
"Strepsirrhine";"E rubriventer";0.48;14.91;13.18;71.91;1.62;NA
6+
"Strepsirrhine";"Lemur catta";0.6;27.28;19.5;53.22;2.19;NA
7+
"New World Monkey";"Alouatta seniculus";0.47;21.22;23.58;55.2;5.25;64.54
8+
"New World Monkey";"A palliata";0.56;29.66;23.46;46.88;5.37;64.54
9+
"New World Monkey";"Cebus apella";0.89;53.41;15.8;30.79;2.51;67.64
10+
"New World Monkey";"Saimiri boliviensis";0.91;46.08;23.34;30.58;0.71;NA
11+
"New World Monkey";"S sciureus";0.92;50.58;22.33;27.09;0.68;68.85
12+
"New World Monkey";"Cebuella pygmaea";0.8;41.35;20.85;37.8;0.12;58.85
13+
"New World Monkey";"Callimico goeldii";0.46;3.93;25.3;70.77;0.47;61.69
14+
"New World Monkey";"Callithrix jacchus";0.71;38.38;20.09;41.53;0.32;60.32
15+
"New World Monkey";"Leontopithecus rosalia";0.71;36.9;21.27;41.83;0.6;NA
16+
"Old World Monkey";"Chlorocebus pygerythrus";0.73;39.17;14.65;46.18;3.47;NA
17+
"Old World Monkey";"Miopithecus talpoin";0.68;40.15;18.08;41.77;1.55;69.97
18+
"Old World Monkey";"M fuscata";0.72;53.05;13;33.95;7.08;NA
19+
"Old World Monkey";"M mulatta";0.97;55.51;13.17;31.32;3.24;70.41
20+
"Old World Monkey";"M sinica";0.79;48.9;13.91;37.19;7.94;NA
21+
"Old World Monkey";"Papio spp";0.84;54.31;10.97;34.72;12.3;73.4
22+
"Ape";"Nomascus concolor";0.48;15.96;12.52;71.52;7.59;NA
23+
"Ape";"Hylobates lar";0.62;34.51;12.57;52.92;5.37;67.53
24+
"Ape";"Symphalangus syndactylus";0.51;26.42;13.46;60.12;10.72;NA
25+
"Ape";"Pongo pygmaeus";0.54;37.78;7.37;54.85;35.48;71.26
26+
"Ape";"Gorilla gorilla gorilla";0.49;27.18;16.29;56.53;79.43;72.6
27+
"Ape";"G gorilla beringei";0.53;30.59;20.77;48.64;97.72;NA
28+
"Ape";"Pan paniscus";0.48;21.18;11.68;67.14;40.74;70.24
29+
"Ape";"P troglodytes";0.55;36.84;9.54;53.62;33.11;76.3
30+
"Ape";"Homo sapiens";0.71;50.49;9.84;39.67;54.95;75.49

0 commit comments

Comments
 (0)