Last updated: 2022-11-02

Checks: 7 0

Knit directory: myTidyTuesday/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210907) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 7d843f4. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/.Rhistory
    Ignored:    data/2022_11_01.png
    Ignored:    data/CNHI_Excel_Chart.xlsx
    Ignored:    data/Chicago.rds
    Ignored:    data/CommunityTreemap.jpeg
    Ignored:    data/Community_Roles.jpeg
    Ignored:    data/ELL.zip
    Ignored:    data/SeriesReport-20220414171148_6c3b18.xlsx
    Ignored:    data/Weekly_Chicago_IL_Regular_Reformulated_Retail_Gasoline_Prices.csv
    Ignored:    data/YammerDigitalDataScienceMembership.xlsx
    Ignored:    data/YammerMemberPage.rds
    Ignored:    data/YammerMembers.rds
    Ignored:    data/df.rds
    Ignored:    data/fit_cohesion.rds
    Ignored:    data/fit_grammar.rds
    Ignored:    data/fit_phraseology.rds
    Ignored:    data/fit_syntax.rds
    Ignored:    data/fit_vocabulary.rds
    Ignored:    data/grainstocks.rds
    Ignored:    data/hike_data.rds
    Ignored:    data/lm_res.rds
    Ignored:    data/raw_weather.RData
    Ignored:    data/sample_submission.csv
    Ignored:    data/submission.csv
    Ignored:    data/test.csv
    Ignored:    data/train.csv
    Ignored:    data/us_states.rds
    Ignored:    data/us_states_hexgrid.geojson
    Ignored:    data/weatherstats_toronto_daily.csv

Untracked files:
    Untracked:  analysis/2022_09_01_kaggle_tabular_playground.qmd
    Untracked:  code/YammerReach.R
    Untracked:  code/autokeras.R
    Untracked:  code/chicago.R
    Untracked:  code/glmnet_test.R
    Untracked:  code/googleCompute.R
    Untracked:  code/work list batch targets.R
    Untracked:  environment.yml
    Untracked:  report.html

