Coder Social home page Coder Social logo

simon-lenau / prolific.api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.09 MB

R-package for creating and managing studies on the Prolific platform (https://www.prolific.co)

License: GNU General Public License v3.0

R 100.00%
crowd-sourcing crowdsourcing-experiments crowdsourcing-platforms empirical-research participants r sampling

prolific.api's People

Contributors

simon-lenau avatar

Watchers

 avatar

prolific.api's Issues

access "studies" endpoint fails, but used to work.

Problem: access "studies" endpoint fails, but used to work. Error messages for as_list TRUE and FALSE are shown.

prolific_api_access <- api_access(api_token = Sys.getenv('token'))

access(
prolific_api_access,
endpoint = "studies",
method = "get",
as_list = TRUE
)

Warning: Some columns are a multi-column type (such as a matrix column): [7]. setDT will retain these columns as-is but subsequent operations like grouping and joining may fail. Please consider as.data.table() instead which will create a new column for each embedded column.Error in data.table::setDT(output) :
All elements in argument 'x' to 'setDT' must be of same length, but the profile of input lengths (length:frequency) is: [2:1, 76:14]
The first entry with fewer than 76 entries is 7

access(
prolific_api_access,
endpoint = "studies",
method = "get",
as_list = FALSE
)

Error in output$results : $ operator is invalid for atomic vectors

Suggestion: Vignette description for exporting demographic data

One of my main use cases for the package was to be able to download the participants' demographic data into R. It would be great to add an example of how to do this to a vignette. I figured it out from the API documentation. This is the approach I used:

api <- api_access(api_token = "<your_api_token>")
demo <- api$access(
  endpoint = c("studies", "<your_study_id>", "export"),
  method = "get"
)
demo_df <- read.csv(text = demo)

Invalid API token?

I loaded the prolific.api package and used api_access(api_token = "X") where X is the API token generated on my workspace Settings page. I get back the error "API token status: invalid API access failed!". Am I doing something wrong, or has the API changed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.