Skip to content

Commit

Permalink
Clean Q1
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnPallemaerts committed Jan 8, 2025
1 parent b82512b commit 999e7ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Interim/dummy_question1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
respondent_id;question;response
114762892402;What country/countries are your activities based in? Multiple answers are possible.;Belgium
114761515324;What country/countries are your activities based in? Multiple answers are possible.;Belgium
114761515324;What country/countries are your activities based in? Multiple answers are possible.;Sweden
114761515324;What country/countries are your activities based in? Multiple answers are possible.;Plopsaland
114761370340;What country/countries are your activities based in? Multiple answers are possible.;North Macedonia
114761370340;What country/countries are your activities based in? Multiple answers are possible.;Norway
114761367399;What country/countries are your activities based in? Multiple answers are possible.;Andorra
114761367399;What country/countries are your activities based in? Multiple answers are possible.;Bulgaria
114761367399;What country/countries are your activities based in? Multiple answers are possible.;Liechtenstein
114761357836;What country/countries are your activities based in? Multiple answers are possible.;Norway
12 changes: 9 additions & 3 deletions Script/1-data-prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ remove(i, name, question)
# Get survey ID

```{r}
surv <- surveymonkey::browse_surveys(title = "Indentifying data sharing issues regarding camera trap data in Europe -- dummy version",
oauth_token = token)
survID <- c(surv$id)
Q1 <- q1 %>%
pivot_longer(!respondent_id, names_to = "long_answer", values_to = "response") %>%
filter(!is.na(response)) %>%
mutate(question = qs$question[qs$code == "q1"]) %>%
mutate(nchar = nchar(question)) %>%
mutate(long_answer = substring(long_answer, nchar + 4)) %>%
select(respondent_id, question, response) %>%
write_csv2("./Interim/dummy_question1.csv")
remove(q1)
```

# Get the whole survey
Expand Down

0 comments on commit 999e7ff

Please sign in to comment.