In [1]:
import devahp as h
import numpy as np
from plotly.offline import plot
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
import plotly.graph_objs as go
init_notebook_mode()
In [2]:
h.single_stats("Areas.xlsx", "Sarah")
Out[2]:
In [3]:
h.single_stats('Jobs.xlsx', 'Sarah')
Out[3]:
In [4]:
drews = h.single_stats("Areas.xlsx", "Drew", )
In [5]:
altnames = h.get_altnames("Areas.xlsx")
data = go.Bar(x=["Math", "Animals", "Library", "Kitchen"], y=drews)
layout = go.Layout(title = "Drew's Priorities")
iplot(go.Figure(data = go.Data([data]), layout = layout))
In [20]:
from openpyxl import load_workbook
wb = load_workbook(filename = 'Areas.xlsx')
firstsheet = wb.get_sheet_names()[0]
sheet = wb.get_sheet_by_name(firstsheet)
In [6]:
#As you can see we are printing out the raw numbers
#You start with the file name then the sheet name
h.single_stats("Areas.xlsx", "Sarah")
Out[6]:
In [9]:
#You can repeat what we did before but add "True" after to print out a bar chart
h.single_stats("Areas.xlsx", "Sarah",bars = True)
In [10]:
h.single_stats("Areas.xlsx", "Sarah", bars = True, doppelganger = True)
In [11]:
h.single_stats("Areas.xlsx", "Sarah", bars = True, better = 1.5, muchbetter = 2, doppelganger = True)
In [12]:
h.group_stats("Areas.xlsx", bars = True)
In [26]:
h.group_stats("Areas.xlsx", bars = True, better = 1.5, muchbetter = 2)
In [27]:
h.group_stats("Areas.xlsx", bars = True, better = 1.5, muchbetter = 2, doppelganger = True)
In [28]:
h.group_stats("Areas.xlsx", ["Sarah", "Drew"], bars = True, better = 1.5, muchbetter = 2, doppelganger = True)
In [ ]: