Right now, there are pipeline stages that combine the user input with the cleaned trip objects to create confirmed trips.
A sample confirmed trip object from the master/ceo_ebike_program branch looks like
After https://github.com/asiripanich/emdash/pull/23, which includes setnames(gsub("user_input", "", names(.))) %>%, the mode_confirm, purpose_confirm and replaced_mode entries automagically show up in the trip table.
But now I want to have a column in the participant table with the number of unlabeled trips.
For now, I have implemented (in my fork alone)
.[is.na(mode_confirm), .(unconfirmed = .N), by = user_id]
But not everybody is going to use the mode_confirm object, in particular, the travel survey folks will want to potentially have a more complex object.
In python, I do ct_df_confirmed = ct_df[ct_df.user_input != {}], which does not use any field names, but I don't know how to implement a similar check in R.
@asiripanich you asked me to file an issue with the details, and I did 😄
Right now, there are pipeline stages that combine the user input with the cleaned trip objects to create confirmed trips. A sample confirmed trip object from the master/ceo_ebike_program branch looks like
After https://github.com/asiripanich/emdash/pull/23, which includes
setnames(gsub("user_input", "", names(.))) %>%
, themode_confirm
,purpose_confirm
andreplaced_mode
entries automagically show up in the trip table.But now I want to have a column in the participant table with the number of unlabeled trips. For now, I have implemented (in my fork alone)
https://github.com/shankari/emdash/commit/735a93b12a325e491ede3eaba63adaecd59031d7#diff-4e87ef70cdab2756b9d4aa419fd97ffea60f2ec8d9592573ffee2e4ab33dcf53R162-R165
But not everybody is going to use the
mode_confirm
object, in particular, the travel survey folks will want to potentially have a more complex object.In python, I do
ct_df_confirmed = ct_df[ct_df.user_input != {}]
, which does not use any field names, but I don't know how to implement a similar check in R.@asiripanich you asked me to file an issue with the details, and I did 😄