{ "info": { "author": "Robin Champseix", "author_email": "robin.champseix@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Heart Rate Variability analysis\n\n[![PyPI version](https://badge.fury.io/py/hrv-analysis.svg)](https://badge.fury.io/py/hrv-analysis)\n[![Build Status](https://travis-ci.com/robinchampseix/hrvanalysis.svg?branch=master)](https://travis-ci.com/robinchampseix/hrvanalysis)\n[![codecov](https://codecov.io/gh/robinchampseix/hrvanalysis/branch/master/graphs/badge.svg)](https://codecov.io/gh/robinchampseix/hrvanalysis)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Downloads](https://pepy.tech/badge/hrv-analysis)](https://pepy.tech/project/hrv-analysis)\n\n**hrvanalysis** is a Python module for Heart Rate Variability analysis of RR-intervals built on top of SciPy, AstroPy, Nolds and NumPy and distributed under the GPLv3 license.\n\nThe development of this library started in July 2018 as part of Aura Healthcare project and is maintained by Robin Champseix.\n\n\n![alt text](https://github.com/robinchampseix/hrvanalysis/blob/master/figures/timeserie_distrib_plot.png)\n\n**Full documentation** : https://robinchampseix.github.io/hrvanalysis/\n\n**Website** : https://www.aura.healthcare\n\n**Github** : https://github.com/Aura-healthcare\n\n**Version** : 1.0.2\n\n\n## Installation / Prerequisites\n\n#### Dependencies\n\nhrvanalysis requires the following:\n- Python (>= 3.5)\n- astropy >= 3.0.4\n- future >= 0.16.0\n- nolds >= 0.4.1\n- numpy >= 1.15.1\n- scipy >= 1.1.0\n\n\n#### User installation\n\nThe easiest way to install hrv-analysis is using ``pip`` :\n\n $ pip install hrv-analysis\n\nyou can also clone the repository:\n\n $ git clone https://github.com/robinchampseix/hrvanalysis.git\n $ python setup.py install\n\n\n## Getting started \n\n### Outliers and ectopic beats filtering methods\n\nThis package provides methods to remove outliers and ectopic beats from signal for further analysis. Those methods are useful to get Normal to Normal Interval (NN interval) from Rr Interval.\nPlease use this methods carefully as they might have a huge impact on features calculation.\n\n```python\nfrom hrvanalysis import remove_outliers, remove_ectopic_beats, interpolate_nan_values\n\n# rr_intervals_list contains integer values of RR-interval\nrr_intervals_list = [1000, 1050, 1020, 1080, ..., 1100, 1110, 1060]\n\n# This remove outliers from signal\nrr_intervals_without_outliers = remove_outliers(rr_intervals=rr_intervals_list, low_rri=300, high_rri=2000)\n# This replace outliers nan values with linear interpolation\ninterpolated_rr_intervals = interpolate_nan_values(rr_intervals=rr_intervals_without_outliers, interpolation_method=\"linear\")\n\n# This remove ectopic beats from signal\nnn_intervals_list = remove_ectopic_beats(rr_intervals=interpolated_rr_intervals, method=\"malik\")\n# This replace ectopic beats nan values with linear interpolation\ninterpolated_nn_intervals = interpolate_nan_values(rr_intervals=nn_intervals_list)\n```\n\nYou can find how to use the following methods, references and more details in the [documentation](https://robinchampseix.github.io/hrvanalysis/tutorial.html):\n- remove_outliers\n- remove_ectopic_beats\n\n\n### Features calculation \n\nThere are 4 types of features you can get from NN Intervals: \n\n> Time domain features : **Mean_NNI, SDNN, SDSD, NN50, pNN50, NN20, pNN20, RMSSD, Median_NN, Range_NN, CVSD, CV_NNI, Mean_HR, Max_HR, Min_HR, STD_HR**\n\n> Geometrical domain features : **Triangular_index, TINN**\n\n> Frequency domain features : **LF, HF, VLF, LH/HF ratio, LFnu, HFnu, Total_Power**\n\n> Non Linear domain features : **CSI, CVI, Modified_CSI, SD1, SD2, SD1/SD2 ratio, SampEn**\n\nAs an exemple, what you can compute to get Time domain analysis is :\n\n```python\nfrom hrvanalysis import get_time_domain_features\n\n # nn_intervals_list contains integer values of NN Interval\nnn_intervals_list = [1000, 1050, 1020, 1080, ..., 1100, 1110, 1060]\n\ntime_domain_features = get_time_domain_features(nn_intervals_list)\n\n>>> time_domain_features\n{'mean_nni': 718.248,\n 'sdnn': 43.113,\n 'sdsd': 19.519,\n 'nni_50': 24,\n 'pnni_50': 2.4,\n 'nni_20': 225,\n 'pnni_20': 22.5,\n 'rmssd': 19.519,\n 'median_nni': 722.5,\n 'range_nni': 249,\n 'cvsd': 0.0272,\n 'cvnni': 0.060,\n 'mean_hr': 83.847,\n 'max_hr': 101.694,\n 'min_hr': 71.513,\n 'std_hr': 5.196}\n```\n\nYou can find how to use methods, references and details about each feature in the [documentation](https://robinchampseix.github.io/hrvanalysis/tutorial.html):\n- get_time_domain_features\n- get_geometrical_features\n- get_frequency_domain_features\n- get_csi_cvi_features\n- get_poincare_plot_features\n- get_sampen\n\n\n### Plot functions\n\nThere are several plot functions that allow you to see, for example, the Power spectral density for frequency domain features :\n\n```python\nfrom hrvanalysis import plot_psd\n\n# nn_intervals_list contains integer values of NN Interval\nnn_intervals_list = [1000, 1050, 1020, 1080, ..., 1100, 1110, 1060]\n\nplot_psd(nn_intervals_list, method=\"welch\")\nplot_distrib(nn_intervals_list, method=\"lomb\")\n```\n\n![alt text](https://github.com/robinchampseix/hrvanalysis/blob/master/figures/psd_periodogram_plot.png)\n\n\n```python\nfrom hrvanalysis import plot_poincare\n\n# nn_intervals_list contains integer values of NN Interval\nnn_intervals_list = [1000, 1050, 1020, 1080, ..., 1100, 1110, 1060]\n\nplot_poincare(nn_intervals_list)\nplot_poincare(nn_intervals_list, plot_sd_features=True)\n```\n\n![alt text](https://github.com/robinchampseix/hrvanalysis/blob/master/figures/poincare_plot.png)\n\n\nYou can find how to use methods and details in the [documentation](https://robinchampseix.github.io/hrvanalysis/tutorial.html):\n- plot_distrib\n- plot_timeseries\n- plot_psd\n- plot_poincare\n\n\n## References\n\nHere are the main references used to compute the set of features and for signal processing methods:\n\n> Heart rate variability - Standards of measurement, physiological interpretation, and clinical use, Task Force of The European Society of Cardiology and The North American Society of Pacing and Electrophysiology, 1996\n\n> Signal Processing Methods for Heart Rate Variability - Gari D. Clifford, 2002\n\n> Physiological time-series analysis using approximate entropy and sample entropy, Joshua S. Richman, J. Randall Moorman - 2000\n\n> Using Lorenz plot and Cardiac Sympathetic Index of heart rate variability for detecting seizures for patients with epilepsy, Jesper Jeppesen et al, 2014\n\n\n## Authors\n\n**Robin Champseix** - *Initial work* - (https://github.com/robinchampseix)\n\n\n## License\n\nThis project is licensed under the *GNU GENERAL PUBLIC License* - see the [LICENSE.md](https://github.com/robinchampseix/hrvanalysis/blob/master/LICENSE) file for details\n\n\n## Acknowledgments\n\nI hereby thank Laurent Ribi\u00e8re and Cl\u00e9ment Le Couedic, my coworkers who gave me time to Open Source this library.\nI also thank Fabien Arcellier for his advices on to how build a library in PyPi.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robinchampseix/hrvanalysis", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "hrv-analysis", "package_url": "https://pypi.org/project/hrv-analysis/", "platform": "", "project_url": "https://pypi.org/project/hrv-analysis/", "project_urls": { "Homepage": "https://github.com/robinchampseix/hrvanalysis" }, "release_url": "https://pypi.org/project/hrv-analysis/1.0.3/", "requires_dist": [ "numpy (>=1.15.1)", "astropy (>=3.0.4)", "nolds (>=0.4.1)", "scipy (>=1.1.0)", "pandas (>=0.23.4)", "matplotlib (>=2.2.2)" ], "requires_python": ">=3.5", "summary": "a package to calculate features from Rr Interval for HRV analyses", "version": "1.0.3" }, "last_serial": 4572550, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "00061f4712258b2555c55fd65f7d6ac8", "sha256": "236d76ab8028ca7b7f05b71d858e13defed822740ab502379cb2fefa9246bf37" }, "downloads": -1, "filename": "hrv_analysis-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "00061f4712258b2555c55fd65f7d6ac8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 24769, "upload_time": "2018-10-11T10:05:54", "url": "https://files.pythonhosted.org/packages/db/66/966a5d5aa26ea70e1f7a7759c74a8815a5404b124e3921ae24187750ec4b/hrv_analysis-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9891cbba069b1954261bac44210c1b9", "sha256": "eded9743b15b6b1a8b662c9f500ee87f007ee5e94d67c0e648fa400cfe993985" }, "downloads": -1, "filename": "hrv-analysis-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a9891cbba069b1954261bac44210c1b9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11217, "upload_time": "2018-10-11T10:05:56", "url": "https://files.pythonhosted.org/packages/3d/69/0873339d87af3ca49c54212666a33b74eb4433d9e57932067771fb4f6fee/hrv-analysis-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7d71125179f8c609fd730255f9722012", "sha256": "48ea920112230eb849f90f64c5d7213bce7900dbbc76a64bd33d5d3c7a7b162f" }, "downloads": -1, "filename": "hrv_analysis-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7d71125179f8c609fd730255f9722012", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 26156, "upload_time": "2018-11-02T14:26:30", "url": "https://files.pythonhosted.org/packages/27/5a/697e01fa6e9625188d13e7a3e84b18bc01faf238481986ac58bd49f8fb28/hrv_analysis-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "449e63f63044de60c87fc11d5499ebbb", "sha256": "d2051f49061dfe9112adcb173c3e1a8381788ceeb2386a5d84bc2acd8b315093" }, "downloads": -1, "filename": "hrv-analysis-1.0.1.tar.gz", "has_sig": false, "md5_digest": "449e63f63044de60c87fc11d5499ebbb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12440, "upload_time": "2018-11-02T14:26:31", "url": "https://files.pythonhosted.org/packages/d7/2a/3d99587e62edf16aecb337ae7e96acf63796f862b045bb961e6fa7076289/hrv-analysis-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "94fbd2277c4d79f5e9e3ccfe8a1fddb9", "sha256": "4d3ea73673a19b4c9acdc86a3c33008ed3c097f036027a6e9717d5175ee5b3dd" }, "downloads": -1, "filename": "hrv_analysis-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "94fbd2277c4d79f5e9e3ccfe8a1fddb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 26978, "upload_time": "2018-11-29T18:03:22", "url": "https://files.pythonhosted.org/packages/84/3b/8fcbc795043d1be7a9c3951808f4e525202520bf1ae6c286373893ed6904/hrv_analysis-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a8ecdf9d6c65fdfbc5fe1fc0909015c2", "sha256": "bf3b02dcd55012ded61cc381ec749115608c1631bcd7241f97893890f651df19" }, "downloads": -1, "filename": "hrv-analysis-1.0.2.tar.gz", "has_sig": false, "md5_digest": "a8ecdf9d6c65fdfbc5fe1fc0909015c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 12877, "upload_time": "2018-11-29T18:03:24", "url": "https://files.pythonhosted.org/packages/5d/a2/7b476be000afabaa39054d189414aa097c4087f30b59b2afc5e725e119fb/hrv-analysis-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "a719a7aed960b6ee72b1b7cce500b850", "sha256": "dcec855ea85e344c0418810ea48a22a213a2e4ed74688b49987f3371029ff85e" }, "downloads": -1, "filename": "hrv_analysis-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a719a7aed960b6ee72b1b7cce500b850", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 27622, "upload_time": "2018-12-07T16:33:37", "url": "https://files.pythonhosted.org/packages/92/b6/7d836da1e553ac091ea382edfb80041be978e410ff783fdbd8e3fb60be8e/hrv_analysis-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3ac09c0cc848c25a5bb321b07dd77a6b", "sha256": "f6d1133240cd4fe476dfa1c8899e8a83aed1d048a77f29fb60deccf3fb44f199" }, "downloads": -1, "filename": "hrv-analysis-1.0.3.tar.gz", "has_sig": false, "md5_digest": "3ac09c0cc848c25a5bb321b07dd77a6b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 13503, "upload_time": "2018-12-07T16:33:39", "url": "https://files.pythonhosted.org/packages/eb/a0/17409523152fa1757639879746efc2e6be2986ccb0277bfae9316c5eab85/hrv-analysis-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a719a7aed960b6ee72b1b7cce500b850", "sha256": "dcec855ea85e344c0418810ea48a22a213a2e4ed74688b49987f3371029ff85e" }, "downloads": -1, "filename": "hrv_analysis-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a719a7aed960b6ee72b1b7cce500b850", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 27622, "upload_time": "2018-12-07T16:33:37", "url": "https://files.pythonhosted.org/packages/92/b6/7d836da1e553ac091ea382edfb80041be978e410ff783fdbd8e3fb60be8e/hrv_analysis-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3ac09c0cc848c25a5bb321b07dd77a6b", "sha256": "f6d1133240cd4fe476dfa1c8899e8a83aed1d048a77f29fb60deccf3fb44f199" }, "downloads": -1, "filename": "hrv-analysis-1.0.3.tar.gz", "has_sig": false, "md5_digest": "3ac09c0cc848c25a5bb321b07dd77a6b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 13503, "upload_time": "2018-12-07T16:33:39", "url": "https://files.pythonhosted.org/packages/eb/a0/17409523152fa1757639879746efc2e6be2986ccb0277bfae9316c5eab85/hrv-analysis-1.0.3.tar.gz" } ] }