Closed pieroit closed 9 months ago
Could be useful to have an analytics endpoint to get some data and optionally a plot. Here is the code to make a plot out of analytics.json
analytics.json
import pandas as pd import plotly.express as px json = pd.read_json("analytics.json", typ="series") df = pd.DataFrame({ "plugin": json.index.values, "downloads": json.values, }) df = df.sort_values("downloads", ascending=True) df["plugin"] = df["plugin"].map(lambda p: p.split("/")[-1]) px.bar(df, y="plugin", x="downloads") # could be saved as file or sent as binary/base64/whatever
Could be useful to have an analytics endpoint to get some data and optionally a plot. Here is the code to make a plot out of
analytics.json