Skip to content

Commit

Permalink
Merge pull request #1 from UUDeCART/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
jaywl authored Jul 2, 2019
2 parents 6a90d3a + 50bcc7b commit 095708f
Show file tree
Hide file tree
Showing 18 changed files with 7,758 additions and 0 deletions.
118 changes: 118 additions & 0 deletions modules/module2/original_bp_data.ipynb
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
}
Loading

0 comments on commit 095708f

Please sign in to comment.