Coder Social home page Coder Social logo

Comments (6)

jorgeramirez avatar jorgeramirez commented on June 11, 2024

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

from ayudapy.

jorgeramirez avatar jorgeramirez commented on June 11, 2024

Some interesting charts to consider

  • X = requests Y = time, where time in {day, week, month}
  • X = requests Y = visited times.
  • Pie chart with %assisted and %pending. This will show from the total number of requests how many have been assisted (I think this means checking the "resolved" column).
    • We have the “resolved” column in the HelpRequest model.
  • Choropleth map of help requests. On hover, show the top-k cities with requests.

from ayudapy.

melizeche avatar melizeche commented on June 11, 2024

@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

from ayudapy.

jorgeramirez avatar jorgeramirez commented on June 11, 2024

Yes, I guess we could do:

  • /stats/requests-count?by=day|week|month
    • This service returns a count summary per day/week/month which will make it very compact. Maybe this service could return assisted and pending as two properties and within these, we have the frequency over day/week/month.
  • /stats/summary
    • This will return HR total active, HR total active unique phone number, and Total HR marked as resolved.

The above covers what you mentioned.

from ayudapy.

jorgeramirez avatar jorgeramirez commented on June 11, 2024

Oh, you already added the summary service, great!

from ayudapy.

jorgeramirez avatar jorgeramirez commented on June 11, 2024

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

from ayudapy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.