Giter VIP home page Giter VIP logo

packagetracker's Introduction

Package Tracker

Package Tracker: Active GitHub last commit

This is a function to track your packages and create download and output statistics as a list object. The outputs from the PackageTracker function are:

  1. The download statistics per month
  2. The download plot
  3. Aggregate summary of the number of downloads per month

To use the tracker just type in the name of your package on CRAN to download, such as package_to_search <- 'ConfusionTableR'.

Using the function

package_to_search <- 'ConfusionTableR'
results <- package_trackeR(c(package_to_search))

To output the results of the package use:

results_vec <- results$download_df$downloads
mean(results_vec)

This will produce a summary of the downloads, per month, for that package.

To generate a plot, you can use:

plot <- results$downloads_plot

Printing this plot will give you a standard ggplot2 object, but to spice it up we can add a smoothing function, and some styling, plus wrap it in a plotly wrapper:

library(plotly)
plot <- plot + geom_smooth(color='red', fill='grey', method='loess', formula='y ~ x') + geom_line(color='black') + 
  geom_point(color='black') + theme(legend.position = 'none') + 
  labs(title=paste(package_to_search, 'downloads plot'))
ggplotly(plot)

This will produce a similar plot to this:

packagetracker's People

Contributors

statsgary avatar

Watchers

James Cloos avatar  avatar

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.