-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/dashboard #86
base: dev
Are you sure you want to change the base?
Feat/dashboard #86
Conversation
# Conflicts: # SORT/settings.py # assets/sort-survey-configurator/README.md # assets/sort-survey-configurator/index.html # assets/sort-survey-configurator/package.json # assets/sort-survey-configurator/src/App.svelte # assets/sort-survey-configurator/src/main.ts # assets/sort-survey-configurator/vite.config.ts # data/questions/questions.json # home/templates/projects/project.html # requirements.txt # static/templates/base.html # survey/services/survey.py # survey/templates/survey/survey.html # survey/templates/survey/survey_configure.html # survey/templates/survey/survey_response.html # survey/urls.py # survey/views.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review for tomorrow
The interface is looking good. I've made some suggestions in the code itself but since it doesn't affect what's being rendered, we can address it after the user review tomorrow.
As for what should be fixed for tomorrow:
- Maturity score should be between 0-4
- The "Early progress" bar is very faint, it's hard to see especially in the first section when it's all squashed together:
- Ethnicity pie chart is cut off by the legend (this is when it's showing all the results without any filters selected)
Not a priority for tomorrow
But I'm making a note here so we don't forget it:
What's dash's support like for generating a pdf. If there isn't do you want me to look at at this for tomorrow? I was going to do an excel export function as well. |
@twinkarma These are some resources I've gathered so far:
If you could please look into this, that'd be helpful while I fix your comments above. |
@twinkarma Thanks for your comments, I've fixed them above. Should we merge this into dev now? |
feat: add report page
Yes let's go ahead and merge. |
# Conflicts: # survey/templates/survey/survey.html # survey/urls.py # survey/views.py
@twinkarma I've addressed your comments above and have improved the overall structure of the dashboard functionality. Main changes are:
Read for another review, thanks 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to make sure that the dashboard is configured to that particular survey instead of the global json file. If the manage changes the demographic questions or if there's a case where SORT itself changes (e.g. additional sections added, names changed for specific professions, etc.) then the dashboard will break/display the wrong information when trying to view older surveys.
|
||
# Demographic fields configuration | ||
DEMOGRAPHIC_FIELDS = [ | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when someone changes the order of questions or add a demographic question out of order?
settings.BASE_DIR, "data", "survey_config", "sort_only_config.json" | ||
) | ||
DEMOGRAPHIC_CONFIG_PATH = os.path.join( | ||
settings.BASE_DIR, "data", "survey_config", "demography_only_config.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be based on either survey.suvey_config or survey.demography_config instead? As user may change the configuration.
) | ||
def update_stored_data(*filter_values): | ||
|
||
all_responses = getattr(dash_app, 'survey_responses', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work? Does dash store another copy of the survey response data in its own tables?
from .callbacks import register_callbacks | ||
from survey.models import SurveyResponse | ||
|
||
survey_data = list(SurveyResponse.objects.all().values()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this but this call essentially gets all response data from our entire database, all responses from different surveys will be mixed together!
dashboards.py
SurveyView
to render metrics for the dashboardExample Dashboard:
Example with Filter: