-
Notifications
You must be signed in to change notification settings - Fork 1
Heat Map with Backend Data #77
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
base: heat-map
Are you sure you want to change the base?
Conversation
seunomonije
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
| * renders heat map onto html | ||
| * @param {number[]} data array of all 0s/1s heat map data | ||
| * @param {number} dataLength size of data array | ||
| * @param {number[]} allBinaryData array of all 0s/1s heat map data |
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.
consider renaming to just binaryData, allBinaryData insinuates that there's some other array with just a segment of the data, which there isn't so we can simplify this name
|
|
||
| createHeatMap(likedMusicBinaryHist, TOTAL_LIKED); | ||
| GENRE_ANALYSIS.then((genreAnalysisInfo) => { | ||
| const LIKED_MUSIC_BINARY_HIST = makeBinaryArr( |
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.
nit: I don't think this is a true constant, it should just use lowerCamelCase
| return JSON.parse(genreCount); | ||
| } | ||
|
|
||
| export const GENRE_ANALYSIS_PROMISE = fetchMusicGenre(); |
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.
See earlier PR about not calling a function with side effects (such as making a web request) on import
Uh oh!
There was an error while loading. Please reload this page.