Skip to content

Commit 09122c8

Browse files
committed
update
1 parent 24cd057 commit 09122c8

File tree

2 files changed

+3
-3
lines changed
  • _freeze/posts/2025-02-20-how-are-we-feeling-a-severance-analysis/index/execute-results
  • posts/2025-02-20-how-are-we-feeling-a-severance-analysis

2 files changed

+3
-3
lines changed

_freeze/posts/2025-02-20-how-are-we-feeling-a-severance-analysis/index/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"hash": "9f952e68c8b90dd6eac161c6fb857fd7",
2+
"hash": "36d3cff10c91fb5c66659132a2721b87",
33
"result": {
44
"engine": "knitr",
5-
"markdown": "---\ntitle: \"How are we feeling: A Severance Analysis\"\nauthor: \"Lucy D'Agostino McGowan\"\ndate: \"2025-02-20\"\ncategories: [\"rstats\", \"severance\", \"data visualization\"]\ndescription: \"We create a little sentiment profile for each episode, binning them in three minute increments and calculating the AFINN average sentiment score in each. \"\n---\n\n\n\n\nThis analysis was made possible by the [mdr](https://lucymcgowan.github.io/mdr) R package, which used data originally compiled by [the Severance wiki](https://severance.wiki/). Here, we create a little sentiment profile for each episode, binning them in three minute increments and calculating the AFINN average sentiment score in each. \n\n\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-fold=\"true\"}\nlibrary(tidytext)\nlibrary(mdr)\nlibrary(tidyverse)\n\ndf <- transcripts |>\n mutate(timestamp_seconds = as.numeric(timestamp), \n bin = floor(timestamp_seconds / 180) * 180) |>\n left_join(episodes, by = c(\"season\", \"episode\"))\n\ndf |>\n mutate(id = glue::glue(\"Season {season} Episode {episode}\\nWritten by: {writer}\")) |>\n unnest_tokens(word, dialogue) |>\n inner_join(get_sentiments(\"afinn\"), by = \"word\") |>\n group_by(id, bin) |>\n summarise(sentiment = mean(value)) |>\n ggplot(aes(x = bin, y = sentiment, fill = sentiment > 0)) + \n geom_bar(stat = \"identity\", alpha = 0.8) +\n scale_fill_manual(values = c(\"#C15C58\", \"#5BA9D0\")) +\n scale_x_time(labels = scales::time_format(\"%M:%S\")) +\n labs(x = \"\") +\n facet_wrap(~id, ncol = 3) + \n theme_mdr() + \n theme(\n strip.text = element_text(size = 8),\n legend.position = \"none\",\n panel.grid.minor = element_blank(),\n panel.grid.major = element_blank())\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-1-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n\n\n\n*This post was originally posted on my Severance themed site [[found here](https://mdr.lucymcgowan.com/analysis-whos-talking/)]*.\n",
5+
"markdown": "---\ntitle: \"How are we feeling: A Severance Analysis\"\nauthor: \"Lucy D'Agostino McGowan\"\ndate: \"2025-02-20\"\ncategories: [\"rstats\", \"severance\", \"data visualization\"]\ndescription: \"We create a little sentiment profile for each episode, binning them in three minute increments and calculating the AFINN average sentiment score in each. \"\n---\n\n\n\n\nThis analysis was made possible by the [mdr](https://lucymcgowan.github.io/mdr) R package, which used data originally compiled by [the Severance wiki](https://severance.wiki/). Here, we create a little sentiment profile for each episode, binning them in three minute increments and calculating the AFINN average sentiment score in each. \n\n\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-fold=\"true\"}\nlibrary(tidytext)\nlibrary(mdr)\nlibrary(tidyverse)\n\ndf <- transcripts |>\n mutate(timestamp_seconds = as.numeric(timestamp), \n bin = floor(timestamp_seconds / 180) * 180) |>\n left_join(episodes, by = c(\"season\", \"episode\"))\n\ndf |>\n mutate(id = glue::glue(\"Season {season} Episode {episode}\\nWritten by: {writer}\")) |>\n unnest_tokens(word, dialogue) |>\n inner_join(get_sentiments(\"afinn\"), by = \"word\") |>\n group_by(id, bin) |>\n summarise(sentiment = mean(value)) |>\n ggplot(aes(x = bin, y = sentiment, fill = sentiment > 0)) + \n geom_bar(stat = \"identity\", alpha = 0.8) +\n scale_fill_manual(values = c(\"#C15C58\", \"#5BA9D0\")) +\n scale_x_time(labels = scales::time_format(\"%M:%S\")) +\n labs(x = \"\") +\n facet_wrap(~id, ncol = 3) + \n theme_mdr() + \n theme(\n strip.text = element_text(size = 8),\n legend.position = \"none\",\n panel.grid.minor = element_blank(),\n panel.grid.major = element_blank())\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-1-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n\n\n\n*This post was originally posted on my Severance themed site [[found here](https://mdr.lucymcgowan.com/analysis-feeling-over-time/)]*.\n",
66
"supporting": [
77
"index_files"
88
],

posts/2025-02-20-how-are-we-feeling-a-severance-analysis/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ df |>
4848

4949

5050

51-
*This post was originally posted on my Severance themed site [[found here](https://mdr.lucymcgowan.com/analysis-whos-talking/)]*.
51+
*This post was originally posted on my Severance themed site [[found here](https://mdr.lucymcgowan.com/analysis-feeling-over-time/)]*.

0 commit comments

Comments
 (0)