Unstaged changes:
    Modified:   analysis/2021_01_19_tidy_tuesday.Rmd
    Modified:   analysis/2021_03_24_tidy_tuesday.Rmd
    Deleted:    analysis/2021_04_20.Rmd
    Deleted:    analysis/2022_02_11_tabular_playground.Rmd
    Deleted:    analysis/2022_04_18.qmd
    Modified:   analysis/EnglishLanguageLearning.Rmd
    Modified:   analysis/Survival.Rmd
    Modified:   analysis/_site.yml
    Modified:   code/_common.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/2022_11_01.Rmd) and HTML (docs/2022_11_01.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 7d843f4 opus1993 2022-11-02 fixed the title
html 29388b7 opus1993 2022-11-02 Build site.
Rmd d1b6cde opus1993 2022-11-02 with my tweet
Rmd 788e5d8 opus1993 2022-11-02 render to html
html eae0c10 opus1993 2022-11-02 Build site.
Rmd ede7222 opus1993 2022-11-02 initial commit

tweetrmd::tweet_embed('https://twitter.com/thomas_mock/status/1587245920604897284')

The @R4DScommunity welcomes you to week 44 of #TidyTuesday! We're exploring @tanya_shapiro 's Horror Movies!!

📂 https://t.co/sElb4fcv3u
📰 https://t.co/7J0OnYJMCj#r4ds #tidyverse #rstats #dataviz pic.twitter.com/NPqSaw5Bdo

— Tom Mock ❤️ @posit_pbc (@thomas_mock) November 1, 2022

Let’s give this color pallette a try, along with the Google Creepster font.

suppressPackageStartupMessages({
library(tidyverse)
library(rtweet)
library(lubridate)
library(ggdist)
library(ggimage)
})

source(here::here("code","_common.R"))

sysfonts::font_add_google("Creepster", "creepster")
showtext::showtext_auto()

scales::show_col(paletteer::palettes_d$DresdenColor$foolmoon)

base_url <- "https://www.themoviedb.org/t/p/w1280/"

movies_raw <- tidytuesdayR::tt_load("2022-11-01")$horror_movies |> 
  mutate(poster = paste0(base_url, poster_path))
--- Compiling #TidyTuesday Information for 2022-11-01 ----
--- There is 1 file available ---
--- Starting Download ---

    Downloading file 1 of 1: `horror_movies.csv`
--- Download complete ---
# skimr::skim(movies_raw)

There’s a lot of good material in this dataset. Let’s plot some time series

movies_raw |>
  mutate(original_language = fct_lump(original_language,
    5,
    other_level = "Other"
  )) |>
  group_by(
    release_date = floor_date(release_date,
      unit = "year",
    ),
    original_language
  ) |>
  summarise(
    sum = sum(revenue, na.rm = TRUE),
    .groups = "keep"
  ) |>
  mutate(original_language = fct_reorder(
    original_language,
    sum, max
  )) |>
  ggplot(aes(x = release_date, sum, fill = original_language)) +
  geom_col(show.legend = FALSE) +
  scale_y_continuous(labels = scales::dollar) +
  paletteer::scale_fill_paletteer_d("DresdenColor::foolmoon") +
  labs(
    title = "Global Annual Horror Movie Box Office Revenue",
    subtitle = "A growing genre, in <span style='color:#532026'>English,</span> <span style='color:#BA141E'>German,</span> <span style='color:#E2E3E7'>Spanish,</span> <span style='color:#61829C'>Japanese,</span> <span style='color:#354C6A'>Portuguese,</span> <span style='color:#050505'>and Other</span> languages<br><br>",
    x = NULL, y = NULL, fill = "Language",
    caption = "Plot: @jim_gruman Data: The Movie Database via github.com/tashapiro/horror-movies"
  ) +
  theme(
    panel.background = element_rect(fill = "gray10"),
    legend.text = element_text(color = "gray80"),
    plot.title = element_text(
      color = "gray80",
      size = 40,
      family = "creepster"
    ),
    plot.subtitle = ggtext::element_markdown(
      color = "gray80",
      size = 25
    ),
    plot.caption = element_text(color = "gray80"),
    axis.text = element_text(color = "gray80"),
    panel.grid = element_line(color = "gray5"),
    plot.background = element_rect(fill = "gray10")
  )

Bar Chart of Global Annual Horror Movie Box Office Revenue

movies_raw |>
  filter(budget > 1e6) |>
  mutate(
    image = case_when(
      budget > 100000000 ~ poster,
      release_date < as.Date("1960-01-01") &
        budget > 10000000 ~ poster,
      TRUE ~ NA_character_
    ),
    profitable = if_else(
      revenue > budget,
      TRUE, FALSE
    )
  ) |>
  ggplot(aes(release_date, budget / 1e6)) +
  geom_point(aes(color = profitable),
    show.legend = FALSE,
    size = 2,
    shape = 21
  ) +
  geom_image(aes(
    x = release_date + years(3),
    image = image
  )) +
  geom_text(
    data = count(movies_raw, release_date = floor_date(release_date, unit = "year")),
    aes(y = if_else(year(release_date) %% 2 == 0,
      -2, -7
    ), label = n),
    color = "gray80"
  ) +
  scale_y_continuous(
    labels = scales::dollar,
    position = "right"
  ) +
  scale_x_date(expand = expansion(mult = c(0, 0))) +
  scale_color_manual(values = c(
    paletteer::palettes_d$DresdenColor$foolmoon[[5]],
    paletteer::palettes_d$DresdenColor$foolmoon[[2]]
  )) +
  labs(
    title = "Horror Movie Budgets",
    subtitle = "Several massive productions since the 1980s.  <span style='color:#354C6A'>Revenue > Budget</span> and <span style='color:#BA141E'>Revenue < Budget</span>",
    x = NULL, y = NULL, fill = "Language",
    caption = "Numbers are the annual counts of releases with budgets over $1M by year. Budgets in Millions $US. Plot: @jim_gruman Data: The Movie Database via github.com/tashapiro/horror-movies"
  ) +
  theme(
    panel.background = element_rect(fill = "gray7"),
    plot.title = element_text(
      color = "#532026",
      size = 80,
      vjust = -50,
      hjust = 0.1,
      family = "creepster"
    ),
    plot.subtitle = ggtext::element_markdown(
      color = "gray80",
      size = 20
    ),
    plot.title.position = "panel",
    plot.caption = element_text(color = "gray80"),
    axis.ticks = element_blank(),
    axis.ticks.length = unit(c(0, 0, 0, 0), "cm"),
    axis.text = element_text(
      color = "gray80",
      size = 20
    ),
    axis.line = element_blank(),
    panel.grid = element_line(color = "gray5"),
    plot.background = element_rect(
      fill = "gray7",
      color = "gray7"
    ),
    plot.margin = unit(c(0, 0.2, 0.1, 0), "cm"),
  )

Horror Movie Budgets by year

ggsave(here::here("data", "2022_11_01.png"),
  width = 6, height = 5, dpi = 300, bg = "black",
  device = "png"
)
post_tweet(
  status = "#TidyTuesday #DataViz this week on Horror Movie Budgets. Credit to @tanya_shapiro for the dataset. #rstats #r4ds",
  media = here::here("data", "2022_11_01.png"),
  token = NULL,
  in_reply_to_status_id = NULL,
  destroy_id = NULL,
  retweet_id = NULL,
  auto_populate_reply_metadata = FALSE,
  media_alt_text = "The Horror Movie Budgets by Year in points, with movie posters for the largest",
  lat = NULL,
  long = NULL,
  display_coordinates = FALSE
)
tweetrmd::tweet_embed("https://twitter.com/jim_gruman/status/1587942905951420422")

#TidyTuesday #DataViz this week on Horror Movie Budgets. Credit to @tanya_shapiro for the dataset. #rstats #r4ds pic.twitter.com/E5yllcDwU5

— 🧢📚🚵‍♂️⚙📈☕ (@jim_gruman) November 2, 2022

sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ggimage_0.3.1   ggdist_3.2.0    lubridate_1.8.0 rtweet_1.0.2   
 [5] forcats_0.5.2   stringr_1.4.1   dplyr_1.0.10    purrr_0.3.5    
 [9] readr_2.1.3     tidyr_1.2.1     tibble_3.1.8    ggplot2_3.3.6  
[13] tidyverse_1.3.2 workflowr_1.7.0

loaded via a namespace (and not attached):
  [1] readxl_1.4.1         backports_1.4.1      systemfonts_1.0.4   
  [4] workflows_1.1.0      selectr_0.4-2        tidytuesdayR_1.0.2  
  [7] splines_4.2.2        listenv_0.8.0        usethis_2.1.6       
 [10] digest_0.6.29        foreach_1.5.2        yulab.utils_0.0.5   
 [13] htmltools_0.5.3      yardstick_1.1.0      viridis_0.6.2       
 [16] magick_2.7.3         parsnip_1.0.2.9001   fansi_1.0.3         
 [19] magrittr_2.0.3       memoise_2.0.1        tune_1.0.1          
 [22] paletteer_1.5.0      googlesheets4_1.0.1  tzdb_0.3.0          
 [25] recipes_1.0.2        globals_0.16.1       modelr_0.1.9        
 [28] gower_1.0.0          R.utils_2.12.0       vroom_1.6.0         
 [31] sysfonts_0.8.8       hardhat_1.2.0        rsample_1.1.0       
 [34] dials_1.0.0          colorspace_2.0-3     rvest_1.0.3         
 [37] textshaping_0.3.6    haven_2.5.1          xfun_0.33           
 [40] prismatic_1.1.1      callr_3.7.2          crayon_1.5.2        
 [43] jsonlite_1.8.3       survival_3.4-0       iterators_1.0.14    
 [46] glue_1.6.2           gtable_0.3.1         gargle_1.2.1        
 [49] ipred_0.9-13         distributional_0.3.1 R.cache_0.16.0      
 [52] tweetrmd_0.0.9       future.apply_1.9.1   scales_1.2.1        
 [55] infer_1.0.3          DBI_1.1.3            Rcpp_1.0.9          
 [58] showtextdb_3.0       gridtext_0.1.5       viridisLite_0.4.1   
 [61] gridGraphics_0.5-1   bit_4.0.4            GPfit_1.0-8         
 [64] lava_1.7.0           prodlim_2019.11.13   httr_1.4.4          
 [67] ellipsis_0.3.2       R.methodsS3_1.8.2    pkgconfig_2.0.3     
 [70] farver_2.1.1         nnet_7.3-18          sass_0.4.2          
 [73] dbplyr_2.2.1         utf8_1.2.2           here_1.0.1          
 [76] labeling_0.4.2       ggplotify_0.1.0      tidyselect_1.2.0    
 [79] rlang_1.0.6          DiceDesign_1.9       later_1.3.0         
 [82] munsell_0.5.0        cellranger_1.1.0     tools_4.2.2         
 [85] cachem_1.0.6         cli_3.4.0            generics_0.1.3      
 [88] broom_1.0.1          evaluate_0.17        fastmap_1.1.0       
 [91] ragg_1.2.4           yaml_2.3.5           rematch2_2.1.2      
 [94] bit64_4.0.5          processx_3.7.0       knitr_1.40          
 [97] fs_1.5.2             workflowsets_1.0.0   showtext_0.9-5      
[100] future_1.28.0        whisker_0.4          R.oo_1.25.0         
[103] xml2_1.3.3           compiler_4.2.2       rstudioapi_0.14     
[106] curl_4.3.3           reprex_2.0.2         lhs_1.1.5           
[109] bslib_0.4.1          stringi_1.7.8        highr_0.9           
[112] ps_1.7.1             lattice_0.20-45      Matrix_1.5-1        
[115] markdown_1.2         styler_1.8.0         conflicted_1.1.0    
[118] vctrs_0.5.0          tidymodels_1.0.0     pillar_1.8.1        
[121] lifecycle_1.0.3      furrr_0.3.1          jquerylib_0.1.4     
[124] httpuv_1.6.6         R6_2.5.1             promises_1.2.0.1    
[127] gridExtra_2.3        parallelly_1.32.1    codetools_0.2-18    
[130] MASS_7.3-58.1        assertthat_0.2.1     rprojroot_2.0.3     
[133] withr_2.5.0          ggtext_0.1.2         parallel_4.2.2      
[136] hms_1.1.2            grid_4.2.2           rpart_4.1.19        
[139] ggfun_0.0.7          timeDate_4021.106    class_7.3-20        
[142] rmarkdown_2.17       googledrive_2.0.0    git2r_0.30.1        
[145] getPass_0.2-2       
LS0tDQp0aXRsZTogIkhvcnJvciBNb3ZpZXMiDQphdXRob3I6ICJKaW0gR3J1bWFuIg0KZGF0ZTogIk5vdmVtYmVyIDEsIDIwMjIiDQpvdXRwdXQ6DQogIHdvcmtmbG93cjo6d2Zsb3dfaHRtbDoNCiAgICB0b2M6IG5vDQogICAgY29kZV9mb2xkaW5nOiBoaWRlDQogICAgY29kZV9kb3dubG9hZDogdHJ1ZQ0KICAgIGRmX3ByaW50OiBwYWdlZA0KZWRpdG9yX29wdGlvbnM6DQogIGNodW5rX291dHB1dF90eXBlOi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YnVkZ2V0LA0KICAgICAgVFJVRSwgRkFMU0UNCiAgICApDQogICkgfD4gDQogIGdncGxvdChhZXMocmVsZWFzZV9kYXRlLCBidWRnZXQvMWU2KSkgKw0KICBnZW9tX3BvaW50KGFlcyhjb2xvciA9IHByb2ZpdGFibGUpLA0KICAgICAgICAgICAgIHNob3cubGVnZW5kID0gRkFMU0UsDQogICAgICAgICAgICAgICAgICAgIHNpemUgPSAyLA0KICAgICAgICAgICAgICAgICAgICBzaGFwZSA9IDIxKSArDQogIGdlb21faW1hZ2UoYWVzKHggPSByZWxlYXNlX2RhdGUgKyB5ZWFycygzKSwgDQogICAgICAgICAgICAgICAgIGltYWdlID0gaW1hZ2UpKSArDQogIGdlb21fdGV4dCgNCiAgICBkYXRhID0gY291bnQobW92aWVzX3JhdywgcmVsZWFzZV9kYXRlID0gZmxvb3JfZGF0ZShyZWxlYXNlX2RhdGUsIHVuaXQgPSAieWVhciIpKSwNCiAgICBhZXMoeSA9IGlmX2Vsc2UoeWVhcihyZWxlYXNlX2RhdGUpICUlIDIgPT0gMCwNCiAgICAgICAgICAgICAgICAgICAgLTIsIC03KSwgbGFiZWwgPSBuKSwNCiAgICBjb2xvciA9ICJncmF5ODAiDQogICkgKw0KICBzY2FsZV95X2NvbnRpbnVvdXMobGFiZWxzID0gc2NhbGVzOjpkb2xsYXIsDQogICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9ICJyaWdodCIpICsNCiAgc2NhbGVfeF9kYXRlKGV4cGFuZCA9IGV4cGFuc2lvbihtdWx0ID0gYygwLCAwKSkpICsNCiAgc2NhbGVfY29sb3JfbWFudWFsKHZhbHVlcyA9IGMoDQogICAgcGFsZXR0ZWVyOjpwYWxldHRlc19kJERyZXNkZW5Db2xvciRmb29sbW9vbltbNV1dLA0KICAgIHBhbGV0dGVlcjo6cGFsZXR0ZXNfZCREcmVzZGVuQ29sb3IkZm9vbG1vb25bWzJdXQ0KICApKSArDQogIGxhYnModGl0bGUgPSAiSG9ycm9yIE1vdmllIEJ1ZGdldHMiLA0KICAgICAgIHN1YnRpdGxlID0gIlNldmVyYWwgbWFzc2l2ZSBwcm9kdWN0aW9ucyBzaW5jZSB0aGUgMTk4MHMuICA8c3BhbiBzdHlsZT0nY29sb3I6IzM1NEM2QSc+UmV2ZW51ZSA+IEJ1ZGdldDwvc3Bhbj4gYW5kIDxzcGFuIHN0eWxlPSdjb2xvcjojQkExNDFFJz5SZXZlbnVlIDwgQnVkZ2V0PC9zcGFuPiIsDQogICAgICAgeCA9IE5VTEwsIHkgPSBOVUxMLCBmaWxsID0gIkxhbmd1YWdlIiwNCiAgICAgICBjYXB0aW9uID0gIk51bWJlcnMgYXJlIHRoZSBhbm51YWwgY291bnRzIG9mIHJlbGVhc2VzIHdpdGggYnVkZ2V0cyBvdmVyICQxTSBieSB5ZWFyLiBCdWRnZXRzIGluIE1pbGxpb25zICRVUy4gUGxvdDogQGppbV9ncnVtYW4gRGF0YTogVGhlIE1vdmllIERhdGFiYXNlIHZpYSBnaXRodWIuY29tL3Rhc2hhcGlyby9ob3Jyb3ItbW92aWVzIikgKw0KICB0aGVtZShwYW5lbC5iYWNrZ3JvdW5kID0gZWxlbWVudF9yZWN0KGZpbGwgPSAiZ3JheTciKSwNCiAgICAgICAgcGxvdC50aXRsZSA9IGVsZW1lbnRfdGV4dChjb2xvciA9ICIjNTMyMDI2IiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplID0gODAsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmp1c3QgPSAtNTAsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGp1c3QgPSAwLjEsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFtaWx5ID0gImNyZWVwc3RlciIpLA0KICAgICAgICBwbG90LnN1YnRpdGxlID0gZ2d0ZXh0OjplbGVtZW50X21hcmtkb3duKGNvbG9yID0gImdyYXk4MCIsDQogICAgICAgICAgICAgICAgICAg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