ropensci / qualtRics

Download ⬇️ Qualtrics survey data directly into R!
https://docs.ropensci.org/qualtRics
Other
215 stars 70 forks source link

Max 100 obs. with getSurveys #18

Closed Drittij closed 7 years ago

Drittij commented 7 years ago

Hi Jasper,

It seems the getSurveys option stops at 100 observations. Is it possible to adjust this? We have a lot more, and I also don't know how it selects the 100 that do show up.

Kind regards, Daniël

JasperHG90 commented 7 years ago

Hi Daniël,

Thanks for notifying me of this. I've updated getSurveys on the development branch to cycle through the pages if the number of surveys total more than 100. You can install this version using devtools::install_github("JasperHG90/qualtRics", ref="development").

Let me know if that solves the issue.

Best,

J.

Drittij commented 7 years ago

Thanks for the fast reply. This solved the issue!

We have around 6000 surveys in our database at the moment, so this makes this function (obviously) a little bit slower.

A suggestion for future development is maybe adding arguments to filter on active/closed surveys or date?

JasperHG90 commented 7 years ago

Thanks for your suggestions. The qualtrics api endpoint is a bit limiting in terms of the parameters you can pass, but I've sent them an email asking them if it's possible to filter by active/inactive and dates.

Best,

J.

JasperHG90 commented 7 years ago

Response from Qualtrics support

  1. To get more results than the first 100, you would need to run a second GET request to the "nextPage" URL provided at the end of the return body when there are more than 100 results.
  2. To filter by active/not active, this would need to be programmed on your side after running the call, using the "isActive" parameter, but we cannot make the call return only active or only inactive surveys selectively.
  3. Filtering by date is also something that needs to be programmed on your side after running the call, by using the "lastModified" parameter.