GitXplorerGitXplorer
d

clockwork

public
10 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
40ef5d98111fd7d09a1b61cc7832f5fe36cccd68

updates all around

ddaranzolin committed 3 years ago
Unverified
a1fa92ea8574496a4df664a76dcfc8fce96ddb57

cleanup

ddaranzolin committed 3 years ago
Unverified
70999ffe2d5aa5b6322059acf7108bca25c32c61

xaxis no longer truncating final value

ddaranzolin committed 3 years ago
Verified
86705f8c2c21c649b58680048e090a81bbd7405a

Update clockwork.R

ddaranzolin committed 5 years ago
Unverified
f3baf44af3c5d5048b1aac17fec7ca4ad5c1e7f7

update

ddaranzolin committed 5 years ago
Unverified
2f02cb6db428f8e98ea4045949b7421f2c4426d3

another working update

ddaranzolin committed 5 years ago

README

The README file for this repository.

clockwork

CRAN log

clockwork creates a cyclical, radial line charts. Cycle through years, months, days, hours, minutes, or campaigns.

Installation

You can install the released version of clockwork from GitHub with:

remotes::install_github("daranzolin/clockwork")

Example 1: Daily Births by Year

library(tidyverse)
library(lubridate)
births <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2018/2018-10-02/us_births_2000-2014.csv")
births <- births %>% 
  unite("date", date_of_month, month, year, sep = "-") %>% 
  mutate(date = lubridate::dmy(date),
         day_of_year = yday(date),
         year = year(date)) 

births %>% 
  filter(year %in% 2008:2014) %>% 
  clockwork(x = day_of_year,
            y = births,
            cycle = year,
            cycle_label = "Year: ",
            show_cycle_stats = TRUE,
            x_ticks = 12) 

Control loop duration, stroke line colors/opacity, and font size/family with the cw_style function.