Skip to content
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

Feature request: combine_wpa() - a function to join WpA person queries #144

Open
moralec opened this issue May 14, 2021 · 2 comments
Open
Labels
spike enhancements that would take longer to implement
Projects

Comments

@moralec
Copy link
Contributor

moralec commented May 14, 2021

Is your feature request related to a problem? Please describe.
We currently expect users to use dyplr or other packages to combine data when needed. It would be nice to have a simple function to combine wpa person queries.

Describe the solution you'd like
Function will:

  • Compare if two person queries have the same frequency, date range and individuals.
  • If positive, the function will join the two queries in a new combined dataset, ignoring repeated columns
  • If negative it will display a error message. For example: (1) Date range does not match, (2) Frequency does not match or (3) Population does not match
@martinctc
Copy link
Member

Is the intention of this to enable users to combine queries when they have different date ranges? In other words, this would be something akin to rbind() but with checks. This is interesting and requires some thinking / consideration on the extent of checks and the design:

  • If Date and PersonId values duplicate for a row, do we omit by default?
  • If Date and PersonId values duplicate for a row, do we check for value match / mismatches?
  • If variable names do not fully match (e.g. one dataset has more org data, should they auto-fill based on joining PersonId or should they populate as missing values?)
  • If the variable names do not fully match - esp. in the case of metrics - (e.g. one set of data has Unscheduled_call_hours, and the other set does not) should we issue a warning? If not, the output could be misleading.
  • Should the datasets be supplied as a list? Or should we only compare data_x and data_y, and then inform the user to use purrr::reduce() if they have more datasets to join?

@martinctc martinctc added the spike enhancements that would take longer to implement label May 17, 2021
@martinctc martinctc changed the title combine_wpa: a function to join WpA person queries Feature request: combine_wpa() - a function to join WpA person queries May 17, 2021
@moralec
Copy link
Contributor Author

moralec commented May 17, 2021

I was thinking this more as a join (ie. combining hourly collaboration query and standard person query ) than an append. But it could work either way.

We can take the most conservative approach possible

@martinctc martinctc added this to To do in v1.7.0 May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spike enhancements that would take longer to implement
Projects
v1.7.0
To do
Development

No branches or pull requests

2 participants