ghammad / pyActigraphy

Python-based open source package for actigraphy data analysis

Home Page:https://ghammad.github.io/pyActigraphy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "import plotly.graph_objects as go" to Introduction section of documentation

Ranudar opened this issue · comments

Dear Grégory

I feel a little bit silly for this small remark, but I was just working through the introduction here:
https://ghammad.github.io/pyActigraphy/pyActigraphy-Intro.html

and was not familiar with plotly. So the

    title="Actigraphy data",
    xaxis=dict(title="Date time"),
    yaxis=dict(title="Counts/period"),
    showlegend=False)

didn't work at first for me.

Would it be possible, to add
import plotly.graph_objects as go
to the imports?

Best regards!

As a small correction in the agd.py module:

def read_raw_agd(
    input_fname,
    start_time=None,
    period=None
):
    r"""Reader function for raw **AWD** file.

    Parameters
    ----------
    input_fname: str
        Path to the AGD file.
    start_time: datetime-like, optional
        Read data from this time.
        Default is None.
    period: str, optional
        Length of the read data.
        Cf. #timeseries-offset-aliases in
        <https://pandas.pydata.org/pandas-docs/stable/timeseries.html>.
        Default is None (i.e all the data).

    Returns
    -------
    raw : Instance of **RawAWD**
        An object containing raw **AWD** data
"""

Shouldn't it be AGD instead of AWD?

Dear Grégory

I feel a little bit silly for this small remark, but I was just working through the introduction here: https://ghammad.github.io/pyActigraphy/pyActigraphy-Intro.html

and was not familiar with plotly. So the

    title="Actigraphy data",
    xaxis=dict(title="Date time"),
    yaxis=dict(title="Counts/period"),
    showlegend=False)

didn't work at first for me.

Would it be possible, to add import plotly.graph_objects as go to the imports?

Best regards!

Hello @Ranudar,

thanks for your feedback.

May I ask you to elaborate on what you mean by 'add to the imports'?

In the intro tutorial, the import of the plotly package is actually the second cell. The plotly is imported right after the pyActigraphy package.

Although it is possible to execute cells in any order in a notebook, the tutorial is meant to be followed sequentially (well, once all the cells have been executed once, you go always go back and re-execute any cell, if you want to practice).

Best regards,

Greg

As a small correction in the agd.py module:

def read_raw_agd(
    input_fname,
    start_time=None,
    period=None
):
    r"""Reader function for raw **AWD** file.

    Parameters
    ----------
    input_fname: str
        Path to the AGD file.
    start_time: datetime-like, optional
        Read data from this time.
        Default is None.
    period: str, optional
        Length of the read data.
        Cf. #timeseries-offset-aliases in
        <https://pandas.pydata.org/pandas-docs/stable/timeseries.html>.
        Default is None (i.e all the data).

    Returns
    -------
    raw : Instance of **RawAWD**
        An object containing raw **AWD** data
"""

Shouldn't it be AGD instead of AWD?

@Ranudar you're right. Copy-paste mistake. Thanks for letting me know.

Greg

Dear Greg

Ah yes! I think I overlooked the 2nd cell in your intro tutorial. My bad!

Best regards =)
Christian

Closing now.