GithubHelp home page GithubHelp logo

Comments (4)

MarcoAJanssen avatar MarcoAJanssen commented on September 26, 2024 1

We did not change the surveys

from port-of-mars-analysis.

alee avatar alee commented on September 26, 2024

I dug a little deeper and it looks like this is an issue with dplyr version 1.1.0 changing the behavior of union_all to require that the two dataframes being unioned have the same shape. (changelog: https://github.com/tidyverse/dplyr/releases/tag/v1.1.0)

  dplyr::union_all(
      r1,
      r2plus
  )

Here I believe Calvin's code is is attempting to unify the survey results from round 1 (pre + post) and round 2+ but the union_all now fails. There's probably an easy fix for this but would be faster for some R experts like @kaclaborn to take a look at the code in survey.R and suggest patches / refactoring.

I did try changing the union_all to a full_join or row_bind naively thinking it would be equivalent but no dice.

  dplyr::full_join(
      r1,
      r2plus,
      by = survey_join_keys
  )

This causes a downstream failed assertion Error: nrow(game_tournament) not equal to nrow(survey_tournament) which I vaguely recall from previous runs.

Switching to an older version of dplyr is another option but currently challenging because of all of the other package dependencies that need to be included and RStudio's tendencies to install the latest version of things. Still that's pretty much the next avenue to explore using Docker images at https://hub.docker.com/r/rocker/tidyverse/tags

from port-of-mars-analysis.

alee avatar alee commented on September 26, 2024

root cause: https://github.com/virtualcommons/planning/issues/62

from port-of-mars-analysis.

sgfost avatar sgfost commented on September 26, 2024

The script will also get tripped up on duplicate survey records for a participant at this assertion:

  assertthat::assert_that(nrow(game_tournament) == nrow(survey_tournament))

survey_tournament will have additional rows for each dupe

In the 2023-10 dataset there's one instance of two post surveys recorded for one participant (inviteId = 1397) with the first being completed and the second only started several days later for some reason

Definitely something to handle within the script so I think we can just select the more complete (or newest if same completion %) one

from port-of-mars-analysis.

Related Issues (14)

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.