Rmd on Blog Jemuhttps://blog.jemu.name/tags/rmd/
Recent content in Rmd on Blog JemuHugo -- gohugo.ioen-usThu, 02 Aug 2018 00:00:00 +0000Hey Buddy! Doing the Dampe Mathhttps://blog.jemu.name/2018/08/hey-buddy-doing-the-dampe-math/
Thu, 02 Aug 2018 00:00:00 +0000https://blog.jemu.name/2018/08/hey-buddy-doing-the-dampe-math/If you’ve ever watched an Ocarina of Time 100% speedrun, or played the game yourself, you’ll probably know about Dampe. As a gravedigger in Kakariko graveyard, he’ll offer to dig up graves for you when you go to him as child Link to get a random treasure. If you’re mildly lucky, you’ll get enough rupees to try again. If you’re really lucky, you’ll get the heart piece.
The latter is obviously part of the 100% definition of the game, so hundo speedruns sooner or later have to face dampe and gamble on the 10% chance of him digging up the heartpiece.Star Trek TV Shows – In Datahttps://blog.jemu.name/2017/11/star-trek-tv-shows-in-data/
Thu, 23 Nov 2017 00:00:00 +0000https://blog.jemu.name/2017/11/star-trek-tv-shows-in-data/Star Trek. It’s a thing.
Not only is it a thing, it’s also a big franchise. You might have heard of it.
If you happen to fall into my sociodemographic bracket, you might not have particularly strong feelings about it, but you’re probably aware that many people do.
I for one do not really care. I didn’t grow up with Star Trek like many people did, I grew up watching Stargate SG-1.Video Compression is Magichttps://blog.jemu.name/2017/10/video-compression-is-magic/
Mon, 16 Oct 2017 00:00:00 +0000https://blog.jemu.name/2017/10/video-compression-is-magic/If you’re like me, you probably have a serious issue with digital hoarding, refuse to delete anything and methodically collect and categorize all the things.
We need help, yes.
In the meantime, there’s the option of substituting your carefully hand-encoded AVC video files and give them the ol’ modernization treatment with our new best friend, HEVC.
If you’re confused at this point, here’s a short glossary:
AVC: Advanced Video Codec or x264: The video codec used in pretty much all modern video.So Winter Came, huh?https://blog.jemu.name/2017/08/so-winter-came-huh/
Tue, 29 Aug 2017 00:00:00 +0000https://blog.jemu.name/2017/08/so-winter-came-huh/library(tRakt) # devtools::install_github(&quot;jemus42/tRakt&quot;) library(ggplot2) library(dplyr) gameofthrones &lt;- trakt.get_all_episodes(&quot;game-of-thrones&quot;) %&gt;% mutate(season_type = if_else(season != &quot;7&quot;, &quot;Seasons 1-6&quot;, &quot;Season 7&quot;), season_type = factor(season_type, levels = c(&quot;Seasons 1-6&quot;, &quot;Season 7&quot;), ordered = TRUE)) caption &lt;- paste0(&quot;Data as of &quot;, format(Sys.Date()), &quot;\n@jemus42&quot;) WInter came, yadda yadda, Game of Thrones s07 finished, you all know that.
There have been things said about the season and it looks like people aren’t too happy with it, while also really enjoying it or something like that.Buuurrrphttps://blog.jemu.name/2017/08/buuurrrp/
Sun, 20 Aug 2017 00:00:00 +0000https://blog.jemu.name/2017/08/buuurrrp/Everybody loburpes Rick and Morty, and rightly so.
It ticks all the cynical boxes full of nihilistic meta-humor and what not, while satirizing pretty much everything.
So, yeah, I’ll plot the trakt.tv ratings and pretend someone cares.
Getting the Data library(tRakt) library(dplyr) library(ggplot2) library(hrbrthemes) show &lt;- trakt.search(&quot;Rick and Morty&quot;) episodes &lt;- trakt.get_all_episodes(show$ids$slug) episodes %&gt;% select(epid, first_aired.string, title, rating) %&gt;% head(5) epid first_aired.string title rating 1 s01e01 2013-12-03 Pilot 7.69451 2 s01e02 2013-12-10 Lawnmower Dog 7.Remember Twin Peaks?https://blog.jemu.name/2017/08/remember-twin-peaks/
Wed, 02 Aug 2017 00:00:00 +0000https://blog.jemu.name/2017/08/remember-twin-peaks/Twin Peaks came, Twin Peaks got weird, Twin Peaks went away and recently it came back.
That’s the short story.
Like many people who thought the original series was extraordinarily weird, yet somehow intrigueing, I of course watch the current season. It’s still very weird, and reasonably intrigueing.
So obviously I gotta do my usual thing of exploring the trakt.tv user ratings.
library(tRakt) # devtools::install_github(&quot;jemus42/tRakt&quot;) library(ggplot2) library(scales) library(dplyr) twinpeaks &lt;- trakt.Quickly Compare your TV show ratings to trakt.tvhttps://blog.jemu.name/2017/07/quickly-compare-your-tv-show-ratings-to-trakt.tv/
Thu, 20 Jul 2017 00:00:00 +0000https://blog.jemu.name/2017/07/quickly-compare-your-tv-show-ratings-to-trakt.tv/I’ve posted this little snippet a while ago, but I thought it would be nice to update it to work again.
library(tRakt) # devtools::install_github(&quot;jemus42/tRakt&quot;) library(dplyr) library(tidyr) library(ggplot2) # Set your username get_trakt_credentials(username = &quot;jemus42&quot;) show &lt;- trakt.search(&quot;Game of Thrones&quot;) trakt.user.ratings(type = &quot;episodes&quot;) %&gt;% filter(show.slug == show$ids$slug) %&gt;% arrange(season, episode) %&gt;% select(rating, season, episode, title) %&gt;% mutate(season = factor(season, ordered = T)) %&gt;% rename(user.rating = rating) %&gt;% left_join((trakt.get_all_episodes(show$ids$slug) %&gt;% select(rating, title, episode_abs))) %&gt;% gather(&quot;type&quot;, value = &quot;rating&quot;, user.Something About GDQhttps://blog.jemu.name/2017/07/something-about-gdq/
Sun, 16 Jul 2017 00:00:00 +0000https://blog.jemu.name/2017/07/something-about-gdq/Everybody likes Games Done Quick, and the events have contributed significant amounts to charity.
I just wanted to look at how much exactly.
gdq_raw &lt;- read_html(&quot;https://en.wikipedia.org/wiki/Games_Done_Quick&quot;) %&gt;% html_table(fill = TRUE) gdq &lt;- bind_rows( gdq_raw[[2]] %&gt;% mutate(event = &quot;AGDQ&quot;), gdq_raw[[3]] %&gt;% mutate(event = &quot;SGDQ&quot;) ) %&gt;% transmute(amount = parse_number(`Amount raised`), charity = str_replace_all(Charity, &quot;\\[\\d+\\]&quot;, &quot;&quot;), year = str_extract(Dates, &quot;\\d{4}&quot;), event = event) %&gt;% filter(!is.na(amount)) Well, now we got the data from Wikipedia.Remember the X-Files?https://blog.jemu.name/2016/02/remember-the-x-files/
Fri, 05 Feb 2016 00:00:00 +0000https://blog.jemu.name/2016/02/remember-the-x-files/With the return of the X-Files in form of a miniseries, I was tempted to catch up on the original run of the show, since I had only seen the occasional episode in the late 90’s or early 00’s (my mom was a big fan). Being me, I already looked up the X-Files episodes ratings on trakt.tv to see if there’s something interesting about them, but I didn’t think there was.So Cougar Town Endedhttps://blog.jemu.name/2015/04/so-cougar-town-ended/
Tue, 14 Apr 2015 00:00:00 +0000https://blog.jemu.name/2015/04/so-cougar-town-ended/So Cougar Town ended, and I don’t know how I feel about that.
Well, trakt knows hout they feel about it.
library(tRakt) library(ggplot2) cougars &lt;- trakt.get_all_episodes(&quot;cougar-town&quot;) ggplot(data = cougars, aes(x = epnum, y = rating, fill = season, color = season)) + geom_smooth(method = lm, se = F) + geom_point(shape = 21, color = &quot;black&quot;, size = 2) + scale_x_continuous(breaks = seq(0, 150, 10), minor_breaks = seq(0, 150, 5)) + scale_y_continuous(breaks = seq(0, 10, .Overanalyzing TV Showshttps://blog.jemu.name/2015/02/overanalyzing-tv-shows/
Fri, 20 Feb 2015 00:00:00 +0000https://blog.jemu.name/2015/02/overanalyzing-tv-shows/EDIT 2017-08-14: I’ve fixed all the code so it works and is up to date. Side effects include the text not necessarily matching the data. Whoopsie.
Overanalyzing tv shows has kind of become my jam. So why not totally overdo it.
Note that everything I describe in this blogpost is purely for the lulz, and I don’t pretend there’s any scientific merit to it. I just like throwing maths at data.