Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 23.2 for GMS6812 2022 on Feb 14 #3

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,33 @@ Modern Data Analysis

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

By [Joses Ho](https://twitter.com/jacuzzijo), [Sangyu
Xu](https://xusangyu.com/), and [Adam
Claridge-Chang](http://www.claridgechang.net/)

**Part of GMS6812 2022: Foundations of Precision Medicine hands-on
workshops (PhD programme in Clinical and Translational Sciences)**

------------------------------------------------------------------------

9am - 1pm, Febuary 14, 2023
9 am - 1 pm, Febuary 14, 2023

Duke-NUS Medical School

The goal of this class is to introduce biomedical scientists to data
analysis with Python notebooks. There are two parts to the session: a
lecture on the key issues in data analysis and a hands-on tutorial.
Please prepare for class as follows:
Please do the following preparations before class.

1. Read the
[Introduction](https://github.com/sangyu/moda/blob/main/nbs/01_Introduction.ipynb)
and install the prerequisite software on your laptop.
1. Read the [Introduction](introduction.html) and install the
prerequisite software on your laptop.
2. Go through a [Quick Tour of the
Notebook](https://github.com/sangyu/moda/blob/main/nbs/02_Quick_tour_of_the_Notebook.ipynb)
to familiarise yoruself to the jupyter notebook environment.
Notebook](quick_tour_of_the_notebook.html) to familiarise yoruself
to the jupyter notebook environment.
3. Bring your laptop to class, and we will go through the examples in
[Data Analysis with
Jupyter](http://localhost:8890/notebooks/nbs/03_Data_Analysis_with_Jupyter.ipynb)
Jupyter](data_analysis_with_jupyter_and_python.html).

If we have more time in class, you will also be introduced to our
estimation statistics package [DABEST
Introduction](https://github.com/sangyu/moda/blob/main/nbs/04_Dabest_introduction.ipynb).
Introduction](dabest_introduction.html).
26 changes: 8 additions & 18 deletions nbs/01_Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
"metadata": {},
"source": [
"---\n",
"output-file: 01_introduction.html\n",
"output-file: introduction.html\n",
"title: 01. Introduction\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "e97fe986",
"metadata": {},
"source": [
"by [Joses Ho](https://twitter.com/jacuzzijo), [Sangyu\n",
"Xu](https://xusangyu.com/), and [Adam\n",
"Claridge-Chang](http://www.claridgechang.net/)\n"
]
},
{
"cell_type": "markdown",
"id": "3e5aa939",
Expand All @@ -47,7 +37,7 @@
"\n",
"1. You'll need to get set up with a [version-control](https://en.wikipedia.org/wiki/Version_control) system. Go to [GitHub](https://github.com/) and get an account. Download and install [GitHub Desktop](https://desktop.github.com/).\n",
"\n",
"2. Retrieve the course materials from GitHub. Go to the course repository (\"repo\") at https://github.com/ACCLAB/moda. Click the green <mark style=\"background-color: lightgreen\">Code</mark> button and then select <mark style=\"background-color: lightgray\">Open with GitHub Desktop</mark>.<img src=\"clonemoda.png\" alt=\"clone repository\" width=\"600\"/> You will be prompted to select a directory for the local repository. If you are using a PC it can be something like \"C:\\\\Users\\YOURUSERNAME\\Documents\\GitHub\\moda\". If you are using a mac, it can be \"//Users/YOURUSERNAME/Documents/GitHub/moda\".<img src=\"clonedir.png\" alt=\"clone repository\" width=\"400\"/>\n",
"2. Retrieve the course materials from GitHub. Go to the course repository (\"repo\") at https://github.com/ACCLAB/moda. Click the green <mark style=\"background-color: lightgreen\">Code</mark> button and then select <mark style=\"background-color: lightgray\">Open with GitHub Desktop</mark>.<img src=\"images/clonemoda.png\" alt=\"clonemoda.png\" width=\"600\"/> You will be prompted to select a directory for the local repository. If you are using a PC it can be something like this: <br><img src=\"images/clonedir.png\" alt=\"clonedir.png\" width=\"500\"/> <br>If you are using a mac, it can be something like \"//Users/YOURUSERNAME/Documents/GitHub/moda\".\n",
"\n",
"3. To get set up with Python and [Jupyter](https://en.wikipedia.org/wiki/Project_Jupyter) notebooks, install the [Anaconda\n",
" Distribution](https://www.anaconda.com/download/) on your laptop."
Expand All @@ -58,9 +48,9 @@
"id": "666c283a-337a-4e42-a71d-da7a4b70f7ea",
"metadata": {},
"source": [
"4. Open Anaconda Navigator and launch [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/user/interface.html) by clicking on it.<img src=\"launchjupyterlab.png\" alt=\"clone repository\" width=\"600\"/>JupyterLab will open in a browser tab.\n",
"4. Open Anaconda Navigator and launch [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/user/interface.html) by clicking on it.<img src=\"images/launchjupyterlab.png\" alt=\"launchjupyterlab.png\" width=\"600\"/>JupyterLab will open in a browser tab.\n",
"\n",
"5. In the File Browser panel in JupyterLab, navigate to the folder where you cloned the course repo (refer to step 2). Double click on 'nbs'. You should see a list of notebook files. Open \"02_Quick_tour_of_the_Notebook.ipynb\" by double-clicking on the icon shown in the JupyterLab browser window.<img src=\"opennotebook.png\" alt=\"clone repository\" width=\"600\"/>\n",
"5. In the File Browser panel in JupyterLab, navigate to the folder where you cloned the course repo (refer to step 2). Double click on 'nbs'. You should see a list of notebook files. Open \"02_Quick_tour_of_the_Notebook.ipynb\" by double-clicking on the icon shown in the JupyterLab browser window.<img src=\"images/opennotebook.png\" alt=\"opennotebook.png\" width=\"600\"/>\n",
"\n",
"6. Work through the notebook. Familiarize yourself with basic Python,\n",
" and with working in the JupyterLab environment.\n",
Expand Down Expand Up @@ -195,15 +185,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2df926e4",
"id": "66d8d30a",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"The social reasons to learn programming also apply to research programming.\n",
"<iframe width=\"600\" height=\"400\"\n",
"src=\"https://www.youtube.com/embed/kgicuytCkoY\"\n",
"src=\"https://www.youtube.com/embed/kgicuytCkoY\">\n",
"</iframe>\n"
],
"text/plain": [
Expand All @@ -218,14 +208,14 @@
"%%HTML\n",
"The social reasons to learn programming also apply to research programming.\n",
"<iframe width=\"600\" height=\"400\"\n",
"src=\"https://www.youtube.com/embed/kgicuytCkoY\"\n",
"src=\"https://www.youtube.com/embed/kgicuytCkoY\">\n",
"</iframe>"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3d2dbe91-0f99-4047-9d62-ba7052867fa2",
"id": "cef28733",
"metadata": {},
"outputs": [],
"source": []
Expand Down
22 changes: 2 additions & 20 deletions nbs/02_Quick_tour_of_the_Notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,13 @@
"metadata": {},
"source": [
"---\n",
"output-file: 02_quick_tour_of_the_notebook.html\n",
"output-file: quick_tour_of_the_notebook.html\n",
"title: 02. A Quick Tour of The Notebook\n",
"\n",
"---\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"by [Joses Ho](https://twitter.com/jacuzzijo), [Sangyu\n",
"Xu](https://xusangyu.com/), and [Adam\n",
"Claridge-Chang](http://www.claridgechang.net/)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -113,7 +95,7 @@
"\n",
"One of the most useful things about IPython notebook is its tab completion. \n",
"\n",
"Try this: remove the \"`#`\" in the cell below and click just after `read_csv(` in the cell below and press <mark style=\"background-color: lightblue\">Shift+Tab</mark>."
"Try this: remove the \"`#`\" in the cell below (called uncommenting) and click just after `read_csv(` in the cell below and press <mark style=\"background-color: lightblue\">Shift+Tab</mark>. "
]
},
{
Expand Down
Loading