wildlife-dynamics / ecoscope-workflows

An extensible task specification and compiler for local and distributed workflows.
https://ecoscope-workflows.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Question: Should `gather_dashboard` allow widgets whose groups don't exactly match? #211

Open atmorling opened 3 months ago

atmorling commented 3 months ago

In working on #210, I ran into an issue because the get-patrol-events.example dataset that the pie chart is built from only contains data for a single month.

gather_dashboard currently validates that all grouped widgets provided contain the same set of keys. To paraphrase @cisaacstern this prevents missing data when selecting different combinations of grouper keys and is to ensure a user has created a sensible workflow that doesn't have any 'gaps'.

In the patrols workflow, we're combining patrol_observations with events grouped by month. In this case, patrol_observations had data for March, where events didn't, causing the gather_dashboard check to fail.

There's likely a scenario where a user may want to allow gaps like this in the data, as the absence of data is still data. In the context of a rolling report on a weekly schedule, there may just be no data recorded for a certain window, in which case it would be beneficial.

I guess the question boils down to, should we allow dashboard results to present empty data where a groupby key (ie; month) is absent from the input data (ie; Patrol Events)?

@cisaacstern I hope I've distilled our conversation accurately enough, feel free to disagree :smile:

CC @walljcg @tiffanynwong

cisaacstern commented 3 months ago

There's likely a scenario where a user may want to allow gaps like this in the data, as the absence of data is still data. In the context of a rolling report on a weekly schedule

Is there a scenario where we would want to allow this which does not involve scheduling?

Asking because scheduling is not part of MVP, so if this is scheduling-specific it's an easy "let's not worry about it for now". đŸ˜„

tiffanynwong commented 3 months ago

Good question! I think it would be nice to have the dashboard present empty results and have a message in the event only widgets that says something like "no data for this context" or something like that (can they?). That way there's feedback to the user about what's happening and they can still see the other results that use the track data. Otherwise what would the response from the system be? Would the status of the workflow become "error," with an explanation?

It also sorta depends on if the patrol and subjects workflows have the same outputs. Because if the patrol workflow fails, users would have a work around and they could use the subjects workflow instead. Not sure if this is common, but what if there are users who track patrols but don't create events in ER. They might still want to see the outputs from the patrol workflow if it has different results from the subject's workflow.

Just some thoughts but we can definitely iterate toward an ideal solution. Either way it would be good to discuss the system feedback when things fail.