MTurkR > Home
Amazon Mechanical Turk (MTurk) is a crowdsourcing platform that provides researchers and developers with the ability to leverage human intelligence for tasks that cannot easily be automated. The MTurkR package provides access to the MTurk Requester API via authenticated HTTP requests executed with RCurl and a number of functions to translate API calls into R data structures (using the XML package).
You can also find the latest development version of the package on GitHub.
- Free, open-source (GPL-2)
- MTurkR was built under R for Windows, but should be platform-independent
- Access to full functionality of MTurk (more functionality than Requester UI or MTurk command-line tools)
- A sophisticated graphical user interface (GUI) for managing most MTurk operations through R
- Access, approve, and reject assignments and automatically convert MTurk assignment data to R dataframes
- Create and manage Qualifications and assign them to MTurk workers in a variety of ways (see some example R code and associated .xml files (1, 2) for creating a Qualification Test and AnswerKey).
- Pay bonuses, contact workers via email, and restrict HITs (to manage panels, for example)
- Automatically log all MTurk requests for later reference (in a .tsv in your working directory, or another location)
- Access to live MTurk server and MTurk Sandbox for practicing with code
- Visit the Amazon Mechanical Turk Blog
- For help from workers or to advertise HITs/recruit workers, visit MTurk Forum or the MTurk subreddit
- For feedback on you and your HITs from workers, visit TurkOpticon or retrieve your reviews directly in R.
- Check out the MTurkR documentation on CRAN
- Post your question on Stack Exchange or the AWS Developer Forum
- Comments, feedback, bug reports, and suggestions on MTurkR are also welcome via email and on GitHub
- You can also follow the development of MTurkR on GitHub
MTurkR Code Examples
- Examples in an introductory article: "Crowdsourcing with R and the MTurk API" in The Political Methodologist 20(1):2-7.
- Examples from a blog post by Solomon Messing: "Streamline Your Mechanical Turk Workflow with MTurkR"
- Sample code to create and manage qualifications, with associated xml files for QuestionForm and AnswerKey
- Workflow and sample code to mimic the Requester UI's display of input HITLayout parameters with assignment results.
Below code can be used and modified in order to randomize or restrict access to HITs. Some of the code may be useful in combination and is presented here as simple examples. The code is made available here to assist requesters in streamlining the HIT creation process (e.g., piping the WorkerId to an off-site tool, randomizing) and avoid common mistakes (e.g., allowing workers to complete multiple HITs, constructing multiple separate assignments for conditions because randomization is thought impossible, rejecting workers for completing studies they have worked on previously, and so forth).
- urlpipe (view as .html): Pipe MTurk parameters (AssignmentId, HITId, WorkerId) to off-site survey tool
- randomlink (view as .html): Randomize workers to condition (e.g., a link to a survey)
- nonrandomlink (view as .html): Nonrandomly assign workers to condition based on MTurk WorkerID (e.g., to create different versions of multi-assignment HITs for different workers)
- workercheck (view as .html): Allow workers to check whether they are ineligible to complete a HIT (e.g., because they completed a similar study previously)
- softblock (view as .html): “Soft block” workers by preventing them from seeing the link to an off-site survey. (Better functionality is provided by the MTurk RUI and API, which can prevent workers from even seeing the HIT in the first place, but this is a relatively simple hack.)