bayesimpact / encompass

Bayes Impact's Encompass Tool for Visualizing and Analyzing Geographic Access
https://encompass.bayes.org
Apache License 2.0
26 stars 7 forks source link

Don't compute analysis when providers haven't been uploaded yet #61

Closed bcherny closed 6 years ago

bcherny commented 7 years ago

Just like what we already do for Service Areas:

screen shot 2017-11-09 at 5 33 37 pm
ericboucher commented 6 years ago

Maybe even create a "Run Analysis" button? Since the user may be tweaking service areas and we don't want to re-calculate each time. Thoughts @viviandien?

viviandien commented 6 years ago

This would make the Analysis controls (Enrollee dist, Adequacy std, Adequacy metric) not function well. The UI right now is optimized for real-time analysis interaction. If we wanted to make it more linear, I think we'd have to move those Analysis controls into a left-drawer instead of hovering over the map.

ericboucher commented 6 years ago

I think it would still work. Note that we don't recompute after selecting the hovering features; just when reselecting data from the left panels. My point is that it could take a while to select all the correct zipcodes, and it does not make sense to automatically re-compute before the user has selected everything. The flow would still be real-time for the distance and distribution choices though @viviandien :)

bcherny commented 6 years ago

@ericboucher What is the downside of re-computing each time?

viviandien commented 6 years ago

We would have to be pretty slick with the UX. As designed, when a user changes enrollee service areas, not only do the point As need to update real-time (location of dots), but so does the adequacy analysis (color of dots).

Are you proposing that we continue to keep the location real-time, but make the analysis gated by a button? ie: the coloring of dots and the charts in the Analysis drawer would be dependent on a Run Analysis button.

If we did this and it significantly saves on processing time, I think the proper flow would be:

@bcherny @ericboucher thoughts?

bcherny commented 6 years ago

Before we jump to conclusions, maybe it's worth talking through what exactly the downside of re-calculating is. If there is a performance issue, there are likely some cheap optimizations we can make rather than degrade the UX.

bcherny commented 6 years ago

Addressing this PR as part of https://github.com/bayesimpact/tds-frontend/pull/93.

Note: The original intent of this issue was simply to not show a Report unless both some Providers and some Service Areas are selected. The issue was then hijacked :) @ericboucher I moved the question you brought up to its own issue: https://github.com/bayesimpact/tds-frontend/issues/94.