Marc Kupietz | dc0aa27 | 2021-07-27 15:34:54 +0200 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | from KorAPClient import KorAPConnection, KorAPClient |
| 4 | import plotly.express as px |
| 5 | |
| 6 | df = KorAPConnection(verbose=True) \ |
| 7 | .frequencyQuery("sozusagen", vc=["corpusSigle=FOLK", "corpusSigle!=FOLK"]) |
| 8 | df = KorAPClient.ipm(df) |
| 9 | df['error_y'] = df["conf.high"] - df["ipm"] |
| 10 | df['error_y_minus'] = df["ipm"] - df["conf.low"] |
| 11 | fig = px.bar(df, title="sozusagen", x="vc", y="ipm", error_y="error_y", error_y_minus="error_y_minus") |
| 12 | fig.show() |