-
Notifications
You must be signed in to change notification settings - Fork 48
Processing DynamoDB CSVs
Jack Brookes edited this page Mar 8, 2021
ยท
2 revisions
(Page WIP)
You can download your data in CSV format using DynamoDB. However, for some types of data, your data may not appear to be in the correct format. For example, for Movement data (collected using the Tracker system), row contains all data for that trial. We want to expand the data so that 1 row represents one timestep. Additionally, some datapoints are prefixed by the data type by DynamoDB. E.g., an observation of "hello!"
may look like {"S": "hello!"}
in your CSV. This is encoded as a json
format, and we can write code to parse this json
string and get out the data we want.
Here is an example for the Tracker data:
library(jsonlite) # need these packages
library(tidyverse) # need these packages
my_data <- read_csv("UXFData.basic_example.Trackers.csv")
my_data_processed <- my_data %>%
rowwise() %>% # row by row
mutate(across(
!(`ppid_session_dataname (S)`:`trial_num (N)`), # all pos, rot, time columns, NOT first two
~ list(as.numeric(jsonlite::fromJSON(.)[[1]])) # extract 1st element, which is the data vector, and convert to numeric
)) %>%
ungroup() %>%
unnest(`pos_x (L)`:`time (L)`)
write_csv(my_data_processed, "UXFData.basic_example.Trackers_processed.csv")
๐ง Core topics
- ๐ Background
- โจ UXF 2.0
- โ๏ธ Compatibility
- ๐ถ๏ธ Oculus Quest Setup
- ๐ญ Concepts
- ๐ ๏ธ Get started
- ๐ Examples
- ๐ฅ๏ธ Built-in UI
- ๐ Session generation
- โฐ Events
- ๐ Data collection
- โ๏ธ Collect custom data
- ๐ Custom Data Handler
- ๐ Remote Data Collection
- ๐๏ธ WebGL DynamoDB setup
- ๐ Processing DynamoDB CSVs
- ๐ซ HTTP Post Setup
- ๐ง Settings system
- ๐๐ฝ Tracker system
- ๐ Logging system
โ ๏ธ Common issues- ๐ผ๏ธ Multi-scene experiments
- ๐บ Videos
- ๐จโ๐ Full written tutorial
- ๐ฆ Asset links
- ๐จโ๐ซ Unity tutorial links
- ๐ Useful code snippets
- ๐ก Programming ideas
- ๐งฎ Example R processing