GithubHelp home page GithubHelp logo

a-paxton / plotting-coupled-data Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 633 KB

Visualize coupled categorical and continuous variables in a single plot (e.g., movement and speech state)

License: MIT License

R 100.00%
plotting time-series speech-data movement-data visualization greyscale-figure color-figure journal-article coupled-data categorical-data binary-data continuous-data

plotting-coupled-data's Introduction

Plotting coupled categorical and continuous time series data

This code plots coupled categorical and continuous time series in a single, elegant plot. It was originally created to visualize speech (categorical; speaking or silent) and movement (continuous; see Paxton & Dale, 2013, Behavior Research Methods) between two people engaged in conversation. The code includes sections to create color and greyscale plots.

Color Figure

alt text

Greyscale Figure

alt text

Adapting this code

The code as written assumes that the data are in long form -- in other words, with a single row per observation. If your data are in wide form, there are many useful R packages and tutorials to help you easily convert from wide to long form. Here are a few:

Note that any runs of the categorical variable that last only 1 sample are -- for graphing purposes only -- increased to a length of 1.1 samples in order to allow them to be plotted appropriately. (Without this increase, the start and end points for the categorical variables are identical, which would prevent the appropriate application of the shading.)

Citations

If you use or adapt this code, please cite our paper:

Tollefsen, D., Dale, R., & Paxton, A. (2013). Alignment, transactive memory, and collective cognitive systems. Review of Philosophy and Psychology, 4(1), 49-64.

plotting-coupled-data's People

Contributors

a-paxton avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.