-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/ 'assessments levels over the years' chart #80
Conversation
Thanks for this Kowal! =) I think that we should show current year as the latest year on the xx axis, this way it gives more context and can make it easier for people to see if companies submitted something this year. One there's only one MQ Assessment we can just show a single dot, no? I think it's fair. |
Yep, make sense, so I need to fix that in this PR
OK, that's how it works now. |
.. although it might make sense to somehow distinguish it visually. This case means that we don't have data for those last year(s), but we're assuming MQ a. level didn't change - but it could - a company could have done better/worst job but we just don't know it. |
@simaob I fixed the chart to always end on the current year, also I simplified the logic. I still need to add tests for this. |
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.
I wonder if we should take a year from an assessment date or publication date. Also what happens when there are two assessments/publications in the given year. Take a look at company Bukit Asam
, the level is 1 because in the same year there were two assessments. But the second assessment was published the next year.
Maybe we should take publication date for this chart.
Great catch! will fix that in the next days. I think switching to publication date make sense. @simaob ? |
Or we should just go more granular there. Not years, but month-year for axis-x |
There could be 2 publications within one year. |
ecd88b4
to
bbca9b5
Compare
I only show the points for real assessments. I removed that assumption that level stays the same when there was no assessment in the given year. So the chart looks like this now. The number of data points is the number of assessments. Do you think that is a good approach @simaob ? |
Also, I'm using slugs to access companies and sectors on the public site. http://localhost:3000/tpi/companies/acerinox, http://localhost:3000/tpi/companies/bukit-asam |
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.
👍
Summary
Add Assessment Levels/years chart for (TPI) Management Quality for Company
Details
[[2016,2],[2017,2],[2018,4]]
::Api::Charts::Company.new(@company).nr_of_assessments_data
always provides data for each year starting from latest year to most recent, filling missing years levels with last reported level.Mockups
Example
More than 1 assessment (http://localhost:3000/tpi/companies/314)
When only 1 assessment (http://localhost:3000/tpi/companies/460)
Questions