Implementing the ptitprince library with python to create a robust data visualization

What is a raincloud plot

A raincloud plot is an intuitive, robust, and transparent form of data visualization. It is essentially a violin + boxplot + jittered dataset combo, which nicely provides an overview of raw data, probability distribution, and statistical inference at a glance via medians and confidence intervals. This can provide users with information for both individual observations and general patterns.

To learn more about the details and background of raincloud plots, read the original paper here:

Making it rain

To begin creating raincloud plots, you must first import the necessary libraries. This example was built from the ptitprince library, which was created by David Pogialli

The new video analysis platform for human activity classification research and model creation.

Open Human Activity Classification (OpenHAC) is an open source user interface for digital biomarker extraction, analysis, and exploration with tools to build, assess, and deploy machine learning classifiers. It is built on existing software packages used to quantify behavioral characteristics and assemble machine learning frameworks. …

Mixing streamlit with scikit-learn

Image by Charles Deluvio from Unsplash


In healthcare research, there are often multiple groups or individuals looking into the same condition or variable. They collect data independently, but expect, and often need, consistency between the people reporting the findings. Well-designed procedures must therefore include systematic measure agreement among the various data collectors. The extent of agreement among data collectors is known as interrater reliability.

Historically, measuring reliability between two raters has been achieved with simple percent agreement, which accounts for the total number of agreements out of the total number of scores. This, however, does not control for the possibility that both scorers agreed inadvertently.


Using the altair visualization library

A stream flowing under a bridge in the woods
A stream flowing under a bridge in the woods
Image by Jeff Sedgwick from Unsplash

What is a Stream Graph?

A stream graph is a variation of a stacked area chart that displays changes in data over time of different categories through the use of flowing, organic shapes that create an aesthetic river/stream appearance. Unlike the stacked area chart, which plots data over a fixed, straight axis, the stream plot has values displaced around a varying central baseline.

Each individual stream shape in the stream graph is proportional to the values of it’s categories. Color can be used to either distinguish each category or to visualize each category’s additional quantitative values through varying the color shade.

Stream Graphs are ideal…

Using the MVIZ repository

Image by Omid Alemia from mviz


Motion capture technology is a staple of blockbuster films. You may have seen A-listers like Brad Pitt or Jennifer Laurence in behind-the-scenes bonus features dressed in what looks like spandex suits covered in ping-pong balls. Those small spheres are actually reflective markers, which are tracked by infrared cameras during an actor’s/actress’ performance. The data from those cameras is then used by Hollywood visual effects artists to give computer-generated characters realistic movement.

That very same technology is being used by hospitals to analyze the movements of patients with mobility-limiting conditions such as Parkinson’s disease and cerebral palsy. …

Using the MNE library

What is MNE-Python?

MNE-Python is an open-source Python module for processing, analysis, and visualization of functional neuroimaging data (EEG, MEG, sEEG, ECoG, and fNIRS).

Let’s try it out

First, import the necessary libraries. You will need to install mne-python and numpy prior to running the code below.

import os
import numpy as np
import mne

Here we import MNE’s sample data.

sample_data_folder = mne.datasets.sample.data_path()
sample_data_evk_file = os.path.join(sample_data_folder, 'MEG', 'sample',
evokeds_list = mne.read_evokeds(sample_data_evk_file, baseline=(None, 0),
proj=True, verbose=False)
# Show the condition names, and reassure ourselves that baseline correction has been applied.
for e in evokeds_list:
print(f'Condition: {e.comment}, baseline: {e.baseline}')


Condition: Left Auditory, baseline: (-0.19979521315838786, 0.0)
Condition: Right…

An assembly line of AI solutions developed at scale and incorporated into clinical workflows

Image by Lenny Kuhne at Unsplash

Mayo Clinic’s AI Factory

Mayo Clinic launched what they call their “AI factory” in September of 2020. They and other organizations are using an assembly-line approach for artificial intelligence (AI) development, where small teams use a common set of software tools and procedures to speed the production of AI applications.

Here’s how it works:

  • Medical specialties around the hospital identify potential AI projects
  • Potential projects are shared with AI specialists
  • AI specialists and researchers break projects into small parts
  • Each part is delegated for development
  • Developers package the pieces together into deployable software

The aim of the process is to create repeatable AI models…

How the pandemic has impacted pain and virtual care

Image by Health Europa

The pandemic has undoubtedly changed many facets of our lives. For people with chronic pain it has been a difficult time to navigate the constant changes, restraints, and constraints involved along the way. Emily Henderson from News Medical discussed the impact of the pandemic on chronic pain analyzed in a recent study.

A study performed by the eHealth Lab, a research group affiliated with the Faculty of Health Sciences and the Universitat Oberta de Catalunya’s eHealth Center, has shown that 70% of the people with chronic pain have seen their condition worsen in terms of severity, frequency of episodes and…

For healthcare — a simple pain survey bot

Image by telus international

What are chatbots?

Chatbots are interactive applications designed to simulate human conversation. They can be found in a number of different sectors from retail to banking to online shopping and more.

The chatbot market is expected to reach $1.25 billion by 2025 with a compound annual growth rate (CAGR) of 24.3%. That figure is only expected to grow as more companies begin to acknowledge their potential.

Why build a chatbot for healthcare?

Chatbots offer numerous advantages for the healthcare industry. Applications can range from providing medical reminders or feedback, scheduling appointments, and improving access to medical information. …

A curated list of websites, mobile applications, videos, and blogs.

Image by Matthew Kushner in

There are many great resources available to help patients and clinicians manage chronic pain — below is a curated list of useful websites, mobile applications, videos, and blogs.


Agency for Healthcare Research and Quality — The Agency for Healthcare Research and Quality’s (AHRQ) mission is to produce evidence to make health care safer, higher quality, more accessible, equitable, and affordable, and to work within the U.S. Department of Health and Human Services and with other partners to make sure that the evidence is understood and used.

American Migraine Foundation — A website with a mission to mobilize a community for…

Cole Hagen

Pain researcher with interests in digital health, data science, and clinical care

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store