Compare data on Taylor Swift and Kanye West.
You can install the development version of karrma from GitHub with:
# install.packages("devtools")
devtools::install_github("judith-bourque/karrma")
library("karrma")
library("gt")
library("dplyr")
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
data <- head(mtcars) %>%
mutate(like = "heart")
data %>%
gt() %>%
tab_header(title = "Spotify theme table") %>%
cols_label(
like = ""
) %>%
theme_spotify() %>%
gtExtras::gt_fa_column(like,
prefer_type = "solid",
palette = "lightgreen",
align = "center") %>%
gtsave("man/figures/visualize_spotify.png", expand = 10)
library("gt")
library("dplyr")
data <- get_bio(id = get_qid()) %>%
mutate(like = "heart")
#> Joining, by = "label"
#> Joining, by = "label"
data %>%
gt() %>%
tab_header(title = "Wikidata data") %>%
cols_label(
like = ""
) %>%
theme_spotify() %>%
gtExtras::gt_fa_column(like,
prefer_type = "solid",
palette = "lightgreen",
align = "center") %>%
gtsave("man/figures/visualize_bio.png", expand = 10)
get_pageviews_raw(granularity = "monthly") %>%
head()
#> project language article access agent granularity date
#> 1 wikipedia en Taylor_Swift all-access all-agents monthly 2015-10-01
#> 2 wikipedia en Taylor_Swift all-access all-agents monthly 2015-11-01
#> 3 wikipedia en Taylor_Swift all-access all-agents monthly 2015-12-01
#> 4 wikipedia en Taylor_Swift all-access all-agents monthly 2016-01-01
#> 5 wikipedia en Taylor_Swift all-access all-agents monthly 2016-02-01
#> 6 wikipedia en Taylor_Swift all-access all-agents monthly 2016-03-01
#> views
#> 1 736505
#> 2 657281
#> 3 719577
#> 4 623515
#> 5 875317
#> 6 552923
visualize_pageviews()