All Projects → tylermorganwall → adjustedcranlogs

tylermorganwall / adjustedcranlogs

Licence: other
Removes daily shared downloads amongst CRAN packages and re-download/CRAN mirror spikes associated with package updates.

Programming Languages

r
7636 projects

adjustedcranlogs

CRAN_Status_Badge

Overview

adjustedcranlogs is a wrapper around the cranlogs package that removes CRAN-wide shared daily downloads and re-download/CRAN mirror spikes due to package updates.

Installation

# To install: 
install.packages("adjustedcranlogs")

# To install developmental version:
# install.packages("devtools")
devtools::install_github("tylermorganwall/adjustedcranlogs")

Function (there's only one)

  • adj_cran_downloads() Wrapper around cranlogs function cran_downloads(). Works the same, but returns a data frame showing the adjusted downloads, adjusted total downloads, shared minimum downloads, and package update information.

Usage

library(adjustedcranlogs)
library(ggplot2)
library(dplyr)
library(lubridate)

mypkgdownloads = adj_cran_downloads("skpr",from = "2017-08-15", to = "2017-11-15")

mypkgdownloads %>%
  ggplot() + 
  geom_line(aes(x=date,y=adjusted_total_downloads)) +
  geom_line(aes(x=date,y=total_downloads),color="red",linetype="dashed") +
  annotate("text",y=400,x=dmy("01-10-2017"),label="Raw Downloads",color="red") +
  annotate("text",y=50,x=dmy("20-10-2017"),label="Adjusted Downloads",color="black") +
  theme_minimal()

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].