Data as objects and architectures#

The question and the claim#

Data structure encodes the unit of observation. Tidy tables put variables in columns and observations in rows, but the observational unit must be defined first. Long and wide are shapes, not automatic guarantees of tidiness or correctness.

What you should be able to do#

  • Specify the scientific target and the observations needed to address it.

  • Document keys, units, missing-value codes, and table relationships. Demonstrate a key check and a row-count check.

  • Explain the assumptions, uncertainty, and limits of your conclusion.

Worked investigation#

Separate trial, participant, and item tables; join item attributes to trials and detect a duplicate key that multiplies rows. The worked notebook is self-contained and uses documented teaching data. Its output is evidence about that example, not a finding about a human population.

Challenge the result#

A join that silently duplicates trials changes the weighting of observations and can create false precision. Before running an analysis, predict what this failure would change. After running it, distinguish a software check from a scientific justification.

Practice and verification#

Complete the exercise, then discuss the interpretation questions. Submit a runnable notebook, your assumptions, and a short evidence-based interpretation. The shared analysis workflow defines the reporting and assessment standard.

For AI assistance, first write your own target and expected behavior. Use generated suggestions as candidates, inspect the code or claims, and retain evidence of the checks you performed. The AI analysis guide includes a saved-output activity that requires no account or paid service.

Connection across lessons#

The hypothesis determines the observational unit; data-quality checks protect that unit during transformation.

Earlier lecture resources#

The recordings and slides below are retained from the earlier course edition and have not been revised. Use the written chapter, revised notebook, and exercise for current definitions and procedures; earlier examples may conflict with the corrections described here.

Required readings#

Wickham, H. (2014). Tidy data. Journal of Statistical Software, 59(10), 1-23.

Gorgolewski, K. J., Auer, T., Calhoun, V. D., Craddock, R. C., Das, S., Duff, E. P., … & Handwerker, D. A. (2016). The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments. Scientific data, 3(1), 1-9.

Supplemental reading: Wickham, H., & Grolemund, G. (2016). R for data science: import, tidy, transform, visualize, and model data. “ O’Reilly Media, Inc.”.

Lecture (Video)#

Data as objects and architectures

Slides (PDF)#

Data as objects and architectures