Skip to content

Commit 75b9062

Browse files
committedMar 1, 2025
Misc
1 parent ad56a32 commit 75b9062

File tree

5 files changed

+287
-18
lines changed

5 files changed

+287
-18
lines changed
 

‎blogjemuname.Rproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 1795fedf-beb5-4bf9-ace1-e062f663d6eb
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

‎content/posts/2020/2020-12-27-importing-your-trakt-tv-movies-to-letterboxd/index.Rmarkdown

+16-16
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ library(dplyr)
3333
rated_movies <- user_ratings(user = "jemus42", type = "movies")
3434

3535
# whittle down for the importer
36-
rated_movies <- rated_movies %>%
36+
rated_movies <- rated_movies |>
3737
select(
3838
Title = title,
3939
imdbID = imdb,
@@ -54,16 +54,16 @@ Now just join the two datasets and here we go.
5454
If you've previously done this, you may want to `filter` to select entries younger than a certain date to avoid duplicates.
5555

5656
```{r}
57-
watched_movies %>%
57+
watched_movies |>
5858
select(
5959
WatchedDate = last_watched_at,
6060
Title = title,
6161
imdbID = imdb
62-
) %>%
63-
mutate(WatchedDate = as.Date(WatchedDate)) %>%
64-
left_join(rated_movies, by = c("imdbID", "Title")) %>%
65-
arrange(WatchedDate) %>%
66-
filter(WatchedDate >= as.Date("2020-12-27")) %>%
62+
) |>
63+
mutate(WatchedDate = as.Date(WatchedDate)) |>
64+
left_join(rated_movies, by = c("imdbID", "Title")) |>
65+
arrange(WatchedDate) |>
66+
filter(WatchedDate >= as.Date("2020-12-27")) |>
6767
readr::write_csv(
6868
file = "trakt-movies-letterboxd.csv",
6969
quote_escape = "backslash"
@@ -76,16 +76,16 @@ watched_movies %>%
7676
```{r sessioninfo, chunk_fold="Session Info"}
7777
sess <- sessioninfo::session_info()
7878

79-
sess$platform %>%
80-
unclass() %>%
81-
tibble::as_tibble() %>%
82-
t() %>%
83-
knitr::kable() %>%
79+
sess$platform |>
80+
unclass() |>
81+
tibble::as_tibble() |>
82+
t() |>
83+
knitr::kable() |>
8484
kableExtra::kable_styling()
8585

86-
sess$packages %>%
87-
tibble::as_tibble() %>%
88-
dplyr::select(package, version = ondiskversion, source) %>%
89-
knitr::kable() %>%
86+
sess$packages |>
87+
tibble::as_tibble() |>
88+
dplyr::select(package, version = ondiskversion, source) |>
89+
knitr::kable() |>
9090
kableExtra::kable_styling()
9191
```

‎content/posts/2020/2020-12-27-importing-your-trakt-tv-movies-to-letterboxd/trakt-movies-letterboxd.csv

+105-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WatchedDate,Title,imdbID,rating10
55
2020-12-31,Knives Out,tt8946378,9
66
2021-01-07,Hard Candy,tt0424136,7
77
2021-01-10,From Hell,tt0120681,NA
8-
2021-01-10,The Witch,tt4263482,NA
8+
2021-01-10,The Witch,tt4263482,7
99
2021-01-11,The Fog,tt0080749,NA
1010
2021-01-19,John Mulaney: Kid Gorgeous at Radio City,tt8271714,NA
1111
2021-01-23,Promising Young Woman,tt9620292,9
@@ -26,7 +26,7 @@ WatchedDate,Title,imdbID,rating10
2626
2021-06-22,Triple 9,tt1712261,5
2727
2021-06-25,Monster Hunter,tt6475714,NA
2828
2021-06-26,Paprika,tt0851578,8
29-
2021-06-26,Fast & Furious Presents: Hobbs & Shaw,tt6806448,NA
29+
2021-06-26,Fast & Furious Presents: Hobbs & Shaw,tt6806448,6
3030
2021-06-28,Zombieland: Double Tap,tt1560220,NA
3131
2021-07-02,THX 1138,tt0066434,7
3232
2021-07-03,A Quiet Place Part II,tt8332922,6
@@ -106,3 +106,106 @@ WatchedDate,Title,imdbID,rating10
106106
2022-12-28,Augsburger Puppenkiste - Urmel aus dem Eis,tt0163505,NA
107107
2022-12-29,The Black Abbot,tt0057476,NA
108108
2023-01-01,Glass Onion: A Knives Out Mystery,tt11564570,9
109+
2023-01-08,Death on the Nile,tt0077413,NA
110+
2023-02-03,M3GAN,tt8760708,6
111+
2023-02-24,Black Panther: Wakanda Forever,tt9114286,7
112+
2023-03-05,Heat,tt0113277,7
113+
2023-03-18,Nocturnal Animals,tt4550098,7
114+
2023-03-31,Triangle,tt1187064,6
115+
2023-03-31,Prospect,tt7946422,6
116+
2023-04-01,The Kid Detective,tt8980602,8
117+
2023-04-02,Victoria,tt4226388,8
118+
2023-04-07,Raya and the Last Dragon,tt5109280,7
119+
2023-04-09,Possessor Uncut,tt5918982,7
120+
2023-04-26,Onward,tt7146812,8
121+
2023-05-05,Ant-Man and the Wasp: Quantumania,tt10954600,NA
122+
2023-05-20,The Super Mario Bros. Movie,tt6718170,NA
123+
2023-05-29,Dungeons & Dragons: Honor Among Thieves,tt2906216,NA
124+
2023-06-16,Spider-Man: Across the Spider-Verse,tt9362722,8
125+
2023-07-23,Asteroid City,tt14230388,8
126+
2023-07-25,Barbie,tt1517268,9
127+
2023-07-25,Oppenheimer,tt15398776,9
128+
2023-07-30,Sanctuary,tt15364972,7
129+
2023-08-06,They Cloned Tyrone,tt9873892,8
130+
2023-08-16,Sean Lock: Keep It Light,tt7693270,6
131+
2023-08-19,Guardians of the Galaxy Volume 3,tt6791350,6
132+
2023-08-26,Elemental,tt15789038,7
133+
2023-10-13,Mission: Impossible - Dead Reckoning Part One,tt9603212,7
134+
2023-10-20,Teenage Mutant Ninja Turtles: Mutant Mayhem,tt8589698,8
135+
2023-10-20,Bottoms,tt17527468,9
136+
2023-10-21,Triangle of Sadness,tt7322224,9
137+
2023-10-21,Shiva Baby,tt11317142,8
138+
2023-10-26,Killers of the Flower Moon,tt5537002,7
139+
2023-11-04,The Color of Money,tt0090863,6
140+
2023-11-04,A Haunting in Venice,tt22687790,6
141+
2023-11-04,Talk to Me,tt10638522,7
142+
2023-11-05,The Killer,tt1136617,NA
143+
2023-11-10,Being John Malkovich,tt0120601,8
144+
2023-11-12,Pride & Prejudice,tt0414387,NA
145+
2023-11-17,Lars and the Real Girl,tt0805564,6
146+
2023-11-18,Panic Room,tt0258000,7
147+
2023-11-19,No Hard Feelings,tt15671028,6
148+
2023-12-08,Escape from Pretoria,tt5797184,7
149+
2023-12-09,The Menu,tt9764362,8
150+
2023-12-17,Aporia,tt8511466,7
151+
2023-12-24,They Call Me Trinity,tt0067355,NA
152+
2023-12-25,Trinity Is Still My Name,tt0068154,NA
153+
2024-01-02,Re-Animator,tt0089885,6
154+
2024-01-02,Come True,tt7026488,8
155+
2024-01-03,The Killing of a Sacred Deer,tt5715874,7
156+
2024-01-07,Swiss Army Man,tt4034354,9
157+
2024-01-14,Ex Drummer,tt0812243,NA
158+
2024-01-22,Poor Things,tt14230458,9
159+
2024-02-11,James Acaster: Cold Lasagne Hate Myself 1999,tt13446472,9
160+
2024-03-08,Sisters with Transistors,tt6744250,NA
161+
2024-03-15,Force Majeure,tt2121382,6
162+
2024-03-17,Wonka,tt6166392,NA
163+
2024-03-22,The Host,tt0468492,NA
164+
2024-03-23,Dune: Part Two,tt15239678,NA
165+
2024-03-24,The Wonderful Story of Henry Sugar,tt16968450,NA
166+
2024-03-24,Night Swim,tt9682428,NA
167+
2024-04-01,White Bird,tt11068094,NA
168+
2024-04-20,The Creator,tt11858890,6
169+
2024-05-17,Werner - Beinhart!,tt0100912,NA
170+
2024-05-18,The 39 Steps,tt0026029,NA
171+
2024-05-19,Demolition Man,tt0106697,NA
172+
2024-05-25,George Carlin: Life Is Worth Losing,tt0484855,6
173+
2024-05-26,John Mulaney: Baby J,tt27141610,8
174+
2024-06-09,Scanners,tt0081455,5
175+
2024-06-09,Love Lies Bleeding,tt19637052,6
176+
2024-06-13,Infinity Pool,tt10365998,7
177+
2024-06-13,Suitable Flesh,tt21397580,4
178+
2024-06-16,Miami Vice,tt0430357,6
179+
2024-07-02,Furiosa: A Mad Max Saga,tt12037194,7
180+
2024-07-15,Hank Green: Pissing Out Cancer,tt32731341,9
181+
2024-07-22,Sean Lock: Lockipedia Live,tt1805401,NA
182+
2024-07-26,Twister,tt0117998,6
183+
2024-07-26,The Raid,tt1899353,7
184+
2024-08-04,Fast X,tt5433140,5
185+
2024-08-04,Greg Davies: You Magnificent Beast,tt8259682,8
186+
2024-08-07,Teaches of Peaches,tt30953834,9
187+
2024-08-13,When Evil Lurks,tt16300962,7
188+
2024-09-08,A Quiet Place: Day One,tt13433802,6
189+
2024-09-08,I Saw the TV Glow,tt15574270,8
190+
2024-09-14,The Royal Hotel,tt18363072,7
191+
2024-09-22,(500) Days of Summer,tt1022603,7
192+
2024-09-28,Emma,tt0116191,NA
193+
2024-10-13,New Life,tt18973958,6
194+
2024-10-18,Wolfs,tt14257582,8
195+
2024-10-19,Léon: The Professional,tt0110413,7
196+
2024-10-27,Strange Darling,tt22375054,7
197+
2024-10-31,The Nightmare Before Christmas,tt0107688,NA
198+
2024-11-08,The Substance,tt17526714,NA
199+
2024-12-03,Mission: Impossible,tt0117060,8
200+
2024-12-03,Mission: Impossible II,tt0120755,5
201+
2024-12-04,Alien: Romulus,tt18412256,8
202+
2024-12-05,Alien,tt0078748,8
203+
2024-12-06,Aliens,tt0090605,7
204+
2024-12-07,Alien³,tt0103644,7
205+
2024-12-08,Alien Resurrection,tt0118583,7
206+
2024-12-15,Frailty,tt0264616,NA
207+
2024-12-22,James Acaster: Hecklers Welcome,tt34581142,NA
208+
2024-12-26,Kingsman: The Secret Service,tt2802144,7
209+
2024-12-26,Room 13,tt0058773,NA
210+
2024-12-27,Kingsman: The Golden Circle,tt4649466,7
211+
2024-12-28,The King's Man,tt6856242,5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: 9 Years of Relay.fm Already?
3+
author: Lukas
4+
date: '2023-08-19'
5+
slug: 9-years-of-relay-fm-already
6+
categories:
7+
- R
8+
tags:
9+
- "web scraping"
10+
- "podcasts"
11+
featured_image: null
12+
description: ''
13+
externalLink: ''
14+
series:
15+
- R
16+
packages: ''
17+
toc: no
18+
math: no
19+
editor_options:
20+
chunk_output_type: console
21+
---
22+
23+
```{r setup, include=FALSE, cache=FALSE}
24+
source(here::here("R/post-setup.R"))
25+
knitr::opts_chunk$set(cache = FALSE)
26+
27+
if (file.exists("relay_shows.rds")) {
28+
relay_shows <- readRDS("relay_shows.rds")
29+
}
30+
if (file.exists("relay_episodes.rds")) {
31+
relay_episodes <- readRDS("relay_episodes.rds")
32+
}
33+
34+
library(poddr) # pak::pak("jemus42/poddr")
35+
library(tidyverse)
36+
library(epoxy) # pak::pak("gadenbuie/epoxy")
37+
library(ggtext)
38+
```
39+
40+
Oh boy, has it been 9 years already?
41+
It feels like only yesterday when I put on my data collection pants and got a whole bunch of data about all the Relay.fm podcasts just for funsies.
42+
Turns out it was in 2016 though, [as I event got a little shoutout on the Relay.fm blog](https://www.extras.relay.fm/blog/2016/3/9/relay-fm-by-the-numbers).
43+
That post links to a URL that no longer works by the way, because at the time I've been playing it maybe a little too fast and loose with the setup and abandonment of websites and domains --- whoopsie.
44+
45+
46+
47+
```{r, eval=!file.exists("relay_episodes.rds"), chunk_fold="show code"}
48+
relay_shows <- relay_get_shows()
49+
relay_episodes <- relay_get_episodes(relay_shows)
50+
51+
saveRDS(relay_shows, file = "relay_shows.rds")
52+
saveRDS(relay_episodes, file = "relay_episodes.rds")
53+
```
54+
55+
## All the shows
56+
57+
```{epoxy}
58+
All in all, they published **{nrow(relay_episodes)} epispdes** across **{nrow(relay_shows)}** shows.
59+
```
60+
61+
62+
```{r, chunk_fold="show code"}
63+
relay_episodes |>
64+
group_by(show) |>
65+
summarise(
66+
first = min(date),
67+
last = max(date)
68+
) |>
69+
left_join(relay_shows, by = "show") |>
70+
mutate(show = fct_reorder(show, first)) |>
71+
ggplot(aes(color = show_status, fill = show_status)) +
72+
geom_rect(aes(xmin = first, xmax = last, ymin = show, ymax = show)) +
73+
geom_vline(xintercept = ymd("2014-01-01"), linetype = "dashed") +
74+
scale_x_date(date_breaks = "2 year", date_labels = "%Y") +
75+
scale_color_brewer(palette = "Dark2", aesthetics = c("color", "fill")) +
76+
labs(
77+
title = "",
78+
subtitle = "",
79+
color = NULL, fill = NULL
80+
) +
81+
theme_minimal(base_size = 14) +
82+
theme(
83+
legend.position = "top"
84+
)
85+
```
86+
87+
88+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: 10 Years of Relay.fm Already?
3+
author: Lukas
4+
date: '2023-08-19'
5+
slug: 10-years-of-relay-fm-already
6+
categories:
7+
- R
8+
tags:
9+
- "web scraping"
10+
- "podcasts"
11+
featured_image: null
12+
description: ''
13+
externalLink: ''
14+
series:
15+
- R
16+
packages: ''
17+
toc: no
18+
math: no
19+
editor_options:
20+
chunk_output_type: console
21+
---
22+
23+
Oh boy, has it been 10 years already?
24+
It feels like only yesterday when I put on my data collection pants and got a whole bunch of data about all the Relay.fm podcasts just for funsies.
25+
26+
<details>
27+
<summary>
28+
Click to expand: show code
29+
</summary>
30+
31+
``` r
32+
relay_shows <- relay_get_shows()
33+
relay_episodes <- relay_get_episodes(relay_shows)
34+
35+
saveRDS(relay_shows, file = "relay_shows.rds")
36+
saveRDS(relay_episodes, file = "relay_episodes.rds")
37+
```
38+
39+
</details>
40+
41+
## All the shows
42+
43+
<details>
44+
<summary>
45+
Click to expand: show code
46+
</summary>
47+
48+
``` r
49+
relay_episodes |>
50+
group_by(show) |>
51+
summarise(
52+
first = min(date),
53+
last = max(date)
54+
) |>
55+
left_join(relay_shows, by = "show") |>
56+
mutate(show = fct_reorder(show, first)) |>
57+
ggplot(aes(color = show_status, fill = show_status)) +
58+
geom_rect(aes(xmin = first, xmax = last, ymin = show, ymax = show)) +
59+
geom_vline(xintercept = ymd_hms("2014-01-01")) +
60+
theme_minimal(base_size = 14) +
61+
theme(
62+
legend.position = "top"
63+
)
64+
```
65+
66+
{{
67+
<figure src="plots/unnamed-chunk-2-1.png" link="plots/unnamed-chunk-2-1.png">
68+
69+
}}
70+
71+
</details>
72+
73+
oh boy
74+
75+
All in all, they published **7210 epispdes** across **47** shows.
76+
77+
All in all, they published **7210 epispdes** across **47** shows.

0 commit comments

Comments
 (0)
Please sign in to comment.