-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from UUDeCART/master
merge
- Loading branch information
Showing
18 changed files
with
7,758 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<html>\n", | ||
"<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"1\">\n", | ||
"<tbody>\n", | ||
"<tr>\n", | ||
"<td valign=\"center\" align=\"center\" width=\"25%\"><img src=\"../../media/decartes.jpg\"\n", | ||
"alt=\"DeCART Icon\" width=\"128\" height=\"171\"><br>\n", | ||
"</td>\n", | ||
"<td valign=\"center\" align=\"center\" width=\"75%\">\n", | ||
"<h1 align=\"center\"><font size=\"+1\">DeCART Summer School<br>\n", | ||
"for<br>\n", | ||
"Biomedical Data Science</font></h1></td>\n", | ||
"<td valign=\"center\" align=\"center\" width=\"25%\"><img\n", | ||
"src=\"../../media/U_Health_stacked_png_red.png\" alt=\"Utah Health\n", | ||
"Logo\" width=\"128\" height=\"134\"><br>\n", | ||
"</td>\n", | ||
"</tr>\n", | ||
"</tbody>\n", | ||
"</table>\n", | ||
"<br>\n", | ||
"</html>\n", | ||
"\n", | ||
"# MIMIC2 Heart Rate Data\n", | ||
"\n", | ||
"The heart rate and blood pressure data we have been working with is on the verge of worthlessness. Why?\n", | ||
"\n", | ||
"## What do we know about the data originally?\n", | ||
"\n", | ||
"### The numeric data we are analyzing were all pulled from a MySQL database\n", | ||
"\n", | ||
"In this notebook we will do a SQL query to see what the originally data looked like." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import pymysql\n", | ||
"import pandas as pd\n", | ||
"import getpass" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"conn = pymysql.connect(host=\"mysql\",port=3306,\n", | ||
" user=\"jovyan\",passwd=getpass.getpass(\"Enter password for MIMIC2 database\"),\n", | ||
" db='mimic2')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"cursor = conn.cursor()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"bloodpressure = pd.read_sql(\"\"\"SELECT * FROM chartevents WHERE \n", | ||
" itemid in (6, 51, 455, 6701) LIMIT 1000\"\"\",conn)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"bloodpressure.head()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python [default]", | ||
"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.6.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 1 | ||
} |
Oops, something went wrong.