Giter Site home page Giter Site logo

karrma's Introduction

karrma

Lifecycle: experimental R-CMD-check

Compare data on Taylor Swift and Kanye West.

Installation

You can install the development version of karrma from GitHub with:

# install.packages("devtools")
devtools::install_github("judith-bourque/karrma")
library("karrma")

Examples

Apply Spotify theme to a gt object

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)

alt text here

Compare Wikidata data

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)

alt text here

Compare Wikipedia data

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.