Package 'skyphone'

Title: Fetch, Sonify And Plot GitHub Skyline Data
Description: Fetch contributions data for a given GitHub user in a given year via the GitHub Skyline API, with functions for presenting in audio or visual formats.
Authors: Matt Dray [aut, cre]
Maintainer: Matt Dray <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-11-15 04:36:27 UTC
Source: https://github.com/matt-dray/skyphone

Help Index


Fetch GitHub Skyline Data

Description

Construct a GitHub Skyline API path for a given user and year, fetch and augment the data, and convert to a tidy tabular format.

Usage

sky_get(user, year = 2020)

Arguments

user

Character string. A GitHub user whose contributions you want to fetch.

year

Single numeric value. The year for which you want to collect the contribution count.

Value

A data.frame/tibble with columns user, year, week, day, date and count. Row count will be 365 or 366 if a leap year.

Examples

## Not run:  sky_get(user = "matt-dray", year = 2020)

Plot A GitHub Skyline Dataset

Description

Produce a simple, opinionated plot of GitHub Skyline data showing contribution count over time for a given year.

Usage

sky_plot(data)

Arguments

data

A data.frame/tibble. An object output from sky_get containing the GitHub contributions data for a given user in a given year.

Value

A gg/ggplot-class object.

Examples

## Not run: 
    d <- sky_get(user = "matt-dray", year = 2020)
    sky_plot(d)
    
## End(Not run)

Sonify A GitHub Skyline Dataset

Description

Present GitHub Skyline contributions data in audio format using the sonify package.

Usage

sky_sonify(data, play = TRUE, out_dir = NULL)

Arguments

data

A data.frame/tibble. An object output from sky_get containing the GitHub contributions data for a given user in a given year.

play

Logical. Should the audio be played? Defaults to TRUE

out_dir

Character. The folder to which the audio file will be saved. Defaults to NULL (no file is saved).

Value

A WaveMC-class object, plus optional audio output and a .wav file.

Examples

## Not run: 
    d <- sky_get(user = "matt-dray", year = 2020)
    sky_sonify (d, play = FALSE, out_dir = "~/Desktop")
    
## End(Not run)