-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
232 lines (205 loc) · 14.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Provides tools to interact nicely with the Genius API
<https://docs.genius.com/>.
Search hosted content, extract associated metadata and retrieve lyrics with ease.">
<title>Tools for Working with the Genius API • geniusr</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="deps/bootstrap-5.1.3/bootstrap.min.css" rel="stylesheet">
<script src="deps/bootstrap-5.1.3/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><link href="extra.css" rel="stylesheet">
<meta property="og:title" content="Tools for Working with the Genius API">
<meta property="og:description" content="Provides tools to interact nicely with the Genius API
<https://docs.genius.com/>.
Search hosted content, extract associated metadata and retrieve lyrics with ease.">
<meta property="og:image" content="https://ewenme.github.io/geniusr/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="index.html">geniusr</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.1</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse ms-3">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="articles/geniusr.html">Get started</a>
</li>
<li class="nav-item">
<a class="nav-link" href="reference/index.html">Reference</a>
</li>
<li class="nav-item">
<a class="nav-link" href="news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/ewenme/geniusr/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-home">
<div class="row">
<main id="main" class="col-md-9"><div class="section level1">
<div class="page-header">
<img src="logo.png" class="logo" alt=""><h1 id="geniusr-">geniusr <a class="anchor" aria-label="anchor" href="#geniusr-"></a>
</h1>
</div>
<!-- badges: start -->
<div class="section level2">
<h2 id="overview">Overview<a class="anchor" aria-label="anchor" href="#overview"></a>
</h2>
<p>Tools for working with the <em>Genius</em> (FKA <em>Rap Genius</em>) API.</p>
<ul>
<li>Genius Developers Site: <a href="https://genius.com/developers" class="external-link uri">https://genius.com/developers</a>
</li>
<li>Genius API Docs: <a href="https://docs.genius.com/" class="external-link uri">https://docs.genius.com/</a>
</li>
</ul>
</div>
<div class="section level2">
<h2 id="install">Install<a class="anchor" aria-label="anchor" href="#install"></a>
</h2>
<p>Get the latest stable version from CRAN…</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"geniusr"</span><span class="op">)</span></span></code></pre></div>
<p>…or install the development version from Github (recommended).</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"ewenme/geniusr"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="authenticate">Authenticate<a class="anchor" aria-label="anchor" href="#authenticate"></a>
</h2>
<ol style="list-style-type: decimal">
<li><a href="https://genius.com/api-clients/new" class="external-link">Create a Genius API client</a></li>
<li>Generate a client access token from your <a href="https://genius.com/api-clients" class="external-link">API Clients page</a>
</li>
<li>Set your credentials in the System Environment variable <code>GENIUS_API_TOKEN</code> by calling the <code><a href="reference/genius_token.html">genius_token()</a></code> function and entering your Genius Client Access Token when prompted.</li>
</ol>
</div>
<div class="section level2">
<h2 id="use">Use<a class="anchor" aria-label="anchor" href="#use"></a>
</h2>
<p>Start with <a href="https://ewenme.github.io/geniusr/articles/geniusr.html">the basics!</a></p>
<div class="section level3">
<h3 id="how-many-times-did-ye-say-good-morning-on-the-track-good-morning">How many times did ’Ye say “good morning”, on the track “Good Morning”?<a class="anchor" aria-label="anchor" href="#how-many-times-did-ye-say-good-morning-on-the-track-good-morning"></a>
</h3>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://ewenme.github.io/geniusr/">geniusr</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/juliasilge/tidytext" class="external-link">tidytext</a></span><span class="op">)</span></span>
<span></span>
<span><span class="co"># get lyrics</span></span>
<span><span class="fu"><a href="reference/get_lyrics_search.html">get_lyrics_search</a></span><span class="op">(</span>artist_name <span class="op">=</span> <span class="st">"Kanye West"</span>,</span>
<span> song_title <span class="op">=</span> <span class="st">"Good Morning"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> </span>
<span> <span class="co"># get lyric bigrams</span></span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/tidytext/man/unnest_tokens.html" class="external-link">unnest_tokens</a></span><span class="op">(</span><span class="va">bigram</span>, <span class="va">line</span>, token <span class="op">=</span> <span class="st">"ngrams"</span>, n <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span>
<span> <span class="co"># look for good morning</span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="va">bigram</span> <span class="op">==</span> <span class="st">"good morning"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> </span>
<span> <span class="co"># count bigram frequency</span></span>
<span> <span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">nrow</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co">#> [1] 18</span></span></code></pre></div>
</div>
</div>
<div class="section level2">
<h2 id="other">Other<a class="anchor" aria-label="anchor" href="#other"></a>
</h2>
<ul>
<li>Get citation information for geniusr in R with <code>citation(package = 'geniusr')</code>
</li>
<li>Please note that the geniusr project is released with a <a href="https://ewenme.github.io/geniusr//CODE_OF_CONDUCT.html">Contributor Code of Conduct</a>. By contributing to this project, you agree to abide by its terms.</li>
</ul>
</div>
<div class="section level2">
<h2 id="related-work">Related work<a class="anchor" aria-label="anchor" href="#related-work"></a>
</h2>
<ul>
<li>the <a href="https://github.com/JosiahParry/genius" class="external-link">genius</a> package specialises in lyrics retrieval from Genius.</li>
</ul>
</div>
</div>
</main><aside class="col-md-3"><div class="links">
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li><a href="https://cloud.r-project.org/package=geniusr" class="external-link">View on CRAN</a></li>
<li><a href="https://github.com/ewenme/geniusr/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/ewenme/geniusr/issues" class="external-link">Report a bug</a></li>
</ul>
</div>
<div class="license">
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li>
<a href="https://opensource.org/licenses/mit-license.php" class="external-link">MIT</a> + file <a href="LICENSE-text.html">LICENSE</a>
</li>
</ul>
</div>
<div class="community">
<h2 data-toc-skip>Community</h2>
<ul class="list-unstyled">
<li><a href="CODE_OF_CONDUCT.html">Code of conduct</a></li>
</ul>
</div>
<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing geniusr</a></li>
</ul>
</div>
<div class="developers">
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>
<a href="https://ewen.io" class="external-link">Ewen Henderson</a> <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0002-4748-4693" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
</ul>
</div>
<div class="dev-status">
<h2 data-toc-skip>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://www.tidyverse.org/lifecycle/#maturing" class="external-link"><img src="https://img.shields.io/badge/lifecycle-maturing-blue.svg" alt="Lifecycle: maturing"></a></li>
<li><a href="https://cran.r-project.org/package=geniusr" class="external-link"><img src="https://www.r-pkg.org/badges/version/geniusr" alt="CRAN status"></a></li>
<li><a href="http://cran.rstudio.com/web/packages/geniusr/index.html" class="external-link"><img src="http://cranlogs.r-pkg.org/badges/geniusr" alt="DLs"></a></li>
<li><a href="https://travis-ci.org/ewenme/geniusr" class="external-link"><img src="https://travis-ci.org/ewenme/geniusr.png" alt="Travis build Status"></a></li>
<li><a href="https://ci.appveyor.com/project/ewenme/geniusr" class="external-link"><img src="https://ci.appveyor.com/api/projects/status/github/ewenme/geniusr?branch=master&svg=true" alt="AppVeyor build status"></a></li>
<li><a href="https://codecov.io/gh/ewenme/geniusr?branch=master" class="external-link"><img src="https://codecov.io/gh/ewenme/geniusr/branch/master/graph/badge.svg" alt="Codecov test coverage"></a></li>
</ul>
</div>
</aside>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by <a href="https://ewen.io" class="external-link">Ewen Henderson</a>.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p>
</div>
</footer>
</div>
</body>
</html>