-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add ScreenGrid tooltip, implement in building damage map #1145
Conversation
…implement in building damage map
data={data.damageEstimates.value} | ||
data={data.damageEstimates.value.filter( | ||
feature => feature.properties[mapStyles[dataType].field] | ||
)} |
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.
In the future, it's nice when values like this are abstracted to a well named variable so that it's clear how the data has been transformed.
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 👍
getProperty( | ||
tooltipInfo[el.field] / tooltipInfo[el.totalField], | ||
el.formatField | ||
)} |
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.
In the section above, it looks like you're calculating the average using cellWeight
divided by cellCount
. But couldn't you just set the new aggregation
prop to "MEAN"
and achieve the same results? Why hard code this here?
The new tooltip feature for the Screen Grid Map looks great! I did notice some issues with how the tooltip is implemented in the Tillamook County Buildings card:
When these issues are fixed, the map now looks like this: There are no more colorless grid cells, the lower avg. values appear lighter and the bigger avg. values appear darker, and the full range of colors are now displayed. |
@mendozaline thanks for the thorough review! I think I've resolved your comments -- however, I created issue #1152 to address the colorRange array length issue, and have a temporary implementation for now. I reworded the language and I think that what is being visualized may be clearer now, but I'd love suggestions on how to make it even better. |
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.
This looks great! Thanks for making those changes.
Implements a ScreenGrid tooltip for
cards/earthquake-damage-estimates-for-buildings-in-tillamook-county
.