melizeche / ayudapy

Humanitarian platform to help people help people
https://ayudapy.org
GNU Affero General Public License v3.0
111 stars 60 forks source link

Create Dashboard with HelpRequests per day/week, most visited, etc.. #240

Closed melizeche closed 4 years ago

jorgeramirez commented 4 years ago

Library options (just a quick google)

Btw, the counting part for HelpRequests it's clear. But do we have the metadata for showing how many times a request was visited? Which I assume means seen by a user.

cc @melizeche

jorgeramirez commented 4 years ago

Some interesting charts to consider

melizeche commented 4 years ago

@jorgeramirez I'll say first let's create the API endpoint to get this data Total active HR = HelpRequest.objects.filter(active=True, resolved=False).count() Total active HR unique phone numbers = HelpRequest.objects.filter(active=True, resolved=False).distinct('phone').count() Mark as resolved = HelpRequest.objects.filter(resolved=True).count() Today = HelpRequest.objects.filter(active=True, added__gte=date.today()).count() yesterday = HelpRequest.objects.filter(active=True, added__lt=date.today(), added__gte=date.today()-timedelta(days=1)).count()

After that we can choose how to visualize it

jorgeramirez commented 4 years ago

Yes, I guess we could do:

The above covers what you mentioned.

jorgeramirez commented 4 years ago

Oh, you already added the summary service, great!

jorgeramirez commented 4 years ago

I guess we can close this issue unless there are other stats that could be added.