-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Ugh. I hate having to add new variables by hand to the variable list every time. I think I'd like hts_validate_variable list to be more opinionated and proactive, using code I've written here:
https://github.com/RSGInc/TMR_Scripts/blob/sandag_hts/Export_tables/wave2_spring2023/016_qaqc_codebook_2023.R#L151
- Infer the location of variables in the tables of the dataset. If I provide some weirdo table, like 'linked_trip', but no column in variable_list for it, I want hts_validate_variable_list to insert a column in my variable list for linked_trip, fill it with zeros and 1s, and warn the user. See for example https://github.com/RSGInc/TMR_Scripts/blob/394d8a8f2f23d1465bdaef997579fe9ef1cb5202/Export_tables/wave2_spring2023/016_qaqc_codebook_2023.R#L90
- Ditto for multiple response columns/ creating "shared name": https://github.com/RSGInc/TMR_Scripts/blob/394d8a8f2f23d1465bdaef997579fe9ef1cb5202/Export_tables/wave2_spring2023/016_qaqc_codebook_2023.R#L134
- Ditto for column types. R is savvy about knowing whether data are date-time, quantitative, categorical, etc. Let's use that to our advantage, you'd basically have to reverse the process I'm doing here: https://github.com/RSGInc/TMR_Scripts/blob/394d8a8f2f23d1465bdaef997579fe9ef1cb5202/Export_tables/wave2_spring2023/016_qaqc_codebook_2023.R#L151
Metadata
Metadata
Assignees
Labels
No labels