imhr.r33._processing

Classes

Processing(**kwargs) Hub for running processing and analyzing raw data.
class imhr.r33._processing.Processing(**kwargs)[source]

Bases: object

Hub for running processing and analyzing raw data.

Methods

Methods

demographics(source, destination[, isHTML]) Output list of demographics for easy html viewing.
device(source, destination[, isHTML]) Output list of variables for easy html viewing.
html([df, raw_data, name, path, source, …]) Create HTML output.
preprocessing(source[, isMultiprocessing, cores]) Preprocessing data for formatting and initial calculations.
summary(source, destination[, metadata, isHTML]) Generate summary from online raw data.
variables(source, destination[, isHTML]) Output list of variables for easy html viewing.
demographics(source, destination[, isHTML]) Output list of demographics for easy html viewing.
device(source, destination[, isHTML]) Output list of variables for easy html viewing.
html([df, raw_data, name, path, source, …]) Create HTML output.
preprocessing(source[, isMultiprocessing, cores]) Preprocessing data for formatting and initial calculations.
summary(source, destination[, metadata, isHTML]) Generate summary from online raw data.
variables(source, destination[, isHTML]) Output list of variables for easy html viewing.
classmethod preprocessing(source, isMultiprocessing=False, cores=0)[source]

Preprocessing data for formatting and initial calculations. Steps include: * Dates converted to ISO format. * Variables formatted to camelCase. * Variables naming patterns consistant (i.e. osFullName, browserFullName). * Calculations for stimulus onset error, DotLoc onset error, median response time, median stimulus onset error, median DotLoc onset error

Parameters:
source : [type]

[description]

isMultiprocessing : bool, optional

[description], by default False

cores : int, optional

[description], by default 0

Returns:
df : pandas.DataFrame

Pandas dataframe output.

classmethod summary(source, destination, metadata=None, isHTML=True)[source]

Generate summary from online raw data.

Parameters:
source : str

Source path.

destination : str

Destination path.

metadata : str

Metadata path.

isHTML : bool

Whether or not to export html.

Returns:
df : pandas.DataFrame

Pandas dataframe output.

error : pandas.DataFrame

Pandas dataframe error output.

classmethod variables(source, destination, isHTML=True)[source]

Output list of variables for easy html viewing.

Parameters:
source : str

Source path.

destination : str

Destination path.

isHTML : bool

Whether or not to export html.

Returns:
df_definitions : pandas.DataFrame

Variables output.

classmethod device(source, destination, isHTML=True)[source]

Output list of variables for easy html viewing.

Parameters:
source : str

Source path.

destination : str

Destination path.

isHTML : bool

Whether or not to export html.

Returns:
df_definitions : pandas.DataFrame

Variables output.

classmethod demographics(source, destination, isHTML=True)[source]

Output list of demographics for easy html viewing.

Parameters:
source : str

Source path.

destination : str

Destination path.

isHTML : bool

Whether or not to export html.

Returns:
df_definitions : pandas.DataFrame

demographics output.

classmethod html(df=None, raw_data=None, name=None, path=None, source=None, figure_title=None, intro=None, footnote=None, script='', **kwargs)[source]

Create HTML output.

Parameters:
destination : str

Path to save file to.

df : pandas.DataFrame

Pandas dataframe of analysis results data.

raw_data : pandas.DataFrame

Pandas dataframe of raw data.

name : str

(py::if source is logit) The name of csv file created.

path : str

The directory path of the html file.

source : str

The type of data being recieved.

figure_title : str

The title of the table or figure.

intro : str

The introduction of the group of figures or tables.

footnote : str

The footnote of the table or figure.

metadata : dict

Additional data to be included.

**kwargs : str, int, or None, optional

Additional properties, relevent for specific content types. Here’s a list of available properties:

These properties control additional parameters for displaying figures:

Property Description
html_title : str HTML title. This is visible on as a header for the html page.
metadata : str Additional data to be included.

While these properties control additional parameters for displaying bokeh plots:

Property Description
short, long : str Short (aoi) and long form (Area of Interest) label of html page. This is primarily used for constructing metadata tags in html.
display : str (For bokeh) The type of calibration/validation display.
trial : str (For bokeh) The trial number for the eyetracking task.
session : int (For bokeh) The session number for the eyetracking task.
day : str (For bokeh) The day the eyetracking task was run.
bokeh_type : str (If Bokeh) Control directory location. If trial, create trial plots.
Returns:
html : str

String of html code.