library(tidyverse)
library(stringr)
library(knitr)
library(tmasc)
opts_chunk$set(warning = F)
theme_set(theme_bw() + theme(panel.grid = element_blank()))

dreamjournal is a data set of written dream reports.

What is Dream Journal?

"Dream Journal is a free service that allows you to create and customize your very own online dream journal. You may update your dream journal as often as you'd like. Your journal may be kept private for your own viewing, or be made public. We only display the information you want displayed. It's free, it's fun, and it's easy to use!"

tmasc::dreamjournal

The dreamjournal data set in tmasc contains written reports of r nrow(dreamjournal) dreams, in a tidy tibble ready for text mining, visual, and statistical analyses in R (or other software.)

library(tmasc)
data(dreamjournal)
head(dreamjournal)

dreamjournal has "metadata" associated with each dream, including

In addition to these, many dreams are logged with tags and keywords, listed as themes, settings, characters, emotions, activities, and keywords. Each of these columns is a list-column of character vectors, because users could report multiple tags in each category.

Overview of the data

Year

Many, but not all, of the reports contain a timestamp of the year of the experience. Some of these timestamps are also wildly inaccurate (or people have been time-traveling to log their dreams.)

dreamjournal %>%
    ggplot(aes(x=date)) +
    geom_histogram(bins=200)

Dreams

Here's a sampling of a few short dream reports:

dreamjournal %>%
    filter(rating == 100) %>%
    mutate(n = nchar(text)) %>%
    filter(between(n, 140, 160)) %>%
    arrange(n) %>%
    select(dream, views, text) %>%
    kable()

Of course, most dreams are much longer:

dreamjournal %>%
    mutate(text_length = nchar(text)) %>%
    ggplot(aes(x=text_length)) +
    geom_histogram(binwidth=50) +
    coord_cartesian(xlim = c(0, 20000))

Further Reading



mvuorre/tmasc documentation built on Oct. 25, 2019, 8:56 p.m.