Plotting training

In [15]:
# import interesting packages

import os, sys
import pytz
import numpy as np
import pandas as pd
from datetime import timedelta, datetime
print(pd.__version__)
print(sys.version)
0.23.4
3.6.7 |Anaconda custom (64-bit)| (default, Dec 10 2018, 20:35:02) [MSC v.1915 64 bit (AMD64)]
In [19]:
## GLUE
import glue
from glue import qglue
print(glue.__version__)
0.14.1

DAQ

In [3]:
import seaborn as sns
iris_df = sns.load_dataset('iris')
iris_df.head(3)

# adding some dates to raw iris dataset, to be able to create plots with datetime attribute
rng = pd.date_range('1/1/1936 12:00:00', periods=150, freq='1H', tz='Canada/Atlantic')  #Europe/Rome
df_raw = iris_df.copy()
df_raw = df_raw.set_index(rng)
df_raw.head(3)
Out[3]:
sepal_length sepal_width petal_length petal_width species
1936-01-01 12:00:00-04:00 5.1 3.5 1.4 0.2 setosa
1936-01-01 13:00:00-04:00 4.9 3.0 1.4 0.2 setosa
1936-01-01 14:00:00-04:00 4.7 3.2 1.3 0.2 setosa

GLUEVIZ plotting

NOTE: The default behavior is for Glue to block the execution of the notebook while the UI is running. If you would like to be able to use the notebook and Glue at the same time, run this cell before starting glue:

%gui qt

This must be executed in a separate cell, before starting Glue. [ from http://docs.glueviz.org/en/stable/python_guide/glue_from_python.html ]

In [4]:
%gui qt
In [5]:
app= qglue(iris_df=iris_df.reset_index())   # more easy if you remove the index
In [6]:
10*10
Out[6]:
100

END