Replies: 3 comments 3 replies
-
That sounds reasonable. I know that we do not want to depend on pandas or polars, but I suspect a prime use case for these will be "I want a dataframe of this stuff so I can plot it" and so my main concern is how easy it is to get to that point. Do |
Beta Was this translation helpful? Give feedback.
-
I have a working prototype available here: #170 Try it out via: pip install git+https://github.com/posit-dev/posit-sdk-py.git@8fb160c565cc7f34dba8b26df1cbb4df5cb614e2 >>> from posit import connect
>>> client = connect.Client()
>>> views = client.metrics.views.find()
>>> import pandas as pd
>>> pd.DataFrame(views) |
Beta Was this translation helpful? Give feedback.
-
I tried it out on dogfood which has a decent amount of content I have access to.
I was at first a little surprised it took 12 seconds, but close to 30k views in total, so maybe that's to be expected. We certainly don't need to optimize that just yet (but the time might come). Doing a simple count of most popular content is easy enough:
|
Beta Was this translation helpful? Give feedback.
-
We currently have a
visits
andusage
API. Both resources return similar information, therefore it is reasonable to facade both resources behind a single interface.My recommendation is to create a package named
analytics
(or similar) that contains aMetricEvent
resource type. ThisResources
implementation would combine the results ofvisits
andusage
. The MetricEvent would contain a merged version of both resources and a reference to the original dataset.Beta Was this translation helpful? Give feedback.
All reactions