Add example for relative frequency in written vs. spoken corpora
Change-Id: Ic3fa96bc3d495abe876d2a71a939dafaa4b572ff
diff --git a/examples/writtenVSspoken.py b/examples/writtenVSspoken.py
new file mode 100644
index 0000000..e92c3af
--- /dev/null
+++ b/examples/writtenVSspoken.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+from KorAPClient import KorAPConnection, KorAPClient
+import plotly.express as px
+
+df = KorAPConnection(verbose=True) \
+ .frequencyQuery("sozusagen", vc=["corpusSigle=FOLK", "corpusSigle!=FOLK"])
+df = KorAPClient.ipm(df)
+df['error_y'] = df["conf.high"] - df["ipm"]
+df['error_y_minus'] = df["ipm"] - df["conf.low"]
+fig = px.bar(df, title="sozusagen", x="vc", y="ipm", error_y="error_y", error_y_minus="error_y_minus")
+fig.show()