Skip to content

Commit

Permalink
Add Quartlie count to Symbols list
Browse files Browse the repository at this point in the history
  • Loading branch information
math-a3k committed May 5, 2024
1 parent f658f7e commit 0258ce7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/templates/base/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ <h6 class="text-center">

{% indicators_radio_buttons %}

<div id="symbols-list" class="list-group">
{{ quartiles }}
</div>

<div id="symbols-list" class="list-group">
{% for symbol in symbols %}
{% symbol_render_html_snippet symbol=symbol %}
Expand Down
7 changes: 7 additions & 0 deletions base/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import inspect
from collections import Counter

from django.conf import settings
from django.contrib import messages
Expand Down Expand Up @@ -37,6 +38,12 @@ def get_context_data(self, **kwargs):
context["symbols"] = Symbol.objects.top_symbols()
context["time_interval"] = settings.TIME_INTERVAL
context["ms_threshold"] = settings.MODEL_SCORE_THRESHOLD
context["quartiles"] = Counter(
[
s.others["describe"]["current_quartile"]
for s in context["symbols"]
]
)
return context


Expand Down

0 comments on commit 0258ce7

Please sign in to comment.