Provide Python wrappers for RKorAPClient R-S4 classes and class methods
Change-Id: I216a6894ed1246ebb2300cac1e52972a517150a2
diff --git a/examples/hello_world.py b/examples/hello_world.py
index 126b3bf..6ac91cc 100755
--- a/examples/hello_world.py
+++ b/examples/hello_world.py
@@ -1,15 +1,17 @@
#!/usr/bin/env python3
-from KorAPClient import KorAPClient
+from KorAPClient import KorAPClient, KorAPConnection
import plotly.express as px
QUERY = "Hello World"
YEARS = range(2010, 2019)
COUNTRIES = ["DE", "CH"]
-kcon = KorAPClient.KorAPConnection(verbose=True)
+kcon = KorAPConnection(verbose=True)
vcs = ["textType=/Zeit.*/ & pubPlaceKey=" + c + " & pubDate in " + str(y) for c in COUNTRIES for y in YEARS]
-df = KorAPClient.ipm(KorAPClient.frequencyQuery(kcon, QUERY, vcs))
+df = KorAPClient.ipm(kcon.frequencyQuery(QUERY, vcs))
+print(df)
+
df['Year'] = [y for c in COUNTRIES for y in YEARS]
df['Country'] = [c for c in COUNTRIES for y in YEARS]