Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics #50

Open
2 of 10 tasks
peteruithoven opened this issue May 4, 2019 · 6 comments
Open
2 of 10 tasks

Analytics #50

peteruithoven opened this issue May 4, 2019 · 6 comments

Comments

@peteruithoven
Copy link
Member

peteruithoven commented May 4, 2019

I'd like to be able to get some more information out of the system so we can analyze how we're doing. Being able to answer for example:

  • How many orders are made per round? Is it increasing or decreasing?
  • How many active members do we have? Are we growing?
  • How many sleeping members do we have?
  • Of people registering an account, how many are activated and of those how many order? Is that improving? (Cohort analysis)
  • What's the history of our markup?
  • Are we doing many corrections per round? Is that changing?
  • What's the trend in how many suppliers we have per round?
  • What percentage of members is ordering?

This has to be done in a anonymous way. The data should also only be available to members.

I think we can get a lot of answers with some basic information on the order rounds history and anonymous members information.

ToDo:

  • Create API
  • Create basic dashboard
  • Track can activate state (people who are accepted after info evening, but haven't finished account yet).
    • Can activate date?
  • Handle members who leave properly (inform with member administration)
  • Retrieve correct sleeping members information
    • is there a sleeping start date?
  • Show information about teams
  • Integrate dashboard into members site
  • Retrieve and visualize data that farmers team is interested in
@peteruithoven
Copy link
Member Author

I'm making some progress on a "dashboard".
https://github.com/peteruithoven/voko-analytics
Screen Shot 2019-05-27 at 01 02 34-fullpage

@peteruithoven
Copy link
Member Author

@rikva Could you confirm that there are 0 sleeping members?

@rikva
Copy link
Collaborator

rikva commented May 29, 2019

Wow, that looks really great.

Sorry, sleeping members should be queried like this:

In [1]: from accounts.models import SleepingVokoUser

In [2]: SleepingVokoUser.objects.count()
Out[2]: 107

@peteruithoven
Copy link
Member Author

Thanks! It's a good excuse to learn some new stuff like Recharts.

Sorry, sleeping members should be queried like

Does that mean the sleeping accounts are not a part of the VokoUser's data?
So the following wouldn't include sleeping members?

from accounts.models import VokoUser
VokoUser.objects.count()

@rikva
Copy link
Collaborator

rikva commented Jun 5, 2019

That's right, these objects are using so-called "custom managers".
Under the hood the data is in the same database table but the custom managers are a way to enforce that sleeping members can never log in.

@rikva
Copy link
Collaborator

rikva commented Jun 5, 2019

Basically the way I used them is so you don't have to query VokoUser.objects.filter(sleeping=False/True) (pseudocode) all the time, instead we have VokoUser and SleepingVokoUser to query separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants