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

Convert data from answercode to answer #21

Closed
SanderDevisscher opened this issue Nov 16, 2023 · 7 comments · Fixed by #26
Closed

Convert data from answercode to answer #21

SanderDevisscher opened this issue Nov 16, 2023 · 7 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@SanderDevisscher
Copy link
Collaborator

SanderDevisscher commented Nov 16, 2023

Currently fields of fieldtype == "select" or "radio" (maybe also others) contain a code related to their answer in the output of get_records. It would be usefull to have the actual answers instead.
The actual answers can be found in the "options" column of get_fields "fields" slot.
There is no data column present to link the answer with the answer code.

Pay attention: the content of the column "fieldlabel" is not snakecase while the column names from get_records are!
Pay attention: some select/radio columns from get_records are of class "list" these merit a different approach!

Some testing from myself:
https://github.com/inbo/aspbo/blob/ae995deb42686abc644d6e02f290f78c4204d1d8/src/get_data_from_iAsset.Rmd#L27-L49

@SanderDevisscher SanderDevisscher added the enhancement New feature or request label Nov 16, 2023
@SanderDevisscher SanderDevisscher added this to the Get a tibble out! milestone Nov 16, 2023
@SanderDevisscher SanderDevisscher changed the title Convert fields of type select and radio from answercode to answer Convert data from answercode to answer Nov 16, 2023
@PietrH
Copy link
Member

PietrH commented Nov 17, 2023

In the future, if you want to do some experimentation, you can totally do that in a branch on this repo! That'll make it easier to transplant your code into the package 😉

@PietrH
Copy link
Member

PietrH commented Nov 17, 2023

Is this vital for our first version? I would maybe move this to the v0.1 milestone

@SanderDevisscher
Copy link
Collaborator Author

The tibble is content wise very unusable without :-/

@PietrH
Copy link
Member

PietrH commented Nov 17, 2023

That is a pickle, alright, lets keep it in this milestone.

So perhaps this should have priority above the quality of life improvements on authentication?

Do you want to tackle this? Or do you want me to have a look at it?

@SanderDevisscher
Copy link
Collaborator Author

That is a pickle, alright, lets keep it in this milestone.

So perhaps this should have priority above the quality of life improvements on authentication?

Yes please

Do you want to tackle this? Or do you want me to have a look at it?

I can try but will probably loose a lot of time

@PietrH
Copy link
Member

PietrH commented Nov 27, 2023

A note, the reason the fieldlabels have changed to snakecase is because I standardize them using janitor::clean_names() so they are easier to use in R. We could get rid of this, so they are exactly the same as they are in iAsset, or even make this transformation optional.

I personally don't like spaces or other weird characters in my column names, which is why I get rid of them early on.

@PietrH
Copy link
Member

PietrH commented Nov 27, 2023

For aangeduide_bestrijder I have only one value; 2 and I see no place to recode it from. Any idea what this could mean? Are we not using this field?

@PietrH PietrH linked a pull request Nov 27, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants