Rsurveygizmo: An R package for interacting with the Survey Gizmo API

[This article was first published on R from Stata, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Several years ago our team began using SurveyGizmo for our online surveys (and, actually, a bunch of other projects as well, from polls to data entry templates). At the time, SurveyGizmo provided a nice balance between cost and customization when compared to similar products from, e.g., Qualtrics and SurveyMonkey. Over the years SurveyGizmo has greatly expanded the kinds of user customization and tweaking that is possible, particularly in the area of API calls. Because we mostly work in R, I decided to write a package that accesses the SurveyGizmo API directly so that survey and email campaign data can be pulled directly within a project script (as opposed to manually downloading the data from the webpage).

Some usage examples for this package follow. To really test it out you will need to supply your private SurveyGizmo API key and a valid numeric survey id. There are many more function options outlined in the package help files than are presented below for those who’d like to learn more.

# Download a "regular" survey with no email campaign data,
# keeping only complete responses:
api <- "your_api_key_here"
a_survey <- pullsg(your_survey_id_here, api, completes_only=T) 

# Download all email campaign data for a particular survey:
a_campaign <- pullsg_campaign(your_survey_id_here, api) 

# Combine the previous steps in one function:
# 1. download email campaign 
# 2. merge it, where possible, with a survey response 
a_survey_with_campaign <- pullsg(your_survey_id_here, api, mergecampaign=T)

If you’d like to give the package a spin you can visit the Github repository or install directly within R:

library(devtools)
install_github(repo="DerekYves/rsurveygizmo")

I hope this package is helpful to somebody, and feel free to drop me an email or post to the repository if you have any questions or suggestions for improvement! Many, many thanks to Ari Lamstein for teahing me the ropes of R package development and the wonders of Roxygen.

To leave a comment for the author, please follow the link and comment on their blog: R from Stata.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)