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

karrma's People

Contributors

judith-bourque avatar

Watchers

 avatar

karrma's Issues

Create gt Spotify theme

Issue

gt Spotify theme should be usable without the Spotify data.

Proposed solution

Create gt Spotify theme.

After, remove Spotify functions #4.

Consolidate documentation for biography data

Issue

Some functions have identical data and repeats documentation. It would be easier if similar functions would be indexed in one place and documentation written more efficiently.

Proposed solution

Combine and simplify documentation for biography data.

Add function to get data from Wikidata

Create new function that gathers data on Taylor Swift and Kanye West through tidywikidatar or QueryWikidataServiceR

Data options

  • Number of social media followers
  • Number of awards won
  • Number of nominations
  • Net worth
  • Number of instruments played

Add heart icons to Spotify theme example

Issue

The Spotify theme looks more realistic when green heart icons are included.

Proposed solution

The heart icons are probably best left up to the discretion of users, instead of being included in the theme.

Adding them to the documentation example would be useful for users.

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.