Skip to content

Commit

Permalink
Added initial structure for stats elements, operations and plots
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 9, 2017
1 parent 9c578a2 commit a789e03
Show file tree
Hide file tree
Showing 14 changed files with 299 additions and 803 deletions.
1 change: 1 addition & 0 deletions holoviews/element/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .graphs import * # noqa (API import)
from .path import * # noqa (API import)
from .raster import * # noqa (API import)
from .stats import * # noqa (API import)
from .tabular import * # noqa (API import)


Expand Down
9 changes: 0 additions & 9 deletions holoviews/element/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
GridSpace, DynamicMap, GridMatrix, OrderedDict)
from ..core.options import Options, Cycle
from ..core.util import pd
from ..interface.pandas import DFrame as PandasDFrame
from ..interface.pandas import DataFrameView
from ..interface.seaborn import DFrame, Bivariate, Distribution, \
Regression, TimeSeries


class ComparisonInterface(object):
Expand Down Expand Up @@ -181,11 +177,6 @@ def register(cls):
cls.equality_type_funcs[Table] = cls.compare_tables
cls.equality_type_funcs[Points] = cls.compare_points

# Pandas DFrame objects
cls.equality_type_funcs[DataFrameView] = cls.compare_dframe
cls.equality_type_funcs[PandasDFrame] = cls.compare_dframe
cls.equality_type_funcs[DFrame] = cls.compare_dframe

# Seaborn Views
cls.equality_type_funcs[Bivariate] = cls.compare_bivariate
cls.equality_type_funcs[Distribution] = cls.compare_distribution
Expand Down
50 changes: 50 additions & 0 deletions holoviews/element/stats.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import param

from ..core.dimension import Dimension
from .chart import Chart, Scatter


class Bivariate(Chart):
"""
Bivariate Views are containers for two dimensional data,
which is to be visualized as a kernel density estimate. The
data should be supplied as an Nx2 array, containing the x-
and y-data.
"""

kdims = param.List(default=[Dimension('x'), Dimension('y')])

vdims = param.List(default=[], bounds=(0,1))

group = param.String(default="Bivariate", constant=True)



class Distribution(Chart):
"""
Distribution Views provide a container for data to be
visualized as a one-dimensional distribution. The data should
be supplied as a simple one-dimensional array or
list. Internally it uses Seaborn to make all the conversions.
"""

kdims = param.List(default=[])

group = param.String(default='Distribution', constant=True)

vdims = param.List(default=[Dimension('Value')])

_auto_indexable_1d = False


class Regression(Scatter):
"""
Regression is identical to a Scatter plot but is visualized
using the Seaborn regplot interface. This allows it to
implement linear regressions, confidence intervals and a lot
more.
"""

group = param.String(default='Regression', constant=True)


12 changes: 0 additions & 12 deletions holoviews/interface/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
from ..core import Dimensioned, AttrTree

try:
import pandas
from .pandas import DFrame # noqa (API import)
except:
pandas = None

try:
import seaborn
from .seaborn import * # noqa (API import)
except:
seaborn = None

from .collector import * # noqa (API import)

def public(obj):
Expand Down
155 changes: 0 additions & 155 deletions holoviews/interface/pandas.py

This file was deleted.

140 changes: 0 additions & 140 deletions holoviews/interface/seaborn.py

This file was deleted.

Loading

0 comments on commit a789e03

Please sign in to comment.