<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Angéline Plaud, PhD in computer science on Medium]]></title>
        <description><![CDATA[Stories by Angéline Plaud, PhD in computer science on Medium]]></description>
        <link>https://medium.com/@aplaud_22557?source=rss-e34556a7d7ec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AnM2-8nM1SlNJHTxMGXpHQ.png</url>
            <title>Stories by Angéline Plaud, PhD in computer science on Medium</title>
            <link>https://medium.com/@aplaud_22557?source=rss-e34556a7d7ec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:09:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aplaud_22557/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The science behind the data N°3 —  The advantages of Parallel Categorical Diagrams]]></title>
            <link>https://medium.com/ad-scientiam-stories/the-science-behind-the-data-n-3-the-advantages-of-parallel-categorical-diagrams-708f8059d7fb?source=rss-e34556a7d7ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/708f8059d7fb</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Angéline Plaud, PhD in computer science]]></dc:creator>
            <pubDate>Tue, 05 Apr 2022 15:39:04 GMT</pubDate>
            <atom:updated>2022-04-28T08:46:54.816Z</atom:updated>
            <content:encoded><![CDATA[<h3>The science behind the data N°3 — The advantages of Parallel Categorical Diagrams</h3><p>A multimodal feature is a special case of features computation, which therefore requires special visualization tools.</p><p>Here we will present multimodal feature examples and compare three different visualization methods based on a use case developed by <a href="https://www.adscientiam.com/en/">Ad Scientiam</a>.</p><h3>Features with modality</h3><p>Massive amounts of data are continuously generated all around the world these days. Most of the time, the collected data is raw and requires interpretation as well as transformation processes in order to turn it into a meaningful and goal-specific measure called a <strong>feature</strong>.</p><p>An example of such a feature would be the transformation of a GPS signal (e.g., x and y position) into a walking distance (in meters), which constitutes a clear and straightforward measure.</p><p>What would be the purpose of doing that? At Ad Scientiam, we design and validate digital biomarkers that continuously measure disease progression in real life. In this way, we help people with severe and disabling diseases to better understand and monitor their illness. We are paving the way for healthcare professionals to offer more individualized care more efficiently. We are accelerating the development of future treatments and reducing the societal and economic impacts of disease.</p><p>In this context, our data team oversees the creation of features that, through clinical validation, will become disease biomarkers. From the raw data provided by the mobile phone, we compute the said features that can then be fed into machine learning models in order to evaluate the patient’s condition, to track the disease progression or to predict treatment response, for instance.</p><p>However, as some data enthusiasts already know, machine learning generalization can be a delicate process if the input features are poorly defined.</p><p>Indeed, in the field of data-analysis, features are often subject to various biases that influence the transformation process.</p><p>One known way to limit these biases is to introduce environment parameters called modalities. Multiple modalities can affect one feature, allowing the generation of <strong>multimodal features</strong>.</p><p>Thus, a multimodal feature is a representation of the same archetypical measure, but in a sub-environment associated with its dependent modalities.</p><p>As an example, let’s take one of our active tasks available in the MSCopilot® application: the Dexterity Test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*Q9pOkv-XqdDpgHlm" /></figure><blockquote>The dexterity Test is a specific task for Persons Living with Multiple Sclerosis (PLwMS) proposed in our medical device application MSCopilot®. This test measures the patient’s upper-limb dexterity and hand-eye coordination. During this test, PLwMS are instructed to use their finger to draw different shapes displayed on their phone.</blockquote><p>Based on the raw screen data collected during the dexterity task, it may be possible to capture patients’ performance via the computed distance between the displayed shape and the user drawing, i.e., the similarity score. However, reducing the user performance to one unique measure introduces an inherent bias due to its aggregation across multiple shapes.</p><p>In fact, the hypothesis behind data aggregation implies that all sub-environments fall within the same representational category. Aggregating the similarity scores of the spiral and line shapes is therefore inappropriate, since the level of difficulty involved in tracing these two shapes differs.</p><p>Thus, a similarity score needs to be created for each shape. The displayed shape then constitutes a modality for the similarity feature.</p><p>It is possible for features to depend not just on one but on multiple modalities. In the dexterity test, for instance, it is known if the shape was drawn using the dominant or the non-dominant hand.</p><p>Thus, an archetypical feature could be configured for multiple modalities that can be visualized, analyzed and compared.</p><p>In case of features with multiple modalities, visualizing their relationship can be quite challenging. In fact, traditional visualization tools allow us to study only one or two modalities at a time (when using multiple violin plots, for example). However, studying a higher number of features together, along with their intricate dependencies, might be a laborious task, as we will see shortly.</p><p>To go back to the dexterity test example, if multiple modalities are available, such as the dominant/non-dominant hand and the shape, we might be interested in looking at the impact of the type of hand used on the shape, and vice versa.</p><p>The idea is to be flexible regarding the modalities order of the visualization in order to study their impact on the feature more easily.</p><h3>Multimodal features visualization ideas</h3><p>Visualization is an important step when exploring the information contained in a feature dataset. Consequently, the visualization tools used should be adapted to the features, which in our case are the multimodal ones. Several choices are available to explore these types of data, from basic histograms to fancy mosaic views.</p><p>Using the example of a test called MyEmotion, we will compare the adaptability of these traditional visualization tools by presenting this test’s features via a histogram, a mosaic view, and lastly, a parallel categorical diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/0*LXxg3rgy0P-au8-Z" /></figure><blockquote>The <em>MyEmotion </em>Test is a specific task proposed in <strong><em>Redress</em></strong>, our mobile application for patients with major depressive disorder. It is currently being evaluated in a clinical study to assess its ability to predict antidepressant response in real-life. This project is a collaboration between Ad Scientiam and Janssen Pharmaceutica NV, part of the Janssen Pharmaceutical Companies of Johnson &amp; Johnson. It was facilitated by Johnson &amp; Johnson Innovation.</blockquote><p><em>MyEmotion </em>consists of recognizing the emotion seen on a human face that is quickly displayed on a phone screen. Four emotions {anger, happiness, sadness, fear} performed by professional actors {woman, man} are shown with expressions of varying degrees of intensity {very low, low, moderate, high, very high}.</p><p>Here, to evaluate the pertinence of each tool, we’ll visualize the correct answers given by a pool of healthy control subjects from a total of 214 evaluations.</p><h4>Histogram</h4><p>Let’s start with the histogram that reports feature value frequency. We will visualize the correct answers feature across multiple subsets, where each subset corresponds to one of the following modalities:</p><ul><li>emotion: {angry, happy, sad, afraid}</li><li>actor: {woman, man}</li><li>intensity: {very low, low, moderate, high, very high}</li><li>answer: {correct, incorrect}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*2vTgXn2DGGAJZs9P" /></figure><p>What can we interpret from this figure? Not as much as one could hope. Indeed,<br>this representation is rather difficult to read. Furthermore, the link between<br>the modality states that would be especially interesting to explore is missing, making this tool less useful. Let us consider the next option.</p><h4>Mosaic view</h4><p>Seeing that histograms may not be the most appropriate tool for this kind of visualization, let us try using the mosaic view. This visualization tool can also project the same information as above, but under the form of ratio areas. The more frequent the feature value in the dataset, the larger the represented area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r9MnMhF4tYlqloRp" /></figure><p>Is it possible to glean insightful information from this visualization? Most likely not. While the link between the correct and incorrect answers appears here, the modality link between the intensity states is still missing, which limits the information gained.</p><p>Overall, the two visualization tools described above suffer from the same weaknesses:</p><ul><li>A poor readability.</li><li>An unclear representation of the relationship between the modality states.</li><li>A maximum projection of three modalities.</li></ul><p>Indeed, in the presented examples, the overlapping or repeated axes lead to numerous information elements being displayed in the same figure subspace, which makes it hard to read the charts and to have a global view.</p><p>In addition, the intra-modality relationships are difficult to interpret, as the final graph is static, making it difficult to inverse the modality order in the projection.</p><p>Finally, the projected modality maximum number is three, which is quite a limitation in real-world applications.</p><p>Considering the above limitations, let us now look at the third visualization option, the parallel categorical diagram.</p><h4>Parallel Categorical Diagram</h4><p>The <strong>parallel categorical diagram</strong> may be the more adapted visualization solution that we have been looking for.</p><p>It allows the dynamic representation of multiple modalities, and the modality position can be switched at any time, guaranteeing the ability<strong> to study the modality impacts on the feature</strong> in any order.</p><p>What’s more, it is very readable as the projection is linear from left to right, and the stream flow representation that grows with the value of importance makes it easy to spot the most important relationship between the modalities and the results.</p><p>Here, we use the <a href="https://plotly.com/">plotly</a> implementation, but it can also be found in <a href="https://matplotlib.org/">matplotlib</a> and <a href="https://seaborn.pydata.org/">seaborn</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*UnT5c571I_2NegA6" /></figure><p>Finally, the proportions for each modality state can be visualized over the rest of the modalities just by interacting with its representation, as shown in the figure above. There is no limitation on the number of projected modalities, nor on the number of different states for each modality. You only need common sense to ensure the readability of the figure!</p><p>To sum up, we consider this to be quite a powerful and useful tool depending on the type of features you are studying. We wanted to share this insight with other data aficionados.</p><p>We hope you have learned something today. Stay tuned for more tips on data science.</p><p>Here are the code snippets of the figures displayed in the article. Enjoy :)</p><p><strong>Histogram:</strong></p><pre>freq_df = df.groupby(<br>    [‘modality_1’, ‘modality_2’, ‘modality_3’, ‘feature_value’]<br>).size().reset_index(name=’Count’)</pre><pre>fig = make_subplots(<br>    rows=1, cols=2, <br>    subplot_titles=(“Modality 1 state 1”, “Modality 1 state 2”)<br>)</pre><pre>mod11_feat1_df = freq_df.loc[ (freq_df[‘modality_1’]==’state_1&#39;) &amp;                                         (freq_df[‘feature_value’]==0.0)]</pre><pre>x = [mod11_feat1_df[‘modality_2’], mod11_feat1_df[‘modality_3’]]</pre><pre>fig.add_trace(<br>    go.Bar(x=x, y=mod11_feat1_df[‘Count’], name = ‘name’),<br>    row=1, col=1<br>)</pre><pre>mod11_feat2_df = freq_df.loc[(freq_df[‘modality_1’]==’state_1&#39;) &amp; (freq_df[‘feature_value’]==1.0)]</pre><pre>x = [mod11_feat2_df[‘modality_2’], mod11_feat2_df[‘modality_3’]]</pre><pre>fig.add_trace(<br>    go.Bar(x=x, y=m_right_df[‘Count’], name = ‘name’),<br>    row=1, col=2<br>)</pre><pre>fig.show()</pre><p><strong>Mosaic:</strong></p><pre>grouped_df = df.groupby(<br>    [‘modality_1’, ‘modality_2’, ‘feature_value’]<br>)[‘feature_value’].count()</pre><pre>fig,ax = plt.subplots(figsize=(20,15))</pre><pre>fig, _ = mosaic(<br>    grouped_df,<br>    ax=ax,<br>    gap=0.01,<br>    labelizer=lambda k: grouped_df.loc[k] if k in grouped_df.index    else ‘’,<br>    title= “answers accuracy”<br>)</pre><p><strong>Parallel categories:</strong></p><pre>import plotly.graph_objects as go</pre><pre>fig = go.Figure(go.Parcats(<br>    dimensions=[<br>        {‘label’: ‘Modality 1’, ‘values’: df.modality_1}, <br>        {‘label’: ‘Modality 2’, ‘values’: df.modality_2},<br>    ]<br>))<br>fig.show()</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=708f8059d7fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ad-scientiam-stories/the-science-behind-the-data-n-3-the-advantages-of-parallel-categorical-diagrams-708f8059d7fb">The science behind the data N°3 —  The advantages of Parallel Categorical Diagrams</a> was originally published in <a href="https://medium.com/ad-scientiam-stories">Ad Scientiam Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The science behind the data N°1 — Clock representation of 24-hour cyclic data]]></title>
            <link>https://medium.com/ad-scientiam-stories/clock-representation-of-24-hour-cyclic-data-52d4ec02cb03?source=rss-e34556a7d7ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/52d4ec02cb03</guid>
            <category><![CDATA[time-series-data]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[representation]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Angéline Plaud, PhD in computer science]]></dc:creator>
            <pubDate>Wed, 04 Aug 2021 09:11:35 GMT</pubDate>
            <atom:updated>2022-03-14T14:39:33.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wq1n21g_iix8DIVu" /><figcaption>Photo by <a href="https://unsplash.com/@storybyphil?utm_source=medium&amp;utm_medium=referral">Phil Desforges</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Time is by nature cyclical, whether we consider it in seconds, minutes, hours, days, or months. Therefore, choosing the right representation to display time data could be quite challenging. In this article, we will present a time representation that aims to easily spot and explain repetitive patterns, such as sleep parameters. In particular, we will explore in detail the case of daily cyclical data and the use of a clock representation.</p><h3>What are daily cyclical data?</h3><p>Daily cyclical data — or 24-hour time data — are time points going from midnight to almost midnight (note: this precision is important, and will be discussed later). They are often expressed in a <em>HH-MM-SS</em> format (Hours-Minutes-Seconds.). We mainly record those data through daily questionnaires, such as sleeping routine, or eating habits.</p><h3>Choosing the right representation, a.k.a. the Clock</h3><p>When considering daily time data, two representations are possible, either a linear timeline or a circular one.</p><p>However, the cycle representation provides more insights and advantages than the linear one.</p><p>First, it allows to easily flag patterns. As the time measures are plotted and overlap each other, patterns are visually identifiable when present.<em> In our clock figure, we can see that people who sleep after 1 a.m., wake up after 9 a.m.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Eaplaud%2F1.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Eaplaud%2F1%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/7437ae1c17be67d78212707bf8cc77ad/href">https://medium.com/media/7437ae1c17be67d78212707bf8cc77ad/href</a></iframe><p>Then, it prevents a major issue encountered with linear representation, which is the midnight day switch (midnight to almost midnight format) that results in biased distance comparisons (a deeper explanation can be found in the next section).</p><p>Finally, on a daily basis, a clock circle representation is an international standard and looks familiar and easily understandable. Thus, choosing this representation ensures that it is understood by a very large audience.</p><p>Things are getting tricky now, since a preliminary-step is required in order to convert the daily format data into a trigonometric format to achieve a clock representation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F26xBI73gWquCBBCDe%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F26xBI73gWquCBBCDe%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F26xBI73gWquCBBCDe%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="267" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1bc9ea692dfba28013d63e9f600ed4d/href">https://medium.com/media/d1bc9ea692dfba28013d63e9f600ed4d/href</a></iframe><h3>Why a trigonometric conversion?</h3><p>We decided to opt for a trigonometric data conversion since those data naturally fits into a circle representation, and they can be expressed on a clock. More importantly, this trigonometric conversion triggers the day switch, as explained in the following example.</p><p>First, imagine you want to compute the distance between two different persons&#39; bedtime 🛏. The first indicates a bedtime at “23:59:59” and the second one “00:00:00”. From a data perspective, a day goes from midnight to 23:59:59, so the difference between the bedtime of the two users is 23 hours 59 minutes and 59 seconds, not 1 second as we might think! This doesn’t fit the reality unless we consider the same comparison between the trigonometric values, “23:59:59” becomes cos = 0.9999 and sin = 0.0001 and “00:00:00” becomes cos = 1 and sin = 0. The differences are now minimal and closer to the expectation.</p><p>To complete the trigonometric transformation, those simple few steps can be followed:</p><blockquote>1. Convert time “HH:MM:SS” in seconds.</blockquote><blockquote>2. Divide the obtained time by the total duration of a day in seconds which is 86400.</blockquote><blockquote>3. Multiply it by 2π.</blockquote><blockquote>4. Apply cos and sin to the values.</blockquote><blockquote>5. You’re done !</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FOd0QRnzwRBYmDU3eEO%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FOd0QRnzwRBYmDU3eEO%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FOd0QRnzwRBYmDU3eEO%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed3d15ed6b790ebc7008f0eec9250ce8/href">https://medium.com/media/ed3d15ed6b790ebc7008f0eec9250ce8/href</a></iframe><p>For more convenience, here is a code snippet in python of the detailed trigonometric transformation.</p><pre>import pandas as pd<br>import math</pre><pre>def extract_time_angle_positions(data: pd.Series) -&gt; pd.Series:<br>    &quot;&quot;&quot; Transform time responses to angles between 0 and 2pi.&quot;&quot;&quot;<br>    return 2 * math.pi / 86_400 * data</pre><pre>def extract_time_positions(data: pd.Series) -&gt; pd.DataFrame:<br>    return pd.DataFrame(<br>        {<br>            &#39;res_cos&#39;: data.apply(math.cos),<br>            &#39;res_sin&#39;: data.apply(math.sin)<br>        }<br>    )</pre><h3>Clock representation, or how to do a nice visualization.</h3><p>Last step will be to draw the clock 🕔 !</p><p>The one in this article has been achieved using plotly library. If you are not familiar with it, <a href="https://plotly.com/">Plotly</a> is a visualization library available for python and R languages, which allows interactive data plotting construction. However, the following steps could be followed in any other programming language.</p><blockquote>1. Draw a circle that will shape the clock of radius 2.</blockquote><blockquote>2. Add the hours from 0 to 24 clockwise along the circle.</blockquote><blockquote>3. Transform current cyclic counterclockwise data into clockwise values.</blockquote><blockquote>4. Shift the data to align midnight with the uppermost point of the circle.</blockquote><p>In our case, we also :</p><blockquote>5. Add a triangular shape, which represents the amount of time spent between two time features of interest, i.e., sleep time and wake-up time.</blockquote><blockquote>6. You’re done again!!</blockquote><p>For more convenience, just after is given a code snippet in python of the detailed clock visualization.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FaLdiZJmmx4OVW%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FaLdiZJmmx4OVW%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FaLdiZJmmx4OVW%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="328" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e3c903297632e4f8c76add17a0548cf/href">https://medium.com/media/3e3c903297632e4f8c76add17a0548cf/href</a></iframe><p>Now you know everything about 24-hour cyclic data representation developed, in our case, for a clinical study regarding depression and sleep disorders.</p><p>Hope you find this article useful, if so leave a comment and see you for another one !</p><pre>import numpy as np<br>import plotly.graph_objects as go</pre><pre>def plot_sleep_analysis(data):<br>    fig = go.Figure()    <br>    sleep_sin = data[&#39;sleep_sin&#39;]<br>    sleep_cos = data[&#39;sleep_cos&#39;]<br>    wakeup_sin = data[&#39;wakeup_sin&#39;]<br>    wakeup_cos = data[&#39;wakeup_cos&#39;]</pre><pre>    # Transform clockwise + shift to midnight data<br>    sleep_angle = np.arctan2(sleep_sin, sleep_cos)<br>    fig.add_trace(<br>        go.Scatter(<br>            x=[-np.cos(sleep_angle + np.pi / 2)],<br>            y=[np.sin(sleep_angle + np.pi / 2)],<br>            mode=&#39;markers&#39;,<br>            marker=dict(size=10),<br>        )<br>    ) <br>   <br>    wakeup_angle = np.arctan2(wakeup_sin, wakeup_cos)<br>    fig.add_trace(<br>        go.Scatter(<br>            x=[-np.cos(wakeup_angle + np.pi / 2)],<br>            y=[np.sin(wakeup_angle + np.pi / 2)],<br>            mode=&#39;markers&#39;,<br>            marker=dict(symbol=&#39;cross&#39;, size=10),<br>            hovertemplate=&#39;cos: %{x} &#39; + &#39; sin: %{y} &#39;,<br>        )<br>    ) </pre><pre>    # Fit the Clock into perfect circle size illustration<br>    fig.update_xaxes(range=[-1.2, 1.2], visible=False)<br>    fig.update_yaxes(range=[-1.2, 1.2], visible=False)<br>    fig.update_layout(<br>        autosize=False,<br>        width=700,<br>        height=600<br>    )</pre><pre>    # Add the 0 to 24 hours around a circle shape<br>    fig.add_shape(<br>        type=&quot;circle&quot;,<br>        x0=-1, y0=-1, x1=1, y1=1,<br>        line_color=&quot;lightgrey&quot;,<br>        opacity=0.4,<br>        layer=&#39;below&#39;<br>    )    <br>    pos = np.linspace(<br>        np.pi / 2, <br>        np.pi / 2 - 2 * np.pi, <br>        24, <br>        endpoint=False<br>    )<br>    for val in range(24):<br>        x_val = np.cos(pos[val])<br>        y_val = np.sin(pos[val])<br>        if abs(y_val) == 1:<br>            x_shift = 0<br>        else:<br>            x_shift = np.sign(x_val) * 10<br>        if abs(x_val) == 1:<br>            y_shift = 0<br>        else:<br>            y_shift = np.sign(y_val) * 10<br>        fig.add_annotation(<br>            x=x_val, <br>            y=y_val, <br>            text=val, <br>            showarrow=False,<br>            xshift=x_shift, <br>            yshift=y_shift<br>        )    <br>    fig.show()</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52d4ec02cb03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ad-scientiam-stories/clock-representation-of-24-hour-cyclic-data-52d4ec02cb03">The science behind the data N°1 — Clock representation of 24-hour cyclic data</a> was originally published in <a href="https://medium.com/ad-scientiam-stories">Ad Scientiam Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>