tslumen package¶
tslumen helps bring to light the key characteristics of your time series data with rich, pre-canned artifacts, packed with charts and statistical information. The primary goal of tslumen is to expedite and bring consistency to how time series EDA is performed, allowing you to uncover the fundamental aspects in seconds rather than hours or days.
-
class
tslumen.
Dashboard
(df: pandas.core.frame.DataFrame, meta: Optional[dict] = None, result: Optional[tslumen.profile.base.BundledResult] = None, profiler: Optional[tslumen.profile.base.BundledProfiler] = None, profiler_config: Optional[dict] = None, scheduler: Optional[tslumen.scheduling.Scheduler] = None, scheduler_config: Optional[dict] = None, name: Optional[str] = None, server_url: Optional[str] = None, **kwargs: Any)[source]¶ Bases:
tslumen.report.base.Report
Renders the profiling results as an interactive Dash application, either directly in/from a Jupyter notebook or as a standalone web app. Requires a live kernel or server.
- Parameters
df (pd.DataFrame) – Timeseries data.
meta (Optional[dict]) – Timeseries metadata, a 2-level dictionary, first level indexed by
{'frame': {<key>: <value>}, {'series': {<series name>: <desc>}}
.result (Optional[BundledResult]) – For instantiating the report with pre-computed results from a profiler.
profiler (Optional[BundledProfiler]) – The BundledProfiler to run the profiling, defaults to DefaultProfiler.
profiler_config (Optional[dict]) – Profiler’s configurations.
scheduler (Optional[Scheduler]) – A Scheduler, default’s to Scheduler.
scheduler_config (Optional[dict]) – Scheduler’s configurations.
name (Optional[str]) – The name Flask should use for your app. Even if you provide your own
server
,name
will be used to help find assets. Typically__name__
(the magic global var, not a string) is the best value to use. Default'__main__'
, env:DASH_APP_NAME
server_url (Optional[str]) – The base URL that the app will be served at, from the perspective of the client. If not specified, will default to the host argument passed to the
run_server
method.kwargs – Refer to
dash.Dash
documentation.
-
SECTIONS
= [<class 'tslumen.report.dashboard.sections.summary.SectionSummary'>, <class 'tslumen.report.dashboard.sections.timeseries.SectionTimeSeries'>, <class 'tslumen.report.dashboard.sections.features.SectionFeatures'>, <class 'tslumen.report.dashboard.sections.relations.SectionRelations'>]¶
-
property
app
¶
-
run_server
(mode: Optional[str] = None, width: Any = '100%', height: Any = 650, inline_exceptions: Optional[Any] = None, **kwargs: Any) → Any[source]¶ Serve the app using flask in a background thread. You should not run this on a production server, use gunicorn/waitress instead.
- Parameters
mode (Optional[str]) – Display mode. One of:
"external"
: The URL of the app will be displayed in the notebook output cell. Clicking this URL will open the app in the default web browser;"inline"
: The app will be displayed inline in the notebook output cell in an iframe;"jupyterlab"
: The app will be displayed in a dedicate tab in the JupyterLab interface. Requires JupyterLab and the jupyterlab-dash extension.width – Width of app when displayed using mode=”inline”
height – Height of app when displayed using mode=”inline”
inline_exceptions – If True, callback exceptions are displayed inline in the the notebook output cell. Defaults to True if mode==”inline”, False otherwise.
kwargs – Additional keyword arguments to pass to the superclass
Dash.run_server
method.
-
property
server
¶
-
class
tslumen.
DefaultProfiler
(config: Optional[Dict[str, Dict[str, Any]]] = None, scheduler: Optional[tslumen.scheduling.Scheduler] = None)[source]¶ Bases:
tslumen.profile.base.BundledProfiler
Bundles all the profiling functions available in tslumen.profile, a convenient way to run a full analysis on any given timeseries dataset.
- Parameters
config (Optional[dict]) – Profiler functions’ configurations. Whatever options are provided here will override the defaults. Expects a 2-level dictionary with the first level indexed by the name of the profiling functions and the second level the function’s parameters. Assumed configs (i.e. defaults + overrides) are stored in the class variable config.
scheduler (Optional[Scheduler]) – For executing the profiling functions. Instantiates the default one if not provided.
-
class
tslumen.
HtmlReport
(df: pandas.core.frame.DataFrame, meta: Optional[dict] = None, result: Optional[tslumen.profile.base.BundledResult] = None, profiler: Optional[tslumen.profile.base.BundledProfiler] = None, profiler_config: Optional[dict] = None, scheduler: Optional[tslumen.scheduling.Scheduler] = None, scheduler_config: Optional[dict] = None)[source]¶ Bases:
tslumen.report.base.Report
,tslumen.report.html.base.HtmlBlock
Renders the profiling results as an interactive, fully self-contained HTML report that can be downloaded and shared without the need for a running server or Python kernel.
- Parameters
df (pd.DataFrame) – Timeseries data.
meta (Optional[dict]) – Timeseries metadata, a 2-level dictionary, first level indexed by
{'frame': {<key>: <value>}, {'series': {<series name>: <desc>}}
.result (Optional[BundledResult]) – For instantiating the report with pre-computed results from a profiler.
profiler (Optional[BundledProfiler]) – The BundledProfiler to run the profiling, defaults to DefaultProfiler.
profiler_config (Optional[dict]) – Profiler’s configurations.
scheduler (Optional[Scheduler]) – A Scheduler, default’s to Scheduler.
scheduler_config (Optional[dict]) – Scheduler’s configurations.
-
SECTIONS
= [<class 'tslumen.report.html.sections.SectionSummary'>, <class 'tslumen.report.html.sections.SectionTimeSeries'>, <class 'tslumen.report.html.sections.SectionTSFeatures'>, <class 'tslumen.report.html.sections.SectionRelations'>]¶
-
property
html
¶ Lazy loading property with the HTML representation of the report.