Package: gh-data-utils
Greenhouse Data UtilitiesThe Greenhouse Data Utilities package includes a series of tools to streamline the evaluation of several common experimental designs. It's designed and maintained by the data science team at Greenhouse Software with the intention of installing in aMode AnalyticsPython notebook.Please note that this package was designed forinternal useby the data science team. You're welcome to use it, but we will prioritize the experimentation needs of our team when reading through issues/feature requests.Sub-modulesgh_data_utils.data_visualizationgh_data_utils.stat_testsdata_visualizationFunctions for generating visual representations of statistical tests.get_overlapping_distributionsGenerates a Seaborn plot with overlapping distributions between two or more groups in order to visualize potential differences that may be detected with parametric non-parametric statistical tests. These can be used in the final presentation of results.Parametersdata:pandas dataframe, requiredDataframe used to generate charts. Data should be in atidyformat.groups:str, requiredThe name of the column indataby which you are grouping results.data_col:str, requiredThe name of the column indatawith continuous data to compare by group.order:list, optional; default =NoneThe order you want groups to appear in the graphs (i.e., Before and After). Must match a list of distinct values in thegroupsparameter.x-label:str, optional; default =''(empty)x-axis label for the chart.y-label:str, optional; default =''(empty)y-axis label for the chart.title:str, optional; default =''(empty)Title for the chart.bins:int, required; default =20Number of bins for the distributions.tick_format:str; options ='int,pct; default ='int'A string indicating the tick format for the graph axes based on the type of data used.get_barplotGenerates a Seaborn barplot with error bars in order to visualize mean differences and confidence intervals for those differences between two or more groups. These can be used in the final presentation of results.Parametersdata:pandas dataframe; requiredDataframe used to generate charts. Data should be in atidyformat.groups:str; requiredThe name of the column indataby which you are grouping results.data_col:str; requiredThe name of the column indatawith continuous data to compare by group.ci:int; default =95Confidence intervals for the error bars.order:list; optional; default =NoneThe order you want groups to appear in the graphs (i.e., Before and After). Must match a list of distinct values in thegroupsparameter.hue:str; optional; default =NoneSeaborn plot hue in order to generate grouped comparisons.x-label:str; default =''(empty)x-axis label for the chart.y-label:str; default =''(empty)y-axis label for the chart.title:str; default =''(empty)Title for the chart.palette:optional; default =NoneSeaborn palette for the chart.tick_format:str; options ='int,pct; default ='int'A string indicating the tick format for the graph axes based on the type of data used.stat_testsFunctions for conducting the appropriate parametric and non-parametric statistical test based on the specified experimental design and number of groups. We recommend conducting an a priori power analysis to ensure each group you're comparing has a sufficient sample size.run_stat_testConduct a parametric and non-parametric statistical test for two or more groups. The type of test based on number of groups is determined automatically.Parametersdata:pandas dataframe; requiredDataframe used to generate charts. Data should be in atidyformat.groups:str; requiredThe name of the column indataby which you are grouping results.data_col:str; requiredThe name of the column indatawith continuous data to compare by group.index:str; requiredThe dataframe column to use as an index when shaping data for a specific test. This should be your unit of comparison (i.e., user, day, event, etc).dimensions:list; optional; default =NoneA subset of groups to use in statistical comparisons. If this isn't specified, dimensions for statistical tests will be a list of distinct values ingroups.comparison:str; required; options ='ind,rep; default ='ind'The type of experimental design (independent or repeated measures).description:str; optional; default =''A description of the statistical test to include at the top of the summary of results. Defaults to none, and uses the standard output from each test.