-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrapper_testing.Rmd
More file actions
72 lines (53 loc) · 1.33 KB
/
wrapper_testing.Rmd
File metadata and controls
72 lines (53 loc) · 1.33 KB
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
---
title: "wrapper_testing"
author: "Gillian McGinnis"
date: "5/11/2021"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(tidyverse)
library(genius)
#install.packages("geniusr")
library(geniusr)
```
```{r}
mini_df <- my_lyrics %>%
mutate(artist = "alt-J") %>%
select(!rowid) %>%
full_join(genius_testy) %>%
mutate(
album = fct_inorder(as.factor(album)),
artist = fct_inorder(as.factor(artist)),
track_title = fct_reorder(as.factor(track_title), track_n)
)
write.csv(mini_df, file = "album_analyzer/example_lyrics.csv", row.names = FALSE)
```
```{r}
read_csv("album_analyzer/example_lyrics.csv")
```
```{r old_wrap, eval = FALSE}
df_input <- data.frame(
artist = c("New Order", "Beck", "Beck"),
album = c("Power Corruption and Lies", "Odelay", "The Information")
)
df_input %>%
add_genius(artist, album, type = "album")
df_tracks <- genius_album("Beck", "Odelay") %>% mutate(artist = "Beck")
df_tracks %>%
select(artist, track_title) %>%
rename(song = track_title)
```
```{r}
get_lyrics_search(artist_name = "Kanye West",
song_title = "Good Morning")
```
```{python, eval = FALSE, echo = FALSE}
print("Hello Python!")
pip install "lyricsgenius"
import lyricsgenius
genius = lyricsgenius.Genius(token)
#genius = Genius()
```