Learn R Programming

⚠️There's a newer version (0.8.0) of this package.Take me there.

R Client for the MTurk Requester API

MTurkR provides programmatic access to the crowdsourcing functionality of the Amazon Mechanical Turk (MTurk) Requester API.

Amazon provides a helpful chart for deciding whether an API client (like MTurkR) is useful for yor project.

Possible applications of the package include:

  • Survey or experimental research using MTurk workers as human subjects
  • Large-scale human coding or categorization of text, images, video, audio, or other files
  • Collection of unstructured data from the web
  • Audio and video transcription
  • Preprocessing of "messy" data prior to statistical procedures

The MTurkR documentation files contain minimal examples for all functions. Further examples of how to use MTurkR are provided in the MTurkR GitHub wiki. Users can contribute their own examples or further documentation there, or via pull requests to the GitHub repository.

Using MTurkR requires setting two environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. These can be specified on the command-line when initializing one's R session, using Sys.setenv() within R, or by placing these values in an .Renviron or Rprofile.site file. (Note: this functionality is a more secure replacmeent of the use of the credentials() function or options("MTurkR.keypair") from earlier versions of MTurkR.)

As a supplemental feature to MTurkR, there is also a graphical user interface available for the package. A simple, command-line version of this is available using the wizard.simple() function in MTurkR. A more advanced GUI, built using Tcl/tk is available in MTurkRGUI package.

If you experience problems using MTurkR, you can:

Installation

To install the latest version from CRAN, simply use:

install.packages("MTurkR")

To install the latest development version of MTurkR from GitHub:

# latest stable version
install.packages("MTurkR", repos = c(getOption("repos"), "http://cloudyr.github.io/drat"))

# latest (unstable) version from GitHub
if(!require("ghit")){
    install.packages("ghit")
}
ghit::install_github("leeper/MTurkR")

Copy Link

Version

Monthly Downloads

104

Version

0.7.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Thomas J. Leeper

Last Published

May 23rd, 2019

Functions in MTurkR (0.7.0)

RejectAssignment

Reject Assignment
DisposeHIT

Dispose HIT
MTurkR-package

R Client for the MTurk Requester API
ApproveAssignment

Approve Assignment(s)
GetAssignment

Get Assignment(s)
UpdateQualificationScore

Update a worker's score for a QualificationType
CreateQualificationType

Create QualificationType
Use Case: Categorization

Use Case: Categorization
GetQualificationRequests

Get Qualification Requests
GetHITsForQualificationType

Get HITs by Qualification
request

Execute an MTurk API Request
SearchQualificationTypes

Search QualificationTypes
CreateHIT

Create HIT
DisableHIT

Disable HIT
GenerateExternalQuestion

Generate ExternalQuestion
AccountBalance

Retrieve MTurk account balance
GenerateReviewPolicy

Generate HIT and/or Assignment ReviewPolicies
ExpireHIT

Expire HIT
GenerateQualificationRequirement

Generate QualificationRequirement
GetBonuses

Get Bonus Payments
GenerateNotification

Generate Notification
GrantQualification

Grant/Reject Qualification Request
ChangeHITType

Change HITType Properties of a HIT
RevokeQualification

Revoke a Qualification from a Worker
SearchHITs

Search your HITs
GetStatistic

MTurk Worker and Requester Statistics
GenerateHITLayoutParameter

Generate a HITLayout Parameter
GenerateHTMLQuestion

Generate HTMLQuestion
DisposeQualificationType

Dispose QualificationType
ContactWorker

Contact Worker(s)
Miscellaneous

Convenience Functions and RUI Interaction
credentials

Specify AWS Credentials
GenerateHITsFromTemplate

Generate HITs from a Template
GetReviewableHITs

Get Reviewable HITs
Blocking Workers

Block/Unblock Worker(s)
RegisterHITType

Register a HITType
readlogfile

Read the MTurkR Logfile
Use Case: Surveys

Use Case: Surveys
GetFileUpload

Get Files Uploaded by Workers
GenerateAnswerKey

Generate AnswerKey Data Structure
BulkCreate

Generate Multiple HITs
AssignQualification

Assign Qualification
GetReviewResultsForHIT

Get ReviewPolicy Results for a HIT
GetQualifications

Get Qualifications
Use Case: Scraping

Use Case: Scraping
GrantBonus

Pay Bonus to Worker
SetHITAsReviewing

Set HIT as “Reviewing”
ExtendHIT

Extend HIT
SendTestEventNotification

Test a Notification
GetQualificationScore

Get a Worker's Qualification Score
UpdateQualificationType

Update a Worker QualificationType
SetHITTypeNotification

Configure a HITType Notification
GetHIT

Get HIT
wizard.simple

Interactive MTurkR Mode
Use Case: Sentiment Analysis

Use Case: Sentiment Analysis
XML

Parse MTurk XML to Dataframe
seconds

Convert arbitrary times to seconds
GetQualificationType

Get QualificationType