Learn R Programming

MTurkR (version 0.2)

GetStatistic: MTurk Worker and Requester Statistics

Description

Get a requester statistic or a statistic for a particular worker. RequesterReport and WorkerReport provide wrappers that return all available statistics.

Usage

GetStatistic(	statistic, period = "LifeToDate", count = NULL, 
				keypair = credentials(), print = TRUE, browser = FALSE, 
				log.requests = TRUE, sandbox = FALSE)
RequesterReport(period = "LifeToDate", keypair = credentials(), 
				log.requests = TRUE, sandbox = FALSE, print = TRUE)

GetWorkerStatistic(	worker, statistic, period = "LifeToDate", count = NULL, 
					keypair = credentials(), print = TRUE, browser = FALSE, 
					log.requests = TRUE, sandbox = FALSE)
WorkerReport(	worker, period = "LifeToDate", 
				keypair = credentials(), log.requests = TRUE, 
				sandbox = FALSE, print = TRUE)

Arguments

worker
A character string containing a WorkerId.
statistic
A character string containing the name of a statistic. Statistics can be retrieved from ListStatistics.
period
One of: OneDay, SevenDays, ThirtyDays, LifeToDate. Default is LifeToDate.
count
If period="OneDay", the number of days to return. Default is 1 (the most recent day).
keypair
A two-item character vector containing an AWS Access Key ID in the first position and the corresponding Secret Access Key in the second position. Set default with credentials.
print
Optionally print the results of the API request to the standard output. Default is TRUE.
browser
Optionally open the request in the default web browser, rather than opening in R. Default is FALSE.
log.requests
A logical specifying whether API requests should be logged. Default is TRUE. See readlogfile for details.
sandbox
Optionally execute the request in the MTurk sandbox rather than the live server. Default is FALSE.

Value

  • A dataframe containing the requested Statistic (and WorkerId, if GetWorkerStatistic or WorkerReport are called), and the value thereof. GetStatistic and GetWorkerStatistic return only the requested statistic. RequesterReport and WorkerReport return all of the requester and worker statistics, respectively, that are available in ListStatistics.

Details

Retrieve a specific requester or worker statistic. The list of available statistics can be retrieved by calling ListStatistics. Useful for monitoring workers or one's own use of the requester system. statistic() is an alias for GetStatistic. workerstatistic() is an alias for GetWorkerStatistic.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetRequesterStatisticOperation.html{API Reference: Requester Statistics} http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetRequesterWorkerStatisticOperation.html{API Reference: Worker Statistics}

See Also

ListStatistics

Examples

Run this code
GetStatistic("NumberHITsSubmitted","OneDay")
RequesterReport("ThirtyDays")
GetWorkerStatistic("A1RO9UJNWXMU65","PercentHITsApproved","LifeToDate")
WorkerReport("A1RO9UJNWXMU65","SevenDays")

Run the code above in your browser using DataLab