A speedrun.com API wrapper for R https://jemus42.github.io/speedrunr/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

357 lines
36 KiB

  1. <!DOCTYPE html>
  2. <!-- Generated by pkgdown: do not edit by hand --><html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>Ocarina of Time 100% • speedrunr</title>
  9. <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  10. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
  11. <!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
  12. <script src="../pkgdown.js"></script><meta property="og:title" content="Ocarina of Time 100%">
  13. <meta property="og:description" content="">
  14. <meta name="twitter:card" content="summary">
  15. <!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]>
  16. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  17. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  18. <![endif]-->
  19. </head>
  20. <body>
  21. <div class="container template-article">
  22. <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
  23. <div class="container">
  24. <div class="navbar-header">
  25. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
  26. <span class="icon-bar"></span>
  27. <span class="icon-bar"></span>
  28. <span class="icon-bar"></span>
  29. </button>
  30. <span class="navbar-brand">
  31. <a class="navbar-link" href="../index.html">speedrunr</a>
  32. <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.9000</span>
  33. </span>
  34. </div>
  35. <div id="navbar" class="navbar-collapse collapse">
  36. <ul class="nav navbar-nav">
  37. <li>
  38. <a href="../index.html">
  39. <span class="fa fa-home fa-lg"></span>
  40. </a>
  41. </li>
  42. <li>
  43. <a href="../reference/index.html">Reference</a>
  44. </li>
  45. <li class="dropdown">
  46. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  47. Articles
  48. <span class="caret"></span>
  49. </a>
  50. <ul class="dropdown-menu" role="menu">
  51. <li>
  52. <a href="../articles/ocarina-of-time-100-.html">Ocarina of Time 100%</a>
  53. </li>
  54. </ul>
  55. </li>
  56. <li>
  57. <a href="../news/index.html">Changelog</a>
  58. </li>
  59. </ul>
  60. <ul class="nav navbar-nav navbar-right">
  61. <li>
  62. <a href="https://github.com/jemus42/speedrunr">
  63. <span class="fa fa-github fa-lg"></span>
  64. </a>
  65. </li>
  66. </ul>
  67. </div>
  68. <!--/.nav-collapse -->
  69. </div>
  70. <!--/.container -->
  71. </div>
  72. <!--/.navbar -->
  73. </header><div class="row">
  74. <div class="col-md-9 contents">
  75. <div class="page-header toc-ignore">
  76. <h1>Ocarina of Time 100%</h1>
  77. <h4 class="author">Lukas Burk</h4>
  78. <h4 class="date">2018-11-02</h4>
  79. <small class="dont-index">Source: <a href="https://github.com/jemus42/speedrunr/blob/master/vignettes/ocarina-of-time-100-.Rmd"><code>vignettes/ocarina-of-time-100-.Rmd</code></a></small>
  80. <div class="hidden name"><code>ocarina-of-time-100-.Rmd</code></div>
  81. </div>
  82. <p>I like Ocarina of Time 100%. So let’s take a look at that.</p>
  83. <div id="identify-what-you-want" class="section level2">
  84. <h2 class="hasAnchor">
  85. <a href="#identify-what-you-want" class="anchor"></a>Identify what you want</h2>
  86. <p>First up we need the game’s ID and category ID. That’s easy:</p>
  87. <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(speedrunr)</a>
  88. <a class="sourceLine" id="cb1-2" data-line-number="2"></a>
  89. <a class="sourceLine" id="cb1-3" data-line-number="3"><span class="kw"><a href="../reference/get_games.html">get_games</a></span>(<span class="st">"Ocarina of Time"</span>)</a>
  90. <a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co">#&gt; # A tibble: 7 x 9</span></a>
  91. <a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co">#&gt; id name_internatio… name_twitch name_abbr weblink released </span></a>
  92. <a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;date&gt; </span></a>
  93. <a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co">#&gt; 1 j1l9… The Legend of Z… The Legend… oot https:… 1998-11-21</span></a>
  94. <a class="sourceLine" id="cb1-8" data-line-number="8"><span class="co">#&gt; 2 kdkj… The Legend of Z… The Legend… ootmq https:… 2002-01-01</span></a>
  95. <a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co">#&gt; 3 268v… The Legend of Z… The Legend… oot3d https:… 2011-06-16</span></a>
  96. <a class="sourceLine" id="cb1-10" data-line-number="10"><span class="co">#&gt; 4 nd2q… Roblox Ocarina … ROBLOX root https:… 2008-10-24</span></a>
  97. <a class="sourceLine" id="cb1-11" data-line-number="11"><span class="co">#&gt; 5 76rk… Ocarina of Time… The Legend… ootextras https:… 1998-11-21</span></a>
  98. <a class="sourceLine" id="cb1-12" data-line-number="12"><span class="co">#&gt; 6 m1zr… Ocarina of Time… Ocarina of… ootbq https:… 2015-11-13</span></a>
  99. <a class="sourceLine" id="cb1-13" data-line-number="13"><span class="co">#&gt; 7 v1po… SM64: Ocarina o… SM64: Ocar… sm64oot https:… 2018-03-26</span></a>
  100. <a class="sourceLine" id="cb1-14" data-line-number="14"><span class="co">#&gt; # ... with 3 more variables: released_year &lt;int&gt;, romhack &lt;lgl&gt;,</span></a>
  101. <a class="sourceLine" id="cb1-15" data-line-number="15"><span class="co">#&gt; # created &lt;dttm&gt;</span></a></code></pre></div>
  102. <div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw"><a href="../reference/get_categories.html">get_categories</a></span>(<span class="st">"j1l9qz1g"</span>)</a>
  103. <a class="sourceLine" id="cb2-2" data-line-number="2"><span class="co">#&gt; # A tibble: 12 x 6</span></a>
  104. <a class="sourceLine" id="cb2-3" data-line-number="3"><span class="co">#&gt; id name link type miscellaneous rules </span></a>
  105. <a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;lgl&gt; &lt;chr&gt; </span></a>
  106. <a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co">#&gt; 1 q255j… 100% https://www.s… per-g… FALSE "**100% Rules**:\r\…</span></a>
  107. <a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co">#&gt; 2 824qn… 100% https://www.s… per-l… FALSE "General Rules:\r\n…</span></a>
  108. <a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co">#&gt; 3 zdnoz… All Du… https://www.s… per-g… FALSE "**All Dungeons Rul…</span></a>
  109. <a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co">#&gt; 4 z275w… Any% https://www.s… per-g… FALSE "**Any% Rules**:\r\…</span></a>
  110. <a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co">#&gt; 5 02qe4… Any% https://www.s… per-l… FALSE "General Rules:\r\n…</span></a>
  111. <a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co">#&gt; 6 9kvr8… Ganonl… https://www.s… per-g… TRUE "**Ganonless Rules*…</span></a>
  112. <a class="sourceLine" id="cb2-11" data-line-number="11"><span class="co">#&gt; 7 zd35j… Glitch… https://www.s… per-g… FALSE "" </span></a>
  113. <a class="sourceLine" id="cb2-12" data-line-number="12"><span class="co">#&gt; 8 ndxlw… Glitch… https://www.s… per-l… FALSE "General Rules:\r\n…</span></a>
  114. <a class="sourceLine" id="cb2-13" data-line-number="13"><span class="co">#&gt; 9 jdrwr… MST https://www.s… per-g… FALSE "**Medallions/Stone…</span></a>
  115. <a class="sourceLine" id="cb2-14" data-line-number="14"><span class="co">#&gt; 10 9d85y… No IM/… https://www.s… per-g… FALSE "**No IM/WW Rules**…</span></a>
  116. <a class="sourceLine" id="cb2-15" data-line-number="15"><span class="co">#&gt; 11 xd1wj… No Wro… https://www.s… per-g… TRUE "**No Wrong Warp Ru…</span></a>
  117. <a class="sourceLine" id="cb2-16" data-line-number="16"><span class="co">#&gt; 12 rklm8… Restri… https://www.s… per-l… TRUE "General Rules:\r\n…</span></a></code></pre></div>
  118. <p>So we’re good.</p>
  119. <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1">game &lt;-<span class="st"> "j1l9qz1g"</span></a>
  120. <a class="sourceLine" id="cb3-2" data-line-number="2">category &lt;-<span class="st"> "q255jw2o"</span></a>
  121. <a class="sourceLine" id="cb3-3" data-line-number="3"></a>
  122. <a class="sourceLine" id="cb3-4" data-line-number="4">oot100 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/get_runs.html">get_runs</a></span>(<span class="dt">game =</span> <span class="st">"j1l9qz1g"</span>, <span class="dt">category =</span> <span class="st">"q255jw2o"</span>, <span class="dt">max =</span> <span class="ot">Inf</span>)</a></code></pre></div>
  123. <p>Note that I’m useing <code>max = Inf</code> to make sure I get <em>all</em> the runs.</p>
  124. <div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw">str</span>(oot100)</a>
  125. <a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co">#&gt; Classes 'tbl_df', 'tbl' and 'data.frame': 540 obs. of 22 variables:</span></a>
  126. <a class="sourceLine" id="cb4-3" data-line-number="3"><span class="co">#&gt; $ id : chr "z11p7k9z" "yl4ej6rm" "z51vk85m" "yl4r56rm" ...</span></a>
  127. <a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co">#&gt; $ weblink : chr "https://www.speedrun.com/oot/run/z11p7k9z" "https://www.speedrun.com/oot/run/yl4ej6rm" "https://www.speedrun.com/oot/run/z51vk85m" "https://www.speedrun.com/oot/run/yl4r56rm" ...</span></a>
  128. <a class="sourceLine" id="cb4-5" data-line-number="5"><span class="co">#&gt; $ game : chr "j1l9qz1g" "j1l9qz1g" "j1l9qz1g" "j1l9qz1g" ...</span></a>
  129. <a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co">#&gt; $ level : logi NA NA NA NA NA NA ...</span></a>
  130. <a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co">#&gt; $ category : chr "q255jw2o" "q255jw2o" "q255jw2o" "q255jw2o" ...</span></a>
  131. <a class="sourceLine" id="cb4-8" data-line-number="8"><span class="co">#&gt; $ videos : chr "https://www.youtube.com/watch?v=HaUTONEwj8I" "https://www.youtube.com/watch?v=ad-56T4uJto" "https://www.youtube.com/watch?v=jTH_lZNUeGA" "https://www.youtube.com/watch?v=gZjxgUpNNOM" ...</span></a>
  132. <a class="sourceLine" id="cb4-9" data-line-number="9"><span class="co">#&gt; $ status : chr "verified" "verified" "verified" "verified" ...</span></a>
  133. <a class="sourceLine" id="cb4-10" data-line-number="10"><span class="co">#&gt; $ comment : chr "2nd try dampe" "Biggest mistake was losing 1:20 to forgetting a heart piece lol. Average RNG, 40 seconds to save at each of fis"| __truncated__ NA NA ...</span></a>
  134. <a class="sourceLine" id="cb4-11" data-line-number="11"><span class="co">#&gt; $ player_id : chr "e8e5v680" "qjn35kwx" "v819rrxp" "v819rrxp" ...</span></a>
  135. <a class="sourceLine" id="cb4-12" data-line-number="12"><span class="co">#&gt; $ player_url : chr "https://www.speedrun.com/user/zfg" "https://www.speedrun.com/user/dannyb21892" "https://www.speedrun.com/user/Marco" "https://www.speedrun.com/user/Marco" ...</span></a>
  136. <a class="sourceLine" id="cb4-13" data-line-number="13"><span class="co">#&gt; $ player_name : chr "zfg" "dannyb21892" "Marco" "Marco" ...</span></a>
  137. <a class="sourceLine" id="cb4-14" data-line-number="14"><span class="co">#&gt; $ player_role : chr "user" "user" "user" "user" ...</span></a>
  138. <a class="sourceLine" id="cb4-15" data-line-number="15"><span class="co">#&gt; $ player_signup : POSIXct, format: "2015-02-17 03:55:57" "2015-10-28 13:39:39" ...</span></a>
  139. <a class="sourceLine" id="cb4-16" data-line-number="16"><span class="co">#&gt; $ date : Date, format: "2018-10-30" "2018-10-13" ...</span></a>
  140. <a class="sourceLine" id="cb4-17" data-line-number="17"><span class="co">#&gt; $ submitted : POSIXct, format: "2018-10-31 01:33:08" "2018-10-13 20:39:56" ...</span></a>
  141. <a class="sourceLine" id="cb4-18" data-line-number="18"><span class="co">#&gt; $ time_primary : int 14092 14983 14308 14357 15211 14168 14447 20884 15577 22987 ...</span></a>
  142. <a class="sourceLine" id="cb4-19" data-line-number="19"><span class="co">#&gt; $ time_realtime : int 14092 14983 14308 14357 15211 14168 14447 20884 15577 22987 ...</span></a>
  143. <a class="sourceLine" id="cb4-20" data-line-number="20"><span class="co">#&gt; $ time_ingame : int 0 0 0 0 0 0 0 0 0 0 ...</span></a>
  144. <a class="sourceLine" id="cb4-21" data-line-number="21"><span class="co">#&gt; $ time_hms : 'hms' num 03:54:52 04:09:43 03:58:28 03:59:17 ...</span></a>
  145. <a class="sourceLine" id="cb4-22" data-line-number="22"><span class="co">#&gt; ..- attr(*, "units")= chr "secs"</span></a>
  146. <a class="sourceLine" id="cb4-23" data-line-number="23"><span class="co">#&gt; $ system_platform: chr "nzelreqp" "nzelreqp" "nzelreqp" "nzelreqp" ...</span></a>
  147. <a class="sourceLine" id="cb4-24" data-line-number="24"><span class="co">#&gt; $ system_emulated: logi FALSE FALSE FALSE FALSE FALSE FALSE ...</span></a>
  148. <a class="sourceLine" id="cb4-25" data-line-number="25"><span class="co">#&gt; $ system_region : chr "o316x197" "o316x197" "o316x197" "o316x197" ...</span></a></code></pre></div>
  149. <p>We want some additional data:</p>
  150. <div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw">library</span>(dplyr)</a>
  151. <a class="sourceLine" id="cb5-2" data-line-number="2"><span class="kw">library</span>(knitr)</a>
  152. <a class="sourceLine" id="cb5-3" data-line-number="3"></a>
  153. <a class="sourceLine" id="cb5-4" data-line-number="4">oot100 &lt;-<span class="st"> </span>oot100 <span class="op">%&gt;%</span></a>
  154. <a class="sourceLine" id="cb5-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="../reference/add_miscdata.html">add_platforms</a></span>() <span class="op">%&gt;%</span></a>
  155. <a class="sourceLine" id="cb5-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="../reference/add_miscdata.html">add_regions</a></span>() <span class="op">%&gt;%</span></a>
  156. <a class="sourceLine" id="cb5-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="../reference/find_records.html">find_records</a></span>()</a>
  157. <a class="sourceLine" id="cb5-8" data-line-number="8"></a>
  158. <a class="sourceLine" id="cb5-9" data-line-number="9">oot100 <span class="op">%&gt;%</span><span class="st"> </span></a>
  159. <a class="sourceLine" id="cb5-10" data-line-number="10"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span>(time_hms) <span class="op">%&gt;%</span></a>
  160. <a class="sourceLine" id="cb5-11" data-line-number="11"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/select.html">select</a></span>(time_hms, player_name, date, system_platform, system_region) <span class="op">%&gt;%</span></a>
  161. <a class="sourceLine" id="cb5-12" data-line-number="12"><span class="st"> </span><span class="kw">head</span>(<span class="dv">10</span>) <span class="op">%&gt;%</span></a>
  162. <a class="sourceLine" id="cb5-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/knitr/topics/kable">kable</a></span>()</a></code></pre></div>
  163. <table class="table">
  164. <thead><tr class="header">
  165. <th align="left">time_hms</th>
  166. <th align="left">player_name</th>
  167. <th align="left">date</th>
  168. <th align="left">system_platform</th>
  169. <th align="left">system_region</th>
  170. </tr></thead>
  171. <tbody>
  172. <tr class="odd">
  173. <td align="left">03:54:52</td>
  174. <td align="left">zfg</td>
  175. <td align="left">2018-10-30</td>
  176. <td align="left">Wii Virtual Console</td>
  177. <td align="left">JPN / NTSC</td>
  178. </tr>
  179. <tr class="even">
  180. <td align="left">03:56:08</td>
  181. <td align="left">zfg</td>
  182. <td align="left">2018-09-22</td>
  183. <td align="left">Wii Virtual Console</td>
  184. <td align="left">JPN / NTSC</td>
  185. </tr>
  186. <tr class="odd">
  187. <td align="left">03:57:38</td>
  188. <td align="left">zfg</td>
  189. <td align="left">2018-08-20</td>
  190. <td align="left">Wii Virtual Console</td>
  191. <td align="left">JPN / NTSC</td>
  192. </tr>
  193. <tr class="even">
  194. <td align="left">03:58:28</td>
  195. <td align="left">Marco</td>
  196. <td align="left">2018-10-11</td>
  197. <td align="left">Wii Virtual Console</td>
  198. <td align="left">JPN / NTSC</td>
  199. </tr>
  200. <tr class="odd">
  201. <td align="left">03:58:45</td>
  202. <td align="left">zfg</td>
  203. <td align="left">2018-08-01</td>
  204. <td align="left">Wii Virtual Console</td>
  205. <td align="left">JPN / NTSC</td>
  206. </tr>
  207. <tr class="even">
  208. <td align="left">03:59:17</td>
  209. <td align="left">Marco</td>
  210. <td align="left">2018-09-29</td>
  211. <td align="left">Wii Virtual Console</td>
  212. <td align="left">JPN / NTSC</td>
  213. </tr>
  214. <tr class="odd">
  215. <td align="left">04:00:47</td>
  216. <td align="left">Marco</td>
  217. <td align="left">2018-09-17</td>
  218. <td align="left">Wii Virtual Console</td>
  219. <td align="left">JPN / NTSC</td>
  220. </tr>
  221. <tr class="even">
  222. <td align="left">04:01:05</td>
  223. <td align="left">zfg</td>
  224. <td align="left">2018-07-27</td>
  225. <td align="left">Wii Virtual Console</td>
  226. <td align="left">JPN / NTSC</td>
  227. </tr>
  228. <tr class="odd">
  229. <td align="left">04:01:39</td>
  230. <td align="left">Marco</td>
  231. <td align="left">2018-09-01</td>
  232. <td align="left">Wii Virtual Console</td>
  233. <td align="left">JPN / NTSC</td>
  234. </tr>
  235. <tr class="even">
  236. <td align="left">04:03:24</td>
  237. <td align="left">zfg</td>
  238. <td align="left">2018-07-21</td>
  239. <td align="left">Wii Virtual Console</td>
  240. <td align="left">JPN / NTSC</td>
  241. </tr>
  242. </tbody>
  243. </table>
  244. </div>
  245. <div id="category-overview" class="section level2">
  246. <h2 class="hasAnchor">
  247. <a href="#category-overview" class="anchor"></a>Category Overview</h2>
  248. <p>Now we can take a look at the categories (recent) history, with highlighted records:</p>
  249. <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw">library</span>(ggplot2)</a>
  250. <a class="sourceLine" id="cb6-2" data-line-number="2"><span class="kw">library</span>(ggrepel)</a>
  251. <a class="sourceLine" id="cb6-3" data-line-number="3"><span class="kw">library</span>(hrbrthemes)</a>
  252. <a class="sourceLine" id="cb6-4" data-line-number="4"><span class="kw">library</span>(hms)</a>
  253. <a class="sourceLine" id="cb6-5" data-line-number="5"></a>
  254. <a class="sourceLine" id="cb6-6" data-line-number="6">oot100 <span class="op">%&gt;%</span></a>
  255. <a class="sourceLine" id="cb6-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(time_hms <span class="op">&lt;</span><span class="st"> </span>hms<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/hms/topics/hms">hms</a></span>(<span class="dt">hours =</span> <span class="dv">6</span>)) <span class="op">%&gt;%</span></a>
  256. <a class="sourceLine" id="cb6-8" data-line-number="8"><span class="st"> </span>{</a>
  257. <a class="sourceLine" id="cb6-9" data-line-number="9"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(., <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(date, time_hms)) <span class="op">+</span></a>
  258. <a class="sourceLine" id="cb6-10" data-line-number="10"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>(<span class="dt">size =</span> <span class="dv">1</span>, <span class="dt">alpha =</span> <span class="fl">.75</span>) <span class="op">+</span></a>
  259. <a class="sourceLine" id="cb6-11" data-line-number="11"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>(<span class="dt">size =</span> <span class="dv">2</span>, <span class="dt">data =</span> <span class="kw"><a href="http://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(., record), <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">color =</span> player_name)) <span class="op">+</span></a>
  260. <a class="sourceLine" id="cb6-12" data-line-number="12"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggrepel/topics/geom_text_repel">geom_label_repel</a></span>(<span class="dt">data =</span> <span class="kw"><a href="http://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(., record),</a>
  261. <a class="sourceLine" id="cb6-13" data-line-number="13"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">label =</span> time_hms, <span class="dt">color =</span> player_name),</a>
  262. <a class="sourceLine" id="cb6-14" data-line-number="14"> <span class="dt">fill =</span> <span class="st">"white"</span>, <span class="dt">show.legend =</span> F) <span class="op">+</span></a>
  263. <a class="sourceLine" id="cb6-15" data-line-number="15"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_date">scale_x_date</a></span>(<span class="dt">date_breaks =</span> <span class="st">"6 months"</span>, <span class="dt">date_labels =</span> <span class="st">"%b '%y"</span>) <span class="op">+</span></a>
  264. <a class="sourceLine" id="cb6-16" data-line-number="16"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_date">scale_y_time</a></span>(<span class="dt">breaks =</span> <span class="kw">seq</span>(<span class="dv">2</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">20</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">1</span><span class="op">/</span><span class="dv">3</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>),</a>
  265. <a class="sourceLine" id="cb6-17" data-line-number="17"> <span class="dt">minor_breaks =</span> <span class="kw">seq</span>(<span class="dv">2</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">20</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">5</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span>)) <span class="op">+</span></a>
  266. <a class="sourceLine" id="cb6-18" data-line-number="18"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_brewer">scale_color_brewer</a></span>(<span class="dt">palette =</span> <span class="st">"Dark2"</span>) <span class="op">+</span></a>
  267. <a class="sourceLine" id="cb6-19" data-line-number="19"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/labs">labs</a></span>(<span class="dt">title =</span> <span class="st">"Ocarina of Time: 100% Speedrun Record History"</span>,</a>
  268. <a class="sourceLine" id="cb6-20" data-line-number="20"> <span class="dt">subtitle =</span> <span class="kw">paste0</span>(<span class="st">"All data from speedrun.com (n = "</span>, <span class="kw">nrow</span>(.), <span class="st">")"</span>),</a>
  269. <a class="sourceLine" id="cb6-21" data-line-number="21"> <span class="dt">x =</span> <span class="st">"Date of Run"</span>, <span class="dt">y =</span> <span class="st">"Time"</span>,</a>
  270. <a class="sourceLine" id="cb6-22" data-line-number="22"> <span class="dt">color =</span> <span class="st">"Runner"</span>, <span class="dt">caption =</span> <span class="st">"Data limited to sub 6h runs"</span>) <span class="op">+</span></a>
  271. <a class="sourceLine" id="cb6-23" data-line-number="23"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/hrbrthemes/topics/theme_ipsum">theme_ipsum</a></span>() <span class="op">+</span></a>
  272. <a class="sourceLine" id="cb6-24" data-line-number="24"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/theme">theme</a></span>(<span class="dt">legend.position =</span> <span class="st">"top"</span>)</a>
  273. <a class="sourceLine" id="cb6-25" data-line-number="25"> }</a></code></pre></div>
  274. <p><img src="ocarina-of-time-100-_files/figure-html/oot_100_overview-1.png" width="768"></p>
  275. <p>Please note that the data on speedrun.com does <em>not</em> cover the whole history. There are lots of older runs missing here, and unless the mods come together und do some historic backlogging, that’s as good as it gets for now.</p>
  276. <p>We can also take a look at the recent developments:</p>
  277. <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw">library</span>(lubridate)</a>
  278. <a class="sourceLine" id="cb7-2" data-line-number="2"></a>
  279. <a class="sourceLine" id="cb7-3" data-line-number="3">tmp &lt;-<span class="st"> </span>oot100 <span class="op">%&gt;%</span></a>
  280. <a class="sourceLine" id="cb7-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(time_hms <span class="op">&lt;</span><span class="st"> </span>hms<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/hms/topics/hms">hms</a></span>(<span class="dt">hours =</span> <span class="dv">4</span>, <span class="dt">minutes =</span> <span class="dv">30</span>),</a>
  281. <a class="sourceLine" id="cb7-5" data-line-number="5"> date <span class="op">&gt;=</span><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/lubridate/topics/ymd">ymd</a></span>(<span class="st">"2018-01-01"</span>)) <span class="op">%&gt;%</span></a>
  282. <a class="sourceLine" id="cb7-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/select.html">select</a></span>(player_name, time_hms, date)</a>
  283. <a class="sourceLine" id="cb7-7" data-line-number="7"></a>
  284. <a class="sourceLine" id="cb7-8" data-line-number="8"><span class="kw"><a href="http://dplyr.tidyverse.org/reference/bind.html">bind_rows</a></span>(</a>
  285. <a class="sourceLine" id="cb7-9" data-line-number="9"> tmp,</a>
  286. <a class="sourceLine" id="cb7-10" data-line-number="10"> tmp <span class="op">%&gt;%</span></a>
  287. <a class="sourceLine" id="cb7-11" data-line-number="11"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(player_name) <span class="op">%&gt;%</span></a>
  288. <a class="sourceLine" id="cb7-12" data-line-number="12"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span>(<span class="dt">time_hms =</span> <span class="kw">min</span>(time_hms), <span class="dt">date =</span> <span class="kw"><a href="http://www.rdocumentation.org/packages/lubridate/topics/today">today</a></span>()) <span class="op">%&gt;%</span></a>
  289. <a class="sourceLine" id="cb7-13" data-line-number="13"><span class="st"> </span>ungroup</a>
  290. <a class="sourceLine" id="cb7-14" data-line-number="14">) <span class="op">%&gt;%</span></a>
  291. <a class="sourceLine" id="cb7-15" data-line-number="15"><span class="st"> </span>{</a>
  292. <a class="sourceLine" id="cb7-16" data-line-number="16"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(., <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(date, time_hms, <span class="dt">color =</span> player_name, <span class="dt">fill =</span> player_name)) <span class="op">+</span></a>
  293. <a class="sourceLine" id="cb7-17" data-line-number="17"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>(<span class="dt">size =</span> <span class="dv">1</span>, <span class="dt">alpha =</span> <span class="fl">.75</span>) <span class="op">+</span></a>
  294. <a class="sourceLine" id="cb7-18" data-line-number="18"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_path">geom_step</a></span>() <span class="op">+</span></a>
  295. <a class="sourceLine" id="cb7-19" data-line-number="19"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggrepel/topics/geom_text_repel">geom_label_repel</a></span>(<span class="dt">data =</span> .</a>
  296. <a class="sourceLine" id="cb7-20" data-line-number="20"> <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(player_name) <span class="op">%&gt;%</span></a>
  297. <a class="sourceLine" id="cb7-21" data-line-number="21"><span class="st"> </span><span class="kw"><a href="http://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span>(<span class="dt">y =</span> <span class="kw">min</span>(time_hms), <span class="dt">x =</span> <span class="kw">max</span>(date)),</a>
  298. <a class="sourceLine" id="cb7-22" data-line-number="22"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">label =</span> <span class="kw">paste0</span>(player_name, <span class="st">": "</span>, y), <span class="dt">x =</span> x, <span class="dt">y =</span> y),</a>
  299. <a class="sourceLine" id="cb7-23" data-line-number="23"> <span class="dt">color =</span> <span class="st">"black"</span>, <span class="dt">alpha =</span> <span class="fl">.75</span>, <span class="dt">show.legend =</span> F,</a>
  300. <a class="sourceLine" id="cb7-24" data-line-number="24"> <span class="dt">hjust =</span> <span class="dv">1</span>, <span class="dt">direction =</span> <span class="st">"y"</span>, <span class="dt">nudge_x =</span> <span class="dv">60</span><span class="op">^</span><span class="dv">2</span>) <span class="op">+</span></a>
  301. <a class="sourceLine" id="cb7-25" data-line-number="25"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_date">scale_x_date</a></span>(<span class="dt">date_breaks =</span> <span class="st">"1 month"</span>, <span class="dt">date_labels =</span> <span class="st">"%b '%y"</span>,</a>
  302. <a class="sourceLine" id="cb7-26" data-line-number="26"> <span class="dt">limits =</span> <span class="kw">c</span>(<span class="kw">as.Date</span>(<span class="ot">NA</span>), <span class="kw"><a href="http://www.rdocumentation.org/packages/lubridate/topics/today">today</a></span>() <span class="op">+</span><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/lubridate/topics/period">days</a></span>(<span class="dv">45</span>))) <span class="op">+</span></a>
  303. <a class="sourceLine" id="cb7-27" data-line-number="27"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_date">scale_y_time</a></span>(<span class="dt">breaks =</span> <span class="kw">seq</span>(<span class="dv">0</span>, <span class="dv">20</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">1</span><span class="op">/</span><span class="dv">12</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>),</a>
  304. <a class="sourceLine" id="cb7-28" data-line-number="28"> <span class="dt">minor_breaks =</span> <span class="kw">seq</span>(<span class="dv">0</span>, <span class="dv">20</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span><span class="op">^</span><span class="dv">2</span>, <span class="dv">1</span><span class="op">/</span><span class="dv">24</span> <span class="op">*</span><span class="st"> </span><span class="dv">60</span>)) <span class="op">+</span></a>
  305. <a class="sourceLine" id="cb7-29" data-line-number="29"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_brewer">scale_color_brewer</a></span>(<span class="dt">palette =</span> <span class="st">"Dark2"</span>, <span class="dt">guide =</span> F) <span class="op">+</span></a>
  306. <a class="sourceLine" id="cb7-30" data-line-number="30"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/scale_brewer">scale_fill_brewer</a></span>(<span class="dt">palette =</span> <span class="st">"Dark2"</span>, <span class="dt">guide =</span> F) <span class="op">+</span></a>
  307. <a class="sourceLine" id="cb7-31" data-line-number="31"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/labs">labs</a></span>(<span class="dt">title =</span> <span class="st">"Ocarina of Time: 100% Speedruns in 2018"</span>,</a>
  308. <a class="sourceLine" id="cb7-32" data-line-number="32"> <span class="dt">subtitle =</span> <span class="st">"All data from speedrun.com"</span>,</a>
  309. <a class="sourceLine" id="cb7-33" data-line-number="33"> <span class="dt">x =</span> <span class="st">"Date of Run"</span>, <span class="dt">y =</span> <span class="st">"Time (H:M:S)"</span>) <span class="op">+</span></a>
  310. <a class="sourceLine" id="cb7-34" data-line-number="34"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/hrbrthemes/topics/theme_ipsum">theme_ipsum</a></span>(<span class="dt">grid =</span> <span class="st">"X"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/theme">theme</a></span>(<span class="dt">axis.text.x =</span> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/element">element_text</a></span>(<span class="dt">hjust =</span> <span class="dv">0</span>))</a>
  311. <a class="sourceLine" id="cb7-35" data-line-number="35"> }</a></code></pre></div>
  312. <p><img src="ocarina-of-time-100-_files/figure-html/oot_100_recents-1.png" width="1152"></p>
  313. </div>
  314. </div>
  315. <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
  316. <div id="tocnav">
  317. <h2 class="hasAnchor">
  318. <a href="#tocnav" class="anchor"></a>Contents</h2>
  319. <ul class="nav nav-pills nav-stacked">
  320. <li><a href="#identify-what-you-want">Identify what you want</a></li>
  321. <li><a href="#category-overview">Category Overview</a></li>
  322. </ul>
  323. </div>
  324. </div>
  325. </div>
  326. <footer><div class="copyright">
  327. <p>Developed by Lukas Burk.</p>
  328. </div>
  329. <div class="pkgdown">
  330. <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
  331. </div>
  332. </footer>
  333. </div>
  334. </body>
  335. </html>