virtualcommons / port-of-mars-analysis

R analysis pipeline for Port of Mars "Mars Madness" tournaments
https://portofmars.asu.edu
GNU General Public License v3.0
0 stars 0 forks source link

2022-02 data fails assertion on game roles == end player points #13

Closed alee closed 1 year ago

alee commented 1 year ago
Error: nrow(game_role) not equal to nrow(end_player_points)
In addition: Warning message:
In max(id) : no non-missing arguments to max; returning -Inf
Called from: assertthat::assert_that(nrow(game_role) == nrow(end_player_points))
Browse[1]> tournament_codebook <- tournament_codebook_create(max_game_rounds)
alee commented 1 year ago

looks like end_player_points has duplicate entries for all players in game 112 and 114 for some reason

Browse[2]> print(end_player_points, n=45)
# A tibble: 45 × 5
   gameId role         points_end survived won  
    <dbl> <chr>             <int> <lgl>    <lgl>
 1    109 Pioneer              10 FALSE    FALSE
 2    109 Politician            9 FALSE    FALSE
 3    109 Entrepreneur         11 FALSE    FALSE
 4    109 Researcher           17 FALSE    FALSE
 5    109 Curator              16 FALSE    FALSE
 6    110 Pioneer               0 TRUE     FALSE
 7    110 Politician            3 TRUE     TRUE 
 8    110 Entrepreneur          0 TRUE     FALSE
 9    110 Researcher            0 TRUE     FALSE
10    110 Curator               0 TRUE     FALSE
11    111 Pioneer               0 TRUE     FALSE
12    111 Politician            6 TRUE     FALSE
13    111 Entrepreneur          6 TRUE     FALSE
14    111 Researcher            8 TRUE     TRUE 
15    111 Curator               3 TRUE     FALSE
16    112 Pioneer               6 FALSE    FALSE
17    112 Politician            0 FALSE    FALSE
18    112 Entrepreneur          3 FALSE    FALSE
19    112 Researcher            6 FALSE    FALSE
20    112 Curator               0 FALSE    FALSE
21    112 Pioneer               6 FALSE    FALSE
22    112 Politician            0 FALSE    FALSE
23    112 Entrepreneur          3 FALSE    FALSE
24    112 Researcher            6 FALSE    FALSE
25    112 Curator               0 FALSE    FALSE
26    113 Pioneer               0 FALSE    FALSE
27    113 Politician            8 FALSE    FALSE
28    113 Entrepreneur          9 FALSE    FALSE
29    113 Researcher            3 FALSE    FALSE
30    113 Curator               6 FALSE    FALSE
31    114 Pioneer               0 FALSE    FALSE
32    114 Politician            6 FALSE    FALSE
33    114 Entrepreneur          9 FALSE    FALSE
34    114 Researcher            3 FALSE    FALSE
35    114 Curator               6 FALSE    FALSE
36    114 Pioneer               0 FALSE    FALSE
37    114 Politician            6 FALSE    FALSE
38    114 Entrepreneur          9 FALSE    FALSE
39    114 Researcher            3 FALSE    FALSE
40    114 Curator               6 FALSE    FALSE
41    115 Pioneer               0 FALSE    FALSE
42    115 Politician            0 FALSE    FALSE
43    115 Entrepreneur          0 FALSE    FALSE
44    115 Researcher            3 FALSE    FALSE
45    115 Curator               0 FALSE    FALSE