--- a +++ b/README.md @@ -0,0 +1,38 @@ +<div class="sc-cmRAlD dkqmWS"><div class="sc-UEtKG dGqiYy sc-flttKd cguEtd"><div class="sc-fqwslf gsqkEc"><div class="sc-cBQMlg kAHhUk"><h2 class="sc-dcKlJK sc-cVttbi gqEuPW ksnHgj">About Dataset</h2></div></div></div><div class="sc-jgvlka jFuPjz"><div class="sc-gzqKSP ktvwwo"><div style="min-height: 80px;"><div class="sc-etVRix jqYJaa sc-bMmLMY ZURWJ"><p>A <strong>beginner-friendly</strong> version of the <a rel="noreferrer nofollow" aria-label="MIT-BIH Arrhythmia Database (opens in a new tab)" target="_blank" href="https://www.physionet.org/content/mitdb/1.0.0/">MIT-BIH Arrhythmia Database</a>, which contains 48 electrocardiograms (EKGs) from 47 patients that were at Beth Israel Deaconess Medical Center in Boston, MA in 1975-1979.</p> +<p>There are 48 CSVs, each of which is a 30-minute echocardiogram (EKG) from a single patient (record 201 and 202 are from the same patient). Data was collected at 360 Hz, meaning that 360 data points is equal to 1 second of time.</p> +<p>Banner photo by Joshua Chehov on Unsplash.</p> +<h2>How to Analyze the Heart with Python</h2> +<ol> +<li><a rel="noreferrer nofollow" aria-label="How to Analyze Heartbeats in 15 Minutes with Python (opens in a new tab)" target="_blank" href="https://medium.com/@protobioengineering/how-to-analyze-heartbeats-in-15-minutes-in-python-d1871dc7cdc1">How to Analyze Heartbeats in 15 Minutes with Python</a></li> +<li><a rel="noreferrer nofollow" aria-label="How the Heart Works (and What is a" target="_blank" href="https://medium.com/@protobioengineering/how-to-analyze-the-heart-with-python-part-1-how-the-heart-works-efd800aa9ad0">How the Heart Works (and What is a "QRS" Complex?)</a></li> +<li><a rel="noreferrer nofollow" aria-label="How to Identify and Label the Waves of an EKG (opens in a new tab)" target="_blank" href="https://medium.com/@protobioengineering/heart-analysis-with-python-part-2-labeling-ekgs-with-code-a381dfd031ba">How to Identify and Label the Waves of an EKG</a></li> +<li><a rel="noreferrer nofollow" aria-label="How to Flatten a Wandering EKG (opens in a new tab)" target="_blank" href="https://medium.com/@protobioengineering/heart-analysis-in-python-part-3-how-to-flatten-a-wandering-ekg-a58e01f8a89a">How to Flatten a Wandering EKG</a></li> +<li><a rel="noreferrer nofollow" aria-label="How to Calculate the Heart Rate (opens in a new tab)" target="_blank" href="https://medium.com/@protobioengineering/heart-analysis-with-python-part-4-calculating-heart-rate-12a651db5c47">How to Calculate the Heart Rate</a></li> +</ol> +<h2>What is a 12-lead EKG?</h2> +<p>EKGs, or electrocardiograms, measure the heart's function by looking at its electrical activity. The electrical activity in each part of the heart is supposed to happen in a particular order and intensity, creating that classic "heartbeat" line (or "<a rel="noreferrer nofollow" aria-label="QRS complex (opens in a new tab)" target="_blank" href="https://en.wikipedia.org/wiki/QRS_complex">QRS complex</a>") you see on monitors in medical TV shows.</p> +<p>There are a few types of EKGs (4-lead, 5-lead, 12-lead, etc.), which give us varying detail about the heart. A 12-lead is one of the most detailed types of EKGs, as it allows us to get 12 different outputs or graphs, all looking at different, specific parts of the heart muscles.</p> +<p>This dataset only publishes two leads from each patient's 12-lead EKG, since that is all that the original MIT-BIH database provided.</p> +<h2>What does each part of the QRS complex mean?</h2> +<p>Check out <a rel="noreferrer nofollow" aria-label="Ninja Nerd's EKG Basics tutorial on YouTube (opens in a new tab)" target="_blank" href="https://www.youtube.com/watch?v=CNN30YHsJw0">Ninja Nerd's EKG Basics tutorial on YouTube</a> to understand what each part of the QRS complex (or heartbeat) means from an electrical standpoint.</p> +<h2>Filenames</h2> +<p>Each file's name is the ID of the patient (except for 201 and 202, which are the same person).</p> +<h2>Columns</h2> +<ul> +<li>index</li> +<li>calculated elapsed milliseconds (<code>index / 360 * 1000</code>)</li> +<li>the first lead</li> +<li>the second lead</li> +</ul> +<p>The two leads are often lead <strong>MLII</strong> and another lead such as <strong>V1</strong>, <strong>V2</strong>, or <strong>V5</strong>, though some datasets do not use MLII at all. <strong>MLII</strong> is the lead most often associated with the classic <a rel="noreferrer nofollow" aria-label="<strong>QRS Complex</strong> (opens in a new tab)" target="_blank" href="https://en.wikipedia.org/wiki/QRS_complex"><strong>QRS Complex</strong></a> (the medical name for a single heartbeat).</p> +<p>Milliseconds were calculated and added as a secondary index to each dataset. Calculations were made by dividing the <code>index</code> by <code>360</code> Hz then multiplying by <code>1000</code>. The original index was preserved, since the calculation of milliseconds as digital signals processing (e.g. filtering) occurs may cause issues with the correlation and merging of data. You are encouraged to try whichever index is most suitable for your analysis and/or recalculate a time index with Pandas' <code>to_timedelta()</code>.</p> +<h2>Patient information</h2> +<p>Info about <a rel="noreferrer nofollow" aria-label="each of the 47 patients is available here (opens in a new tab)" target="_blank" href="https://physionet.org/physiobank/database/html/mitdbdir/records.htm">each of the 47 patients is available here</a>, including age, gender, medications, diagnoses, etc.</p> +<h2>Getting Started</h2> +<p>Physionet has some <a rel="noreferrer nofollow" aria-label="online tutorials and tips (opens in a new tab)" target="_blank" href="https://physionet.org/about/tutorial/">online tutorials and tips</a> for analyzing EKGs and other time series / digital signals.</p> +<p>Check out <a aria-label="our notebook for opening and visualizing the data (opens in a new tab)" target="_blank" href="https://www.kaggle.com/code/protobioengineering/getting-started-visualizing-patient-100-s-ecg">our notebook for opening and visualizing the data</a>.</p> +<h2>How the CSVs were obtained</h2> +<p>A write-up on how the data was converted from <code>.dat</code> to <code>.csv</code> files is <a rel="noreferrer nofollow" aria-label="available on Medium.com (opens in a new tab)" target="_blank" href="https://medium.com/@protobioengineering/how-to-get-heart-data-from-the-mit-bih-arrhythmia-database-e452d4bf7215">available on Medium.com</a>. Data was downloaded from the <a rel="noreferrer nofollow" aria-label="MIT-BIH Arrhythmia Database (opens in a new tab)" target="_blank" href="https://www.physionet.org/content/mitdb/1.0.0/">MIT-BIH Arrhythmia Database</a> then converted to CSV.</p> +<h2>Citations</h2> +<p>Moody GB, Mark RG. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng in Med and Biol 20(3):45-50 (May-June 2001). (PMID: 11446209)</p> +<p>Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., … & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.</p></div></div></div> \ No newline at end of file