Skip to content

Commit

Permalink
Merge pull request #18 from cmmorrow/stable
Browse files Browse the repository at this point in the history
Stable
  • Loading branch information
cmmorrow committed Mar 30, 2018
2 parents f0d425a + 1bffc92 commit cc61d58
Show file tree
Hide file tree
Showing 33 changed files with 1,874 additions and 340 deletions.
4 changes: 4 additions & 0 deletions .cache/v/cache/lastfailed
@@ -1,3 +1,7 @@
{
"sci_analysis/test/test_graph_boxplots.py::MyTestCase": true,
"sci_analysis/test/test_graph_boxplots.py::TestWarnings": true,
"sci_analysis/test/test_graph_frequency.py": true,
"sci_analysis/test/test_graph_histo.py": true,
"sci_analysis/test/test_groupcorrelation.py::MyTestCase::test_pearson_correlation_different_alpha": true
}
34 changes: 12 additions & 22 deletions .gitignore
Expand Up @@ -30,10 +30,18 @@ sci_analysis/.idea/vcs.xml

sci_analysis/.idea/workspace.xml

sci_analysis/.idea/*

.idea/*

build/*

dist/*

.cache/*

.pytest_cache/*

*.whl

*.pyc
Expand All @@ -44,25 +52,7 @@ sci_analysis/test/.coverage

sci_analysis/test/images/*.png

build_distro.sh
setup.cfg.old
build/lib/sci_analysis/test/test_analyze.py
build/lib/sci_analysis/test/test_anova.py
build/lib/sci_analysis/test/test_correlation.py
build/lib/sci_analysis/test/test_data_operations.py
build/lib/sci_analysis/test/test_equalvariance.py
build/lib/sci_analysis/test/test_graph_boxplots.py
build/lib/sci_analysis/test/test_graph_histo.py
build/lib/sci_analysis/test/test_graph_scatter.py
build/lib/sci_analysis/test/test_groupstatistics.py
build/lib/sci_analysis/test/test_kruskal.py
build/lib/sci_analysis/test/test_kstest.py
build/lib/sci_analysis/test/test_linregress.py
build/lib/sci_analysis/test/test_mannwhitney.py
build/lib/sci_analysis/test/test_normtest.py
build/lib/sci_analysis/test/test_statistics.py
build/lib/sci_analysis/test/test_ttest.py
build/lib/sci_analysis/test/test_twosampleks.py
build/lib/sci_analysis/test/test_vector.py
.DS_Store
build/lib/sci_analysis/test/test_linregress.py
build_distro.sh
setup.cfg.old
.DS_Store
.cache/v/cache/lastfailed
19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -2,26 +2,27 @@
An easy to use and powerful python-based data exploration and analysis tool

## Current Version:
2.0 --- Released December 31, 2017
2.1 --- Released March 30, 2018

[![PyPI](https://img.shields.io/pypi/v/sci_analysis.svg)](https://pypi.python.org/pypi/sci_analysis)
[![PyPI](https://img.shields.io/pypi/format/sci_analysis.svg)](https://pypi.python.org/pypi/sci_analysis)
[![PyPI](https://img.shields.io/pypi/pyversions/sci_analysis.svg)](https://pypi.python.org/pypi/sci_analysis)
[![Build Status](https://travis-ci.org/cmmorrow/sci-analysis.svg?branch=2.0.0)](https://travis-ci.org/cmmorrow/sci-analysis)
[![Coverage Status](https://coveralls.io/repos/github/cmmorrow/sci-analysis/badge.svg?branch=2.0.0)](https://coveralls.io/github/cmmorrow/sci-analysis?branch=master)
[![Build Status](https://travis-ci.org/cmmorrow/sci-analysis.svg?branch=2.1.0)](https://travis-ci.org/cmmorrow/sci-analysis)
[![Coverage Status](https://coveralls.io/repos/github/cmmorrow/sci-analysis/badge.svg?branch=2.1.0)](https://coveralls.io/github/cmmorrow/sci-analysis?branch=master)

### What is sci-analysis?
sci-analysis is a python package for quickly performing statistical data analysis. It provides a graphical representation of the supplied data as well as the statistical analysis. sci-analysis is smart enough to determine the correct analysis and tests to perform based on the shape of the data you provide, as well as how the data is distributed.

The types of analysis that can be performed are histograms of numeric or categorical data, bivariate analysis of two numeric data vectors, and one-way analysis of variance.

### What's new in sci-analysis version 2.0?
### What's new in sci-analysis version 2.1?

* In version 2.0, the code base was re-factored to use pandas as the internal data structure instead of numpy. This change shouldn't have a noticeable effect, but should lead to faster releases moving forward.
* Categorical data is now supported by passing in a single array of string values to the ```analyze``` function.
* Multiple scatter plots can now be shown on the same graph by passing in a *groups* argument.
* Oneway analysis can now be performed on stacked data by passing in all the data to the ```analyze``` function and an array of the corresponding groups using the *groups* argument.
* The function ```analyse``` was added as an alias to ```analyze```.
* Version 2.1 makes improvements to Statistical output and plots.
* Tukey-Kramer circles were added to the Oneway analysis plot.
* Grand Mean and Grand Median were added to the Oneway analysis plot.
* Overall Statistics were added to Oneway analysis.
* Overall Statistics were added to Categorical analysis.
* The Categorical analysis graph was changed to improve the appearance.

### Getting started with sci-analysis
The documentation on how to install and use sci-analysis can be found here:
Expand Down
17 changes: 9 additions & 8 deletions README.rst
Expand Up @@ -8,17 +8,17 @@ An easy to use and powerful python-based data exploration and analysis tool
Current Version
---------------

2.0 --- Released December 31, 2017
2.1 --- Released March 30, 2018

.. image:: https://img.shields.io/pypi/v/sci_analysis.svg
:target: https://pypi.python.org/pypi/sci_analysis
.. image:: https://img.shields.io/pypi/format/sci_analysis.svg
:target: https://pypi.python.org/pypi/sci_analysis
.. image:: https://img.shields.io/pypi/pyversions/sci_analysis.svg
:target: https://pypi.python.org/pypi/sci_analysis
.. image:: https://travis-ci.org/cmmorrow/sci-analysis.svg?branch=2.0.0
.. image:: https://travis-ci.org/cmmorrow/sci-analysis.svg?branch=2.1.0
:target: https://travis-ci.org/cmmorrow/sci-analysis
.. image:: https://coveralls.io/repos/github/cmmorrow/sci-analysis/badge.svg?branch=2.0.0
.. image:: https://coveralls.io/repos/github/cmmorrow/sci-analysis/badge.svg?branch=2.1.0
:target: https://coveralls.io/github/cmmorrow/sci-analysis?branch=2.0.0

What is sci-analysis?
Expand All @@ -31,11 +31,12 @@ The types of analysis that can be performed are histograms of numeric or categor
What's new in sci-analysis version 2.0?
---------------------------------------

* In version 2.0, the code base was re-factored to use pandas as the internal data structure instead of numpy. This change shouldn't have a noticeable effect, but should lead to faster releases moving forward.
* Categorical data is now supported by passing in a single array of string values to the ``analyze`` function.
* Multiple scatter plots can now be shown on the same graph by passing in a *groups* argument.
* Oneway analysis can now be performed on stacked data by passing in all the data to the ``analyze`` function and an array of the corresponding groups using the *groups* argument.
* The function ``analyse`` was added as an alias to ``analyze``.
* Version 2.1 makes improvements to Statistical output and plots.
* Tukey-Kramer circles were added to the Oneway analysis plot.
* Grand Mean and Grand Median were added to the Oneway analysis plot.
* Overall Statistics were added to Oneway analysis.
* Overall Statistics were added to Categorical analysis.
* The Categorical analysis graph was changed to improve the appearance.

Getting started with sci-analysis
---------------------------------
Expand Down
74 changes: 72 additions & 2 deletions build/lib/sci_analysis/test/test_data_operations.py
Expand Up @@ -4,14 +4,16 @@
import numpy.ma as ma
import pandas as pd

from ..data import is_array, is_dict, is_dict_group, is_group, is_iterable, is_tuple, to_float, flatten, is_series, \
Vector, is_data, is_vector, is_numeric
from ..data import (is_array, is_dict, is_dict_group, is_group, is_iterable, is_tuple, to_float, flatten, is_series,
Vector, is_data, is_vector, is_numeric, is_number)


class MyTestCase(unittest.TestCase):
inputs = {
'num': 3,
'float': 1.34,
'string': "hello",
'num_string': '1.34',
'char': "h",
'none': None,
'list': [1, 2, 3, 4, 5],
Expand Down Expand Up @@ -44,6 +46,8 @@ class MyTestCase(unittest.TestCase):

ans_array = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -77,6 +81,8 @@ class MyTestCase(unittest.TestCase):

ans_dict = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -110,6 +116,8 @@ class MyTestCase(unittest.TestCase):

ans_iterable = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -143,6 +151,8 @@ class MyTestCase(unittest.TestCase):

ans_tuple = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -176,6 +186,8 @@ class MyTestCase(unittest.TestCase):

ans_data = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -209,6 +221,8 @@ class MyTestCase(unittest.TestCase):

ans_vector = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -242,6 +256,8 @@ class MyTestCase(unittest.TestCase):

ans_group = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -275,6 +291,8 @@ class MyTestCase(unittest.TestCase):

ans_dict_group = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -308,6 +326,8 @@ class MyTestCase(unittest.TestCase):

ans_series = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -341,6 +361,8 @@ class MyTestCase(unittest.TestCase):

ans_numeric = {
'num': 0,
'float': 0,
'num_string': 0,
'string': 0,
'char': 0,
'none': 0,
Expand Down Expand Up @@ -372,6 +394,41 @@ class MyTestCase(unittest.TestCase):
'dict_of_lists': 0
}

ans_number = {
'num': 1,
'float': 1,
'num_string': 1,
'string': 0,
'char': 0,
'none': 0,
'list': 0,
'num_list': 0,
'mixed_list': 0,
'zero_len_list': 0,
'multiple_dim_list': 0,
'tuple': 0,
'num_tuple': 0,
'mixed_tuple': 0,
'dict': 0,
'array': 0,
'float_array': 0,
'nan_array': 0,
'negative_array': 0,
'masked_array': 0,
'multi_dim_array': 0,
'scalar_array': 1,
'zero_len_array': 0,
'empty_array': 0,
'vector': 0,
'series': 0,
'dict_series': 0,
'large_array': 0,
'large_list': 0,
'group': 0,
'group_of_lists': 0,
'dict_of_lists': 0
}

# Test logic tests

def test_001_is_array(self):
Expand Down Expand Up @@ -536,6 +593,19 @@ def test_010_is_numeric(self):
eval_numeric[name] = 0
self.assertTrue(eval_numeric == self.ans_numeric, "FAIL: is_numeric test")

def test_011_is_number(self):
"""Test the is_number function"""
eval_numeric = {}
for name, test in self.inputs.items():
try:
assert is_number(test)
print("PASS: " + name)
eval_numeric[name] = 1
except AssertionError:
print("FAIL: " + name)
eval_numeric[name] = 0
self.assertTrue(eval_numeric == self.ans_number, "FAIL: is_number test")

def test_050_to_float_list(self):
"""Test the to_float int list conversion"""
input_float = range(5)
Expand Down

0 comments on commit cc61d58

Please sign in to comment.