INSTALL

In [1]:
!pip install roughviz
Collecting roughviz
  Downloading https://files.pythonhosted.org/packages/a8/47/88e35b87730dd9c7ebb6807b8acbede6b1183f4c95cd7fb3e4a37f91b20b/roughviz-4.6.0-py3-none-any.whl
Requirement already satisfied: Jinja2 in /opt/conda/envs/Python36/lib/python3.6/site-packages (from roughviz) (2.10)
Requirement already satisfied: pandas in /opt/conda/envs/Python36/lib/python3.6/site-packages (from roughviz) (0.24.1)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/envs/Python36/lib/python3.6/site-packages (from Jinja2->roughviz) (1.1.0)
Requirement already satisfied: pytz>=2011k in /opt/conda/envs/Python36/lib/python3.6/site-packages (from pandas->roughviz) (2018.9)
Requirement already satisfied: numpy>=1.12.0 in /opt/conda/envs/Python36/lib/python3.6/site-packages (from pandas->roughviz) (1.15.4)
Requirement already satisfied: python-dateutil>=2.5.0 in /opt/conda/envs/Python36/lib/python3.6/site-packages (from pandas->roughviz) (2.7.5)
Requirement already satisfied: six>=1.5 in /opt/conda/envs/Python36/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas->roughviz) (1.12.0)
Installing collected packages: roughviz
Successfully installed roughviz-4.6.0

IMPORT

In [26]:
import roughviz

VISUALIZE

BAR CHART

In [29]:
import pandas as pd 
d = {'Year': ['1980', '1981', '1982'], 'A': [3, 4, 10]}
df = pd.DataFrame(data=d)
roughviz.bar(df["Year"], df["A"], axisRoughness = 0.7, axisStrokeWidth = 0.7, roughness=2.3, highlight="gray")
Out[29]:

HORIZONTAL BAR CHART

In [30]:
import pandas as pd 
d = {'Year': ['1980', '1981', '1982'], 'A': [3, 4, 10]}
df = pd.DataFrame(data=d)
roughviz.barh(df["Year"], df["A"], axisRoughness = 0.7, axisStrokeWidth = 0.7, roughness=2.3, highlight="gray")
Out[30]:

STACKED BAR CHART

In [33]:
import roughviz
import pandas as pd 
d = {'Year': ['1980', '1981', '1982'], 'A': [3, 4, 10], 'B': [3, 4, 10]}
df = pd.DataFrame(data=d)
roughviz.stackedbar(df["Year"], df[["A","B"]], axisRoughness = 0.7, axisStrokeWidth = 0.7, roughness=2.3, highlight="gray")
Out[33]:

PIE CHART

In [31]:
import pandas as pd 
d = {'Year': ['1980', '1981', '1982'], 'A': [3, 4, 10]}
df = pd.DataFrame(data=d)
roughviz.pie(df["Year"], df["A"], axisRoughness = 0.7, axisStrokeWidth = 0.7, roughness=2.3, highlight="gray")
Out[31]:

DONUT CHART

In [32]:
import pandas as pd 
d = {'Year': ['1980', '1981', '1982'], 'A': [3, 4, 10]}
df = pd.DataFrame(data=d)
roughviz.donut(df["Year"], df["A"], axisRoughness = 0.7, axisStrokeWidth = 0.7, roughness=2.3, highlight="gray")
Out[32]: