-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/data analytics (code refactor) #39
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
Conversation
…rvice to send dashboard analytics
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
…ion SMH bruh bruh bruh
…test_insights_service
jinyoungbang
left a comment
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.
LGTM! Just two minor changes:
- Can you switch camel case to snake case? https://www.pluralsight.com/blog/software-development/programming-naming-conventions-explained
- Make sure you create a test case to handle your exception
… updated unit-tests
jinyoungbang
left a comment
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.
| common_grad_year, count_common_grad_year = "", 0 | ||
|
|
||
| # update most common major | ||
| for major, freq in majors.items(): |
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.
some cool tips: max(data.items(), key=lambda x: x[1])
you could do something like this and manipulate this data to get the maximum/most common item of a dictionary! (a simple one liner)
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.
dang, man's pulled out the lambda funcion 😂
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.
damn that actually just cut like 15 lines of code lmaoooo
What does this PR do?
Created an InsightsService and corresponding API endpoint to perform all data analysis in the backend. Kept a similar code structure to the frontend code, but added some additional checks for null/empty values.
Type of change
Tests Performed
Planning to experiment with some unit tests, but for now just tested directly using a new listing "Big Data"
UPDATE: completed unit tests for both
apiandInsightsServiceScreenshots
https://drive.google.com/file/d/1f6k0tTP6ERyQY8Ddyw2hNDcYdDwC7Qc6/view?usp=sharing
Additional Comments