blogposts

Code used to generate some blog posts.
git clone https://git.eamoncaddigan.net/blogposts.git
Log | Files | Refs | README | LICENSE

2022-07-13-instagram.Rmd (28622B)


      1 ---
      2 title: "Post types and sentiment from my Instagram feed"
      3 description: "Does Instagram spark joy? A look at what I'm seeing and how I feel while using this platform."
      4 date: 2022-07-13T12:28:22-04:00
      5 draft: False
      6 knit: (function(input, ...) {
      7     rmarkdown::render(
      8       input,
      9       output_dir = file.path(Sys.getenv("HUGO_ROOT"), "content/posts")
     10     )
     11   })
     12 output: 
     13   md_document:
     14     variant: markdown
     15     preserve_yaml: true
     16 ---
     17 
     18 ```{r setup, include=FALSE}
     19 knitr::opts_chunk$set(
     20   echo = FALSE,
     21   fig.path = file.path("figs", 
     22                        sub("\\.Rmd$", "",
     23                            basename(rstudioapi::getActiveDocumentContext()$path)),
     24                        "")
     25 )
     26 knitr::opts_knit$set(
     27   base.dir = file.path(Sys.getenv("HUGO_ROOT"), "static"),
     28   base.url = "/"
     29 )
     30 ```
     31 ```{r packages, include=FALSE}
     32 library(dplyr)
     33 library(ggplot2)
     34 library(forcats)
     35 ```
     36 ```{r data}
     37 ig_dat <- tibble::tribble(
     38          ~date, ~medium, ~sentiment,       ~poster_category, ~poster_followed,
     39   "2022-07-09", "Video",         1L,  "Business (Friend's)",             TRUE,
     40   "2022-07-09", "Photo",         2L,               "Friend",             TRUE,
     41   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     42   "2022-07-09", "Image",         1L,         "Meme account",             TRUE,
     43   "2022-07-09", "Photo",         2L,               "Friend",             TRUE,
     44   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     45   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     46   "2022-07-09", "Photo",         1L,               "Friend",             TRUE,
     47   "2022-07-09", "Video",         0L,       "Suggested post",            FALSE,
     48   "2022-07-09", "Video",         0L,         "Meme account",             TRUE,
     49   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     50   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     51   "2022-07-09", "Photo",         1L,         "Meme account",             TRUE,
     52   "2022-07-09", "Video",         1L,       "Suggested post",            FALSE,
     53   "2022-07-09", "Video",         0L,                   "Ad",            FALSE,
     54   "2022-07-09", "Video",         1L,  "Business (Friend's)",             TRUE,
     55   "2022-07-09", "Video",         1L,       "Suggested post",            FALSE,
     56   "2022-07-09", "Image",         1L,         "Meme account",             TRUE,
     57   "2022-07-09", "Video",        -1L,                   "Ad",            FALSE,
     58   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     59   "2022-07-09", "Image",         0L,         "Meme account",             TRUE,
     60   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     61   "2022-07-09", "Photo",        -2L,                   "Ad",            FALSE,
     62   "2022-07-09", "Photo",         2L,         "Organization",             TRUE,
     63   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     64   "2022-07-09", "Image",         1L,  "Business (Friend's)",             TRUE,
     65   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     66   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     67   "2022-07-09", "Photo",         0L,               "Artist",             TRUE,
     68   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     69   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     70   "2022-07-09", "Photo",         2L,               "Friend",             TRUE,
     71   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     72   "2022-07-09", "Image",         2L,               "Artist",             TRUE,
     73   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     74   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     75   "2022-07-09", "Photo",         1L,         "Organization",             TRUE,
     76   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     77   "2022-07-09", "Video",        -1L,                   "Ad",            FALSE,
     78   "2022-07-09", "Photo",         1L,         "Organization",             TRUE,
     79   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     80   "2022-07-09", "Image",         2L,               "Artist",             TRUE,
     81   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     82   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     83   "2022-07-09", "Photo",         0L,         "Organization",             TRUE,
     84   "2022-07-09", "Video",        -1L,       "Suggested post",            FALSE,
     85   "2022-07-09", "Video",        -2L,                   "Ad",            FALSE,
     86   "2022-07-09", "Photo",         2L,               "Friend",             TRUE,
     87   "2022-07-09", "Video",        -2L,       "Suggested post",            FALSE,
     88   "2022-07-09", "Photo",         1L,         "Meme account",             TRUE,
     89   "2022-07-10", "Image",         2L,               "Artist",             TRUE,
     90   "2022-07-10", "Image",         0L,         "Meme account",             TRUE,
     91   "2022-07-10", "Image",         1L,         "Meme account",             TRUE,
     92   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
     93   "2022-07-10", "Photo",         1L,               "Friend",             TRUE,
     94   "2022-07-10", "Video",         1L,               "Friend",             TRUE,
     95   "2022-07-10", "Video",         0L,       "Suggested post",            FALSE,
     96   "2022-07-10", "Image",         0L,         "Meme account",             TRUE,
     97   "2022-07-10", "Video",         1L,       "Suggested post",            FALSE,
     98   "2022-07-10", "Image",         2L,               "Friend",             TRUE,
     99   "2022-07-10", "Video",         0L,       "Suggested post",            FALSE,
    100   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    101   "2022-07-10", "Photo",         1L,               "Friend",             TRUE,
    102   "2022-07-10", "Video",        -1L,       "Suggested post",            FALSE,
    103   "2022-07-10", "Image",         1L,         "Meme account",             TRUE,
    104   "2022-07-10", "Video",        -1L,                   "Ad",            FALSE,
    105   "2022-07-10", "Video",        -1L,       "Suggested post",            FALSE,
    106   "2022-07-10", "Image",         1L,               "Friend",             TRUE,
    107   "2022-07-10", "Video",         1L,       "Suggested post",            FALSE,
    108   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    109   "2022-07-10", "Photo",         1L,         "Organization",             TRUE,
    110   "2022-07-10", "Video",         0L,       "Suggested post",            FALSE,
    111   "2022-07-10", "Photo",         0L,  "Business (Friend's)",             TRUE,
    112   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    113   "2022-07-10", "Video",        -2L,       "Suggested post",            FALSE,
    114   "2022-07-10", "Photo",         1L,         "Meme account",             TRUE,
    115   "2022-07-10", "Video",        -2L,       "Suggested post",            FALSE,
    116   "2022-07-10", "Image",        -1L,                   "Ad",            FALSE,
    117   "2022-07-10", "Image",         1L,               "Artist",             TRUE,
    118   "2022-07-10", "Video",         0L,       "Suggested post",            FALSE,
    119   "2022-07-10", "Photo",         2L,               "Friend",             TRUE,
    120   "2022-07-10", "Image",        -1L,                   "Ad",            FALSE,
    121   "2022-07-10", "Video",         1L,       "Suggested post",            FALSE,
    122   "2022-07-10", "Photo",         1L,         "Organization",             TRUE,
    123   "2022-07-10", "Video",        -2L,       "Suggested post",            FALSE,
    124   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    125   "2022-07-10", "Video",        -1L,         "Organization",             TRUE,
    126   "2022-07-10", "Video",        -2L,       "Suggested post",            FALSE,
    127   "2022-07-10", "Photo",         2L,               "Friend",             TRUE,
    128   "2022-07-10", "Video",        -1L,                   "Ad",            FALSE,
    129   "2022-07-10", "Video",        -1L,       "Suggested post",            FALSE,
    130   "2022-07-10", "Image",         1L,               "Artist",             TRUE,
    131   "2022-07-10", "Video",         1L,       "Suggested post",            FALSE,
    132   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    133   "2022-07-10", "Video",         2L,               "Friend",             TRUE,
    134   "2022-07-10", "Video",        -1L,       "Suggested post",            FALSE,
    135   "2022-07-10", "Video",         1L,               "Friend",             TRUE,
    136   "2022-07-10", "Video",        -2L,                   "Ad",            FALSE,
    137   "2022-07-10", "Video",        -1L,       "Suggested post",            FALSE,
    138   "2022-07-10", "Photo",         2L,               "Friend",             TRUE,
    139   "2022-07-11", "Photo",         0L,               "Friend",             TRUE,
    140   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    141   "2022-07-11", "Video",         0L,  "Business (Friend's)",             TRUE,
    142   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    143   "2022-07-11", "Video",         2L,               "Artist",             TRUE,
    144   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    145   "2022-07-11", "Photo",         0L,         "Organization",             TRUE,
    146   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    147   "2022-07-11", "Photo",         1L,         "Organization",             TRUE,
    148   "2022-07-11", "Photo",         2L,               "Friend",             TRUE,
    149   "2022-07-11", "Video",        -1L,       "Suggested post",            FALSE,
    150   "2022-07-11", "Photo",         1L,               "Friend",             TRUE,
    151   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    152   "2022-07-11", "Photo",         2L,         "Organization",             TRUE,
    153   "2022-07-11", "Video",        -2L,                   "Ad",            FALSE,
    154   "2022-07-11", "Video",        -1L,       "Suggested post",            FALSE,
    155   "2022-07-11", "Image",         2L,               "Friend",             TRUE,
    156   "2022-07-11", "Image",         2L,               "Artist",             TRUE,
    157   "2022-07-11", "Video",        -2L,                   "Ad",            FALSE,
    158   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    159   "2022-07-11", "Photo",         2L,               "Friend",             TRUE,
    160   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    161   "2022-07-11", "Video",        -2L,                   "Ad",            FALSE,
    162   "2022-07-11", "Photo",         0L,         "Organization",             TRUE,
    163   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    164   "2022-07-11", "Image",         0L,               "Artist",             TRUE,
    165   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    166   "2022-07-11", "Video",        -1L,       "Suggested post",            FALSE,
    167   "2022-07-11", "Video",        -1L,               "Friend",             TRUE,
    168   "2022-07-11", "Video",        -1L,       "Suggested post",            FALSE,
    169   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    170   "2022-07-11", "Photo",         1L,         "Meme account",             TRUE,
    171   "2022-07-11", "Video",        -2L,       "Suggested post",            FALSE,
    172   "2022-07-11", "Photo",         1L,               "Friend",             TRUE,
    173   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    174   "2022-07-11", "Video",        -1L,       "Suggested post",            FALSE,
    175   "2022-07-11", "Photo",         0L,         "Organization",             TRUE,
    176   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    177   "2022-07-11", "Video",         0L,                   "Ad",            FALSE,
    178   "2022-07-11", "Photo",         2L,               "Friend",             TRUE,
    179   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    180   "2022-07-11", "Photo",         0L,         "Meme account",             TRUE,
    181   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    182   "2022-07-11", "Video",         1L,       "Suggested post",            FALSE,
    183   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    184   "2022-07-11", "Image",         0L,               "Friend",             TRUE,
    185   "2022-07-11", "Video",        -1L,                   "Ad",            FALSE,
    186   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    187   "2022-07-11", "Photo",         2L,               "Friend",             TRUE,
    188   "2022-07-11", "Video",         0L,       "Suggested post",            FALSE,
    189   "2022-07-12", "Photo",         2L,               "Friend",             TRUE,
    190   "2022-07-12", "Photo",         1L,         "Meme account",             TRUE,
    191   "2022-07-12", "Video",        -1L,                   "Ad",            FALSE,
    192   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    193   "2022-07-12", "Photo",         0L,               "Friend",             TRUE,
    194   "2022-07-12", "Photo",         1L,               "Friend",             TRUE,
    195   "2022-07-12", "Image",         0L,         "Meme account",             TRUE,
    196   "2022-07-12", "Photo",         0L,                   "Ad",            FALSE,
    197   "2022-07-12", "Image",         0L,       "Suggested post",            FALSE,
    198   "2022-07-12", "Photo",         2L,               "Friend",             TRUE,
    199   "2022-07-12", "Video",         1L,       "Suggested post",            FALSE,
    200   "2022-07-12", "Video",        -2L,                   "Ad",            FALSE,
    201   "2022-07-12", "Photo",         2L,               "Friend",             TRUE,
    202   "2022-07-12", "Video",         0L,       "Suggested post",            FALSE,
    203   "2022-07-12", "Image",         1L,         "Organization",             TRUE,
    204   "2022-07-12", "Video",        -1L,                   "Ad",            FALSE,
    205   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    206   "2022-07-12", "Photo",         1L,               "Friend",             TRUE,
    207   "2022-07-12", "Video",         0L,       "Suggested post",            FALSE,
    208   "2022-07-12", "Image",        -1L,                   "Ad",            FALSE,
    209   "2022-07-12", "Image",         0L,  "Business (Friend's)",             TRUE,
    210   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    211   "2022-07-12", "Photo",         1L,         "Meme account",             TRUE,
    212   "2022-07-12", "Video",         0L,                   "Ad",            FALSE,
    213   "2022-07-12", "Image",         0L,       "Suggested post",            FALSE,
    214   "2022-07-12", "Photo",         1L,         "Meme account",             TRUE,
    215   "2022-07-12", "Video",         0L,       "Suggested post",            FALSE,
    216   "2022-07-12", "Video",        -2L,                   "Ad",            FALSE,
    217   "2022-07-12", "Image",         0L,         "Organization",             TRUE,
    218   "2022-07-12", "Video",         0L,       "Suggested post",            FALSE,
    219   "2022-07-12", "Photo",         1L,               "Friend",             TRUE,
    220   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    221   "2022-07-12", "Video",        -2L,                   "Ad",            FALSE,
    222   "2022-07-12", "Photo",         1L,         "Meme account",             TRUE,
    223   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    224   "2022-07-12", "Photo",         1L,         "Organization",             TRUE,
    225   "2022-07-12", "Image",        -2L,                   "Ad",            FALSE,
    226   "2022-07-12", "Video",        -1L,       "Suggested post",            FALSE,
    227   "2022-07-12", "Photo",         0L,               "Artist",             TRUE,
    228   "2022-07-12", "Video",         0L,       "Suggested post",            FALSE,
    229   "2022-07-12", "Video",         1L,                   "Ad",            FALSE,
    230   "2022-07-12", "Image",         2L,               "Artist",             TRUE,
    231   "2022-07-12", "Video",        -2L,       "Suggested post",            FALSE,
    232   "2022-07-12", "Photo",         1L,               "Friend",             TRUE,
    233   "2022-07-12", "Video",        -2L,                   "Ad",            FALSE,
    234   "2022-07-12", "Image",         0L,       "Suggested post",            FALSE,
    235   "2022-07-12", "Photo",         1L,               "Friend",             TRUE,
    236   "2022-07-12", "Video",         1L,       "Suggested post",            FALSE,
    237   "2022-07-12", "Photo",         0L,  "Business (Friend's)",             TRUE,
    238   "2022-07-12", "Video",        -2L,                   "Ad",            FALSE
    239   ) %>%
    240   mutate(poster_category = sub(" \\(Friend's\\)", "", poster_category))
    241 ```
    242 
    243 I've been critical of social media platforms (in spite of my continued use of them), but I've traditionally defended Instagram. I knew that it had major problems (most galling, [internal research showed that use of the platform was hurting teenage girls' body image, and Meta suppressed the findings](https://www.wsj.com/articles/facebook-knows-instagram-is-toxic-for-teen-girls-company-documents-show-11631620739?mod=article_inline)), but browsing IG has nevertheless been a pleasant experience for me. Photos of my friends' pets, children, and vacations are _nice things_, and being exposed to them _made me happy_.
    244 
    245 Recently, Instagram instituted changes to the app's main feed, which were [announed by Adam Mosseri, the head of Instagram, on Twitter](https://twitter.com/mosseri/status/1521589403671355392). I feel like Instagram stopped being as fun for me shortly after these changes were rolled out, so I collected a bit of data.
    246 
    247 ## Method
    248 
    249 Over the course of four days (July 9–12, 2022), I only opened the app once per day, on my phone. I looked at the first 50 posts on my feed, and logged a couple features, described below, about each one. I also gave each post a subjective "sentiment score" using a five-point scale from -2 (for posts I actively disliked) to 2 (for posts I quite liked), with a score of 0 being neutral.
    250 
    251 ## Results
    252 
    253 What does Instagram show me? Let's first look at "poster category" counts, which shows who the posts come from.
    254 
    255 ```{r poster_category, fig.height=4, fig.width=7}
    256 caption_text <- "Data from 200 posts viewed over 4 days (50 posts/day)"
    257 
    258 ig_dat %>%
    259   mutate(poster_category = fct_rev(fct_infreq(poster_category))) %>%
    260   ggplot(aes(x = poster_category)) +
    261   geom_bar(aes(fill = !poster_followed)) +
    262   geom_text(aes(label = ..count..), stat = "count",
    263             hjust = 0, nudge_y = 1, size = 6) +
    264   scale_fill_brewer(palette = "Dark2") +
    265   expand_limits(y = 75) +
    266   coord_flip() +
    267   theme(panel.background = element_blank(),
    268         panel.grid = element_blank(),
    269         plot.title.position = "plot",
    270         plot.caption.position = "plot",
    271         legend.position = "none",
    272         axis.line = element_blank(),
    273         axis.ticks = element_blank(),
    274         axis.title = element_blank(),
    275         axis.text.x = element_blank(),
    276         axis.text.y = element_text(size = 16,
    277                                    margin = margin(r = -16))) +
    278   labs(title = "Poster categories in my Instagram feed",
    279        caption = caption_text)
    280 ```
    281 
    282 Most of the 410 accounts I follow are my friends'. I also follow a few _artists_ (a combination of musicians, visual artists, and authors), _organizations_ (primarily political and community orgs), _businesses_ (all of which are run by friends—a couple bakers, a couple shop owners), and a small handful of _meme accounts_ (e.g., "dnddads"). Subjectively, meme accounts are over-represented on my feed; I follow hundreds of actual people and only around five meme accounts, but the latter account for over half as many posts as the former. 
    283 
    284 The biggest issue here is that the majority of posts come from _accounts I don't follow_. I understand that Instagram is an ad-supported business, but I see more ads than posts from friends. Worse still, I see almost twice as many "suggested posts" as I do posts from friends.
    285 
    286 What types of content are represented by these posts?
    287 
    288 ```{r medium, fig.height=3, fig.width=7}
    289 ig_dat %>%
    290   mutate(medium = fct_rev(fct_infreq(medium))) %>%
    291   ggplot(aes(x = medium)) +
    292   geom_bar(aes(fill = medium)) +
    293   geom_text(aes(label = ..count..), stat = "count",
    294             hjust = 0, nudge_y = 1, size = 6) +
    295   scale_fill_brewer(palette = "Paired") +
    296   expand_limits(y = 120) +
    297   coord_flip() +
    298   theme(panel.background = element_blank(),
    299         panel.grid = element_blank(),
    300         plot.title.position = "plot",
    301         plot.caption.position = "plot",
    302         legend.position = "none",
    303         axis.line = element_blank(),
    304         axis.ticks = element_blank(),
    305         axis.title = element_blank(),
    306         axis.text.x = element_blank(),
    307         axis.text.y = element_text(size = 20,
    308                                    margin = margin(r = -20))) +
    309   labs(title = "Media present in my Instagram feed",
    310        caption = caption_text)
    311 ```
    312 
    313 Mosseri announced that Meta wanted to make video a bigger part of the Instagram experience, and they seem to have delivered. Of the 200 posts I logged, the majority were video. Photographs, which the app was originally designed for, account for a little over a quarter of the posts, with other types of image (drawings, illustrations, etc.) accounting for the rest.
    314 
    315 What's the relationship between _poster category_ and _post medium_?
    316 
    317 ```{r poster_media, fig.height=4}
    318 ig_dat %>%
    319   mutate(poster_category = fct_rev(fct_infreq(poster_category))) %>%
    320   ggplot(aes(x = poster_category)) +
    321   geom_bar(aes(fill = medium)) +
    322   geom_text(aes(label = ..count..), stat = "count",
    323             hjust = 0, nudge_y = 1, size = 6) +
    324   scale_fill_brewer(palette = "Paired") +
    325   expand_limits(y = 75) +
    326   coord_flip() +
    327   theme(panel.background = element_blank(),
    328         panel.grid = element_blank(),
    329         plot.title.position = "plot",
    330         plot.caption.position = "plot",
    331         legend.title = element_text(size = 12),
    332         legend.text = element_text(size = 12),
    333         legend.position = c(0.8, 0.2),
    334         axis.line = element_blank(),
    335         axis.ticks = element_blank(),
    336         axis.title = element_blank(),
    337         axis.text.x = element_blank(),
    338         axis.text.y = element_text(size = 16,
    339                                    margin = margin(r = -16))) +
    340   labs(title = "Post medium and poster category in my Instagram feed",
    341        caption = caption_text,
    342        fill = "Post medium")
    343 ```
    344 
    345 There's a tight correspondence between what medium is employed for a post and who's posting it. Videos are being pushed by accounts I don't follow, while my friends continue to prioritize photographs. 
    346 
    347 Since post medium and poster category are so tightly linked, I'll focus on looking at the sentiment by poster category—it would be difficult to tease apart how I feel about photos vs. videos and how I feel about posts from accounts I do vs. do not follow.
    348 
    349 ```{r category_sentiment}
    350 ig_dat %>%
    351   mutate(poster_category = fct_rev(fct_infreq(poster_category))) %>%
    352   ggplot(aes(poster_category, sentiment)) +
    353   geom_boxplot(aes(fill = !poster_followed)) +
    354   scale_fill_brewer(palette = "Dark2") +
    355   coord_flip() +
    356   theme(panel.background = element_blank(),
    357         panel.grid = element_blank(),
    358         plot.title.position = "plot",
    359         plot.caption.position = "plot",
    360         legend.position = "none",
    361         axis.line = element_blank(),
    362         axis.ticks = element_blank(),
    363         axis.title.x = element_text(size = 16),
    364         axis.title.y = element_blank(),
    365         axis.text.x = element_text(size = 12),
    366         axis.text.y = element_text(size = 16,
    367                                    margin = margin(r = -16))) +
    368   labs(title = "Instagram sentiment by poster category",
    369        caption = caption_text,
    370        y = "Subjective sentiment")
    371 ```
    372 
    373 These box-and-whisker plots show the distribution of sentiment scores for each post category. The heavy vertical line indicates the median score, and the boxes extend from the first through third quartiles (the "interquartile range", or IQR). The "whiskers" cover the full range of scores, unless any observation is identified as a potential "outlier". Outliers are defined as observations with values more than 150% of the value of the IQR above or below the third or first quartile, respectively. For example, I was bothered by a photo of a dead bird which was posted by a friend, and gave it a score of -1. The first and third quartiles of sentiment scores for posts from friends are 1 and 2, providing an IQR of 1. Since -1 is less than 1 (the first quartile) - 1.5 (150% of 1, the IQR), that score is an outlier.
    374 
    375 I'm not surprised that I like posts from the accounts I follow more than those from accounts I don't. It's disappointing that suggested posts aren't much nicer to see than ads; these are supposed to make the platorm more "immersive" and "engaging" and fail to achieve that.
    376 
    377 In an attempt to quantify the "experience" of browsing Instagram, I looked at the cumulative sentiment scores across each of the four days. There's no doubt that the actual dynamics of my affect, to the extent that it can even be quantified, is more complicated than +2 + -2 = 0. However, this is a good first approximation of what it feels like to scroll through a feed.
    378 
    379 ```{r cumulative_sentiment}
    380 ig_sentiment <- ig_dat %>%
    381   group_by(date) %>%
    382   mutate(seq = row_number(date),
    383          cum_sent = cumsum(sentiment))
    384 
    385 ig_sentiment %>%
    386   ggplot(aes(seq, cum_sent)) +
    387   geom_hline(yintercept = 0, linetype = "dashed") +
    388   geom_step(aes(color = date), size = 1) +
    389   geom_text(aes(label = cum_sent), data = filter(ig_sentiment, seq == 50),
    390             hjust = 0, nudge_x = 0.5, size = 5) +
    391   scale_color_brewer(palette = "Set2") +
    392   theme(panel.background = element_blank(),
    393         panel.grid = element_blank(),
    394         plot.title.position = "plot",
    395         plot.caption.position = "plot",
    396         legend.title = element_text(size = 12),
    397         legend.text = element_text(size = 12),
    398         legend.position = "none",
    399         axis.line.y = element_blank(),
    400         axis.ticks.y = element_blank(),
    401         axis.title = element_blank(),
    402         #axis.text.x = element_blank(),
    403         axis.text.y = element_blank()) +
    404   labs(title = "Cumulative sentiment while browsing Instagram",
    405        caption = caption_text)
    406 ```
    407 
    408 Each of the four days has a negative cumulative sentiment score, which indicates that I see more posts that I dislike than posts that I like. There's also a suggestion of a pattern, in which my sentiment stays relatively flat and positive over the first 20–30 posts, and then drops. 
    409 
    410 I wonder if this is the result of an intentional design decision by Instagram. If they have an internal model of what posts I might like, they could certainly time them in such a way to encourage longer stretches of engagement, and they have the data to figure out what the optimal timing would look like. On the other hand, this is a purely subjective score that I didn't attempt to carefully calibrate, so it's worth considering that I might just get tired of my feed after a couple dozen posts.
    411 
    412 ## Conclusions
    413 
    414 I don't know if it's worth an attempt to use my experience to formulate suggestions to Instagram (or their would-be competitors). I'm approaching middle age, and I don't spend much money on the internet; Instagram can get stronger engagement and much better ad conversion rates from people who aren't like me. Perhaps I'm an unprofitable user and this is their attempt to nudge me off the platform? 
    415 
    416 However, this has been a useful exercise for me, because it suggests a few things I could change right now to improve my experience:
    417 
    418 * Stop following meme accounts and organizations (these posts provide a neutral-to-good experience, but they potentially crowd out posts from friends and artists that I would enjoy more)
    419 * Stop scrolling my feed after the first 20 or so posts (cumulative sentiment appears to begin dropping after this point)
    420 
    421 Most importantly, it calls into question whether I should even continue using the platform at all. The maximum cumulative sentiment that I experienced was only six (which corresponds to seeing just three things that I really like), and that was only achieved on two of the four days that I measured this. As much as I enjoy seeing photos from my friends (and the data show that I really do enjoy this), it's hard to conclude that the experience of using Instagram is joyful.