niimpy.exploration.eda.lineplot module

Created on Wed Oct 27 09:53:46 2021

@author: arsii

niimpy.exploration.eda.lineplot.calculate_averages_(df, column, by)[source]

calculate group averages by given timerange

niimpy.exploration.eda.lineplot.plot_averages_(df, column, by='hour')[source]

Plot user group level averages by hour or by weekday.

Parameters
dfPandas Dataframe

Dataframe containing the data

columnstr

Columns to plot.

bystr, optional

Indicator for group level averaging. The default is False. If ‘hour’, hourly averages per group are presented. If ‘weekday’, daily averages per gruop are presented.

Returns
None.
niimpy.exploration.eda.lineplot.plot_timeseries_(df, columns, users, title, xlabel, ylabel, resample=False, interpolate=False, window_len=False, reset_index=False)[source]

There goes the text.

Parameters
dfPandas Dataframe

Dataframe containing the data

columnslist or str

Columns to plot.

userslist or str

Users to plot.

titlestr

Plot title.

xlabelstr

Plot xlabel.

ylabelstr

Plot ylabel.

resamplestr, optional

Data resampling frequency. The default is False. For details: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.resample.html

interpolatebool, optional

If true, time series will be interpolated using splines. The default is False.

windowint, optional

Rolling window smoothing window size. The default is False.

reset_indexbool, optional

If true, dataframe index will be resetted. The default is False.

Returns
None.
niimpy.exploration.eda.lineplot.resample_data_(df, resample, interpolate, window_len, reset_index)[source]

resample dataframe for plotting

niimpy.exploration.eda.lineplot.timeplot(df, users, columns, title, xlabel, ylabel, resample=False, interpolate=False, window=False, reset_index=False, by=False)[source]

Plot a time series plot. Plot selected users and columns or group level averages, aggregated by hour or weekday.

Parameters
dfPandas Dataframe

Dataframe containing the data

userslist or str

Users to plot.

columnslist or str

Columns to plot.

titlestr

Plot title.

xlabelstr

Plot xlabel.

ylabelstr

Plot ylabel.

resamplestr, optional

Data resampling frequency. The default is False. For details: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.resample.html

interpolatebool, optional

If true, time series will be interpolated using splines. The default is False.

windowint, optional

Rolling window smoothing window size. The default is False.

reset_indexbool, optional

If true, dataframe index will be resetted. The default is False.

bystr, optional

Indicator for group level averaging. The default is False. If ‘hour’, hourly averages per group are presented. If ‘weekday’, daily averages per gruop are presented.

Returns
——-
None.