Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aeturrell committed Sep 7, 2023
1 parent 7fbafe0 commit 200a0bd
Show file tree
Hide file tree
Showing 79 changed files with 3,933 additions and 37,747 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,226 changes: 2,226 additions & 0 deletions _images/f6bc8e0ed01b4b5b0f146a2902cda922035d1cf889c4fc797e59abe728c39e89.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
141 changes: 13 additions & 128 deletions _sources/auto-research-outputs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "9022538b",
"id": "11227fbd",
"metadata": {},
"source": [
"(auto-research-outputs)=\n",
Expand Down Expand Up @@ -76,67 +76,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6b079742",
"execution_count": null,
"id": "856cd7bd",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>time</th>\n",
" <th>Lunch</th>\n",
" <th>Dinner</th>\n",
" </tr>\n",
" <tr>\n",
" <th>smoker</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Yes</th>\n",
" <td>2.83</td>\n",
" <td>3.07</td>\n",
" </tr>\n",
" <tr>\n",
" <th>No</th>\n",
" <td>2.67</td>\n",
" <td>3.13</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"time Lunch Dinner\n",
"smoker \n",
"Yes 2.83 3.07\n",
"No 2.67 3.13"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import seaborn as sns\n",
"import pandas as pd\n",
Expand All @@ -149,82 +92,36 @@
},
{
"cell_type": "markdown",
"id": "cf830321",
"id": "b8cc8990",
"metadata": {},
"source": [
"This can be turned into a $\\LaTeX$ table using the following command"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "b9c3396a",
"execution_count": null,
"id": "8718d39e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'\\\\begin{table}\\n\\\\caption{A Table}\\n\\\\label{tab:descriptive}\\n\\\\begin{tabular}{lrr}\\n\\\\toprule\\ntime & Lunch & Dinner \\\\\\\\\\nsmoker & & \\\\\\\\\\n\\\\midrule\\nYes & 2.830000 & 3.070000 \\\\\\\\\\nNo & 2.670000 & 3.130000 \\\\\\\\\\n\\\\bottomrule\\n\\\\end{tabular}\\n\\\\end{table}\\n'"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"table.to_latex(caption='A Table', label='tab:descriptive')"
]
},
{
"cell_type": "markdown",
"id": "6146ca9c",
"id": "622f507b",
"metadata": {},
"source": [
"Or perhaps you have a regression table, for example"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "33307ba5",
"execution_count": null,
"id": "b110daf0",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table style=\"text-align:center\"><tr><td colspan=\"3\" style=\"border-bottom: 1px solid black\"></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td colspan=\"2\"><em>Dependent variable: target</em></td></tr><tr><td style=\"text-align:left\"></td><tr><td style=\"text-align:left\"></td><td>(1)</td><td>(2)</td></tr>\n",
"<tr><td colspan=\"3\" style=\"border-bottom: 1px solid black\"></td></tr>\n",
"\n",
"<tr><td style=\"text-align:left\">ABP</td><td>416.673<sup>***</sup></td><td>397.581<sup>***</sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td>(69.495)</td><td>(70.870)</td></tr>\n",
"<tr><td style=\"text-align:left\">Age</td><td>37.241<sup></sup></td><td>24.703<sup></sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td>(64.117)</td><td>(65.411)</td></tr>\n",
"<tr><td style=\"text-align:left\">BMI</td><td>787.182<sup>***</sup></td><td>789.744<sup>***</sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td>(65.424)</td><td>(66.887)</td></tr>\n",
"<tr><td style=\"text-align:left\">Intercept</td><td>152.133<sup>***</sup></td><td>152.133<sup>***</sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td>(2.853)</td><td>(2.853)</td></tr>\n",
"<tr><td style=\"text-align:left\">S1</td><td></td><td>197.848<sup></sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td></td><td>(143.812)</td></tr>\n",
"<tr><td style=\"text-align:left\">S2</td><td></td><td>-169.243<sup></sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td></td><td>(142.744)</td></tr>\n",
"<tr><td style=\"text-align:left\">Sex</td><td>-106.576<sup>*</sup></td><td>-82.862<sup></sup></td></tr>\n",
"<tr><td style=\"text-align:left\"></td><td>(62.125)</td><td>(64.851)</td></tr>\n",
"\n",
"<td colspan=\"3\" style=\"border-bottom: 1px solid black\"></td></tr>\n",
"<tr><td style=\"text-align: left\">Observations</td><td>442</td><td>442</td></tr><tr><td style=\"text-align: left\">R<sup>2</sup></td><td>0.400</td><td>0.403</td></tr><tr><td style=\"text-align: left\">Adjusted R<sup>2</sup></td><td>0.395</td><td>0.395</td></tr><tr><td style=\"text-align: left\">Residual Std. Error</td><td>59.976 (df=437)</td><td>59.982 (df=435)</td></tr><tr><td style=\"text-align: left\">F Statistic</td><td>72.913<sup>***</sup> (df=4; 437)</td><td>48.915<sup>***</sup> (df=6; 435)</td></tr>\n",
"<tr><td colspan=\"3\" style=\"border-bottom: 1px solid black\"></td></tr><tr><td style=\"text-align: left\">Note:</td><td colspan=\"2\" style=\"text-align: right\"><sup>*</sup>p&lt;0.1; <sup>**</sup>p&lt;0.05; <sup>***</sup>p&lt;0.01</td></tr></table>"
],
"text/plain": [
"<stargazer.stargazer.Stargazer at 0x15443f910>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import pandas as pd\n",
"from sklearn import datasets\n",
Expand All @@ -245,7 +142,7 @@
},
{
"cell_type": "markdown",
"id": "1f3049d2",
"id": "71b240a5",
"metadata": {},
"source": [
"which can similarly be cast into $\\LaTeX$ using `reg_results.render_latex()`.\n",
Expand Down Expand Up @@ -437,18 +334,6 @@
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"source_map": [
14,
83,
Expand Down
50 changes: 5 additions & 45 deletions _sources/code-best-practice.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "647ce369",
"id": "9cd4b31b",
"metadata": {},
"source": [
"(code-best-practice)=\n",
Expand Down Expand Up @@ -295,45 +295,17 @@
},
{
"cell_type": "code",
"execution_count": 1,
"id": "c6e44fed",
"execution_count": null,
"id": "b8ca0695",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Zen of Python, by Tim Peters\n",
"\n",
"Beautiful is better than ugly.\n",
"Explicit is better than implicit.\n",
"Simple is better than complex.\n",
"Complex is better than complicated.\n",
"Flat is better than nested.\n",
"Sparse is better than dense.\n",
"Readability counts.\n",
"Special cases aren't special enough to break the rules.\n",
"Although practicality beats purity.\n",
"Errors should never pass silently.\n",
"Unless explicitly silenced.\n",
"In the face of ambiguity, refuse the temptation to guess.\n",
"There should be one-- and preferably only one --obvious way to do it.\n",
"Although that way may not be obvious at first unless you're Dutch.\n",
"Now is better than never.\n",
"Although never is often better than *right* now.\n",
"If the implementation is hard to explain, it's a bad idea.\n",
"If the implementation is easy to explain, it may be a good idea.\n",
"Namespaces are one honking great idea -- let's do more of those!\n"
]
}
],
"outputs": [],
"source": [
"import this"
]
},
{
"cell_type": "markdown",
"id": "adb781b0",
"id": "881288ad",
"metadata": {},
"source": [
"## Advanced Coding Tips\n",
Expand Down Expand Up @@ -416,18 +388,6 @@
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"source_map": [
14,
302,
Expand Down
14 changes: 1 addition & 13 deletions _sources/coming-from-excel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "11e1ec8b",
"id": "1ceac46b",
"metadata": {},
"source": [
"# Coming from Excel\n",
Expand Down Expand Up @@ -57,18 +57,6 @@
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"source_map": [
14
]
Expand Down
2 changes: 1 addition & 1 deletion _sources/coming-from-matlab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "8e73a53a",
"id": "19bf82da",
"metadata": {},
"source": [
"# Coming from Matlab\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/coming-from-r.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "0b7eda21",
"id": "75261ece",
"metadata": {},
"source": [
"# Coming from R\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/coming-from-stata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "e53a4c0e",
"id": "a198dacf",
"metadata": {},
"source": [
"# Coming from Stata\n",
Expand Down
4 changes: 3 additions & 1 deletion _sources/craft-referee.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
"cells": [
{
"cell_type": "markdown",
"id": "2848c6f3",
"id": "146b20a2",
"metadata": {},
"source": [
"(craft-referee)=\n",
"# Writing Referee Reports\n",
"\n",
"In this chapter, you'll learn tips and tricks for writing referee reports. Much of this chapter is advisory: some of it might work for you, some of it might not. It's not intended to be a foolproof guide, or to cover everyone's preferences--but it is designed to help you get started on writing good referee reports.\n",
"\n",
"This chapter very much stands on the shoulders of giants. Those giants include [The Turing Way](https://the-turing-way.netlify.app/)'s [Guidance on Peer Review](https://the-turing-way.netlify.app/communication/peer-review/peer-review-guidance.html), {cite:ts}`nyhan2015checklist`, {cite:ts}`berk2017write`, {cite:ts}`nicholas2011quick`, Econometrica's [guidelines for referees](https://www.econometricsociety.org/publications/econometrica/guidelines-referees), Marc Bellemare's [20 Rules for Refereeing](http://marcfbellemare.com/wordpress/5542), Tyler Cowan's [how to be a good referee](https://marginalrevolution.com/marginalrevolution/2006/10/how_to_be_a_goo.html), and Tatyana Deryugina's [how to be a constructive referee](https://deryugina.com/how-to-be-a-constructive-referee/).\n",
"\n",
"What is the purpose of a referee report? We think there are two:\n",
"\n",
"1. to help the editor make a decision about whether to publish the paper in their journal\n",
Expand Down
2 changes: 2 additions & 0 deletions _sources/craft-referee.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kernelspec:

In this chapter, you'll learn tips and tricks for writing referee reports. Much of this chapter is advisory: some of it might work for you, some of it might not. It's not intended to be a foolproof guide, or to cover everyone's preferences--but it is designed to help you get started on writing good referee reports.

This chapter very much stands on the shoulders of giants. Those giants include [The Turing Way](https://the-turing-way.netlify.app/)'s [Guidance on Peer Review](https://the-turing-way.netlify.app/communication/peer-review/peer-review-guidance.html), {cite:ts}`nyhan2015checklist`, {cite:ts}`berk2017write`, {cite:ts}`nicholas2011quick`, Econometrica's [guidelines for referees](https://www.econometricsociety.org/publications/econometrica/guidelines-referees), Marc Bellemare's [20 Rules for Refereeing](http://marcfbellemare.com/wordpress/5542), Tyler Cowan's [how to be a good referee](https://marginalrevolution.com/marginalrevolution/2006/10/how_to_be_a_goo.html), and Tatyana Deryugina's [how to be a constructive referee](https://deryugina.com/how-to-be-a-constructive-referee/).

What is the purpose of a referee report? We think there are two:

1. to help the editor make a decision about whether to publish the paper in their journal
Expand Down
33 changes: 5 additions & 28 deletions _sources/craft-research-blogs.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 200a0bd

Please sign in to comment.