-
Notifications
You must be signed in to change notification settings - Fork 1
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
Multiple type = value pairs in waarneming
#23
Comments
A possible solution would be to first separate longer on the delimiter For example: raw_data %>%
separate_longer_delim(cols = Waarneming, delim = "; ") %>%
separate_wider_delim(cols = Waarneming, delim = " = ", names = c("waarneming_type","waarneming_kwaliteit")) %>%
mutate(waarneming_kwaliteit = as.numeric(stringr::str_extract(waarneming_kwaliteit,"[0-9]+"))) Currently rows with multiple records for input_data %<>%
filter(is.na(.data$waarneming) |
!str_detect(.data$waarneming, pattern = "; ")) It's not clear to me why rows where |
And we could do the same for |
Actually we already use pipe separation for this in
|
Currently
|
There are some occurrences with multiple
type
=value
pairs in columnwaarneming
. Example:"Secundair nest vastgesteld = 1; Primair nest vastgesteld = 1; Grootte van het nest = 15; Hoogte van het nest = 8;"
It means that the splitting by
=
chunk should be preceded by apivot_longer()
maybe. But no fast idea how to map all the information when we have multiple inputs. The height and the size of the nest, for example, are something for the measurementOrFacts extensions? And what to do when info about both primary and secundary nests is available?The text was updated successfully, but these errors were encountered: