port-of-mars-analysis

R analysis pipeline for Port of Mars "Mars Madness" tournaments

https://github.com/virtualcommons/port-of-mars-analysis

Science Score: 75.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
    Organization virtualcommons has institutional domain (complexity.asu.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.3%) to scientific vocabulary

Keywords

behavioral-experiments collective-action computationa-social-science data-analysis
Last synced: 6 months ago · JSON representation ·

Repository

R analysis pipeline for Port of Mars "Mars Madness" tournaments

Basic Info
  • Host: GitHub
  • Owner: virtualcommons
  • License: gpl-3.0
  • Language: R
  • Default Branch: main
  • Homepage: https://portofmars.asu.edu
  • Size: 136 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 8
  • Releases: 2
Topics
behavioral-experiments collective-action computationa-social-science data-analysis
Created almost 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

port-of-mars-analysis

DOI

R analysis pipeline for Port of Mars "Mars Madness" tournament data from 2021/2022 archived at https://osf.io/vjcpe/

Originally written by Calvin Pritchard with use cases driven by Marco Janssen. Subsequent contributions from Kelly Claborn, Christine Nguyen, Raksha Balakrishna, and Allen Lee.

Layout of tournament round input files

NOTE: this is subject to change as the workflow is refined.

The 1, 2, 3 below refer to the tournament round, e.g., 1st, 2nd, 3rd, round of the tournament etc.

An input tournament_dir of "2021-11" should have games/ and surveys/ directories with additional raw-ish data files organized like the diagram below:

input ├── 2021-11 │   ├── games │   │   ├── 1 │   │   │   ├── processed │   │   │   │   ├── accomplishment.csv │   │   │   │   ├── chatMessages.csv │   │   │   │   ├── gameEvent.csv │   │   │   │   ├── marsEvent.csv │   │   │   │   ├── marsLog.csv │   │   │   │   ├── player.csv │   │   │   │   ├── playerInvestment.csv │   │   │   │   └── victoryPoint.csv │   │   │   └── raw │   │   │   └── playerInvestment.csv │   │   └── 2 │   │   ├── processed │   │   │   ├── accomplishment.csv │   │   │   ├── chatMessages.csv │   │   │   ├── gameEvent.csv │   │   │   ├── marsEvent.csv │   │   │   ├── marsLog.csv │   │   │   ├── player.csv │   │   │   ├── playerInvestment.csv │   │   │   └── victoryPoint.csv │   │   └── raw │   │   └── playerInvestment.csv │   └── surveys │   ├── post.csv │   ├── pre-after-round1.csv │   ├── pre.csv │   └── README.md ├── 2022-02 │   ├── games │   │   ├── 1 │   │   │   ├── processed │   │   │   │   ├── accomplishment.csv │   │   │   │   ├── chatMessages.csv ...

Manual processing needed to download the tournament + survey data and set up a filesystem structure that matches the above. Data freshly exported from the port of mars server via the dump.sh script need to be merged with survey data exported via Qualtrics and placed in a surveys/ directory relative to the root YYYY-MM date directory as shown above.

Surveys should be exported from Qualtrics by going to the Data & Analysis tab and clicking on Export & Import -> Export Data. Make sure the option Use numeric values is selected in the Download options modal e.g.,

image

File renames:

  • initial pregame survey should be renamed pre.csv
  • post-game survey should be renamed post.csv
  • pre-game survey after Round 1 should be named pre-after-round1.csv

All data files archived at OSF should be able to processed via the following steps when extracted into the input/ directory (exceptions must be noted in the dataset metadata).

Running the Workflow

  • Launch RStudio
  • File -> Open project -> port-of-mars-analysis.Rproj
  • After opening the R project file, edit R/main.R and change line 7: tournament_dir <- "2021-03" to match the output directory e.g. "2022-02"
  • Run main.R

image

Verify data files placed in output/ manually. A sanity check that compares expected outputs given initial inputs or some other kind of automated validation or test harness would be ideal but this is currently deferred until we have additional support to refactor this code.

Requirements

You will need a recent version of R and RStudio Desktop with tidyverse installed (install.packages("tidyverse")).

(NOTE: currently unable to install on macOS with apple M1/M2 chip)

Important Notes / Troubleshooting

Do not save .Rdata if given dialog prompts to do so. Caching of .Rdata may cause unexpected problems when generating output csv files.

Owner

  • Name: ASU Center for Behavior, Institutions, and the Environment
  • Login: virtualcommons
  • Kind: organization
  • Email: cbie@asu.edu
  • Location: Arizona State University

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Port of Mars R Analysis Pipeline
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Calvin
    family-names: Pritchard
    email: pritchard.calvin@gmail.com
    orcid: 'https://orcid.org/0000-0002-4557-8602'
  - given-names: Kelly
    family-names: Claborn
    orcid: 'https://orcid.org/0000-0003-3799-1605'
    email: kelly.claborn@asu.edu
    affiliation: 'https://ror.org/03efmqc40'
  - given-names: Raksha
    family-names: Balakrishna
    email: raksha.balakrishna@asu.edu
    affiliation: 'https://ror.org/03efmqc40'
  - given-names: Christine
    family-names: Nguyễn
    email: Christine.N.Nguyen@asu.edu
  - given-names: Allen
    family-names: Lee
    email: allen.lee@asu.edu
    affiliation: 'https://ror.org/03efmqc40'
    orcid: 'https://orcid.org/0000-0002-6523-6079'
  - given-names: Marco
    family-names: Janssen
    email: marco.janssen@asu.edu
    affiliation: 'https://ror.org/03efmqc40'
    orcid: 'https://orcid.org/0000-0002-1240-9052'
identifiers:
  - type: doi
    value: 10.5281/zenodo.6462509
    description: Corresponding Port of Mars server code
repository-code: 'https://github.com/virtualcommons/port-of-mars'
url: 'https://portofmars.asu.edu'
abstract: >-
  R analysis pipeline for Port of Mars "Mars Madness"
  2021/2022 tournaments 
license: GPL-3.0-or-later
date-released: '2023-01-28'

GitHub Events

Total
Last Year