Repository: MaxGhenis/microdf

Issue:
name 'ordinal_label' is not defined in quantile_chg_plot
```
mdf.quantile_chg_plot(v1=df_1986.inc_2018, v2=df_2019.inc_2018,
                      w1=df_1986.asecwt, w2=df_2019.asecwt)
```
produces
```
NameError                                 Traceback (most recent call last)
<ipython-input-17-ef85fa8bbfb4> in <module>()
      1 mdf.quantile_chg_plot(v1=df_1986.inc_2018, v2=df_2019.inc_2018,
----> 2                       w1=df_1986.asecwt, w2=df_2019.asecwt)
      3                       #label1='Baby Boomers', label2='Millennials')

2 frames
/usr/local/lib/python3.6/dist-packages/microdf/weighted.py in <listcomp>(.0)
    159     df = pd.DataFrame([q1, q2])
    160     # Set decile labels.
--> 161     q_print = [ordinal_label((i * 100)) for i in q]
    162     # TODO: Check if other values are median
    163     if q[4] == 0.5:

NameError: name 'ordinal_label' is not defined
```

Discussion:

Patch:
diff --git a/ROADMAP.md b/ROADMAP.md
index a25fc16..5797082 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -6,4 +6,4 @@
 * Presets for working with common datasets, e.g. suggesting the appropriate weight for SCF and CPS
 * Standard error calculations for surveys with replicate weight files
 
-See the [issues page](https://github.com/MaxGhenis/microdf/issues) to view and suggest other items.
+See the [issues page](https://github.com/MaxGhenis/microdf/issues) to see and suggest other items.
\ No newline at end of file
diff --git a/microdf/weighted.py b/microdf/weighted.py
index e56e59e..e0ebb77 100644
--- a/microdf/weighted.py
+++ b/microdf/weighted.py
@@ -1,5 +1,6 @@
 import numpy as np
 import pandas as pd
+import microdf as mdf
 
 
 def weight(df, col, w):
@@ -158,7 +159,7 @@ def quantile_chg(v1, v2, w1=None, w2=None, q=np.arange(0.1, 1, 0.1)):
     q2 = weighted_quantile(v2, q, w2)
     df = pd.DataFrame([q1, q2])
     # Set decile labels.
-    q_print = [ordinal_label((i * 100)) for i in q]
+    q_print = [mdf.ordinal_label((i * 100)) for i in q]
     # TODO: Check if other values are median
     if q[4] == 0.5:
         q_print[4] += ' (median)'


Test patch:
diff --git a/microdf/tests/test_quantile_chg.py b/microdf/tests/test_quantile_chg.py
new file mode 100644
index 0000000..48cdec9
--- /dev/null
+++ b/microdf/tests/test_quantile_chg.py
@@ -0,0 +1,11 @@
+import microdf as mdf
+
+
+def test_quantile_chg():
+    mdf.quantile_chg(v1=[1, 2, 3], v2=[4, 5, 6],
+                     w1=[7, 8, 9], w2=[10, 11, 12])
+
+
+def test_quantile_chg_plot():
+    mdf.quantile_chg_plot(v1=[1, 2, 3], v2=[4, 5, 6],
+                          w1=[7, 8, 9], w2=[10, 11, 12])