-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
116 lines (87 loc) · 3.44 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
library(lubridate)
knitr::opts_chunk$set(
echo = FALSE
)
```
# workflowr-metrics
[![status](https://github.com/workflowr/workflowr-metrics/workflows/metrics/badge.svg)](https://github.com/workflowr/workflowr-metrics/actions/workflows/metrics.yaml)
Source: public GitHub repositories
Last update: `r Sys.time()`
<!--
```{r projects}
# projects <- read.delim("data/github-projects.txt", stringsAsFactors = FALSE)
# projects$count <- 1
# projects$cumulative <- cumsum(projects$count)
```
```{r activity}
# projects$last_push <- as_date(projects$last_push)
# # weekly active projects
# last_week <- today() - weeks(1)
# stopifnot(is.Date(last_week))
# weekly_active <- projects$last_push >= last_week
# weekly_active_proj <- sum(weekly_active, na.rm = TRUE)
# weekly_active_user <- length(unique(projects$user[weekly_active]))
#
# # monthly active projects
# last_month <- today() %m-% months(1)
# stopifnot(is.Date(last_month))
# monthly_active <- projects$last_push >= last_month
# monthly_active_proj <- sum(monthly_active, na.rm = TRUE)
# monthly_active_user <- length(unique(projects$user[monthly_active]))
```
* Weekly active projects (unique users): `r #weekly_active_proj` (`r #weekly_active_user`)
* Monthly active projects (unique users): `r #monthly_active_proj` (`r #monthly_active_user`)
* Number of workflowr projects on GitHub: `r #projects$cumulative[nrow(projects)]`
```{r activity-save}
# activity_line <- sprintf("%s\t%d\t%d\t%d\t%d\n", today(),
# weekly_active_proj, weekly_active_user,
# monthly_active_proj, monthly_active_user)
# cat(activity_line, file = "data/activity.txt", append = TRUE)
```
-->
```{r stars}
stars <- read.delim("data/github-stars.txt", stringsAsFactors = FALSE)
stars$count <- 1
stars$cumulative <- cumsum(stars$count)
```
* Stars of workflowr GitHub repository: `r stars$cumulative[nrow(stars)]`
```{r downloads}
downloads <- read.delim("data/cranlogs.txt", stringsAsFactors = FALSE)
downloads$cumulative <- cumsum(downloads$count)
```
* CRAN downloads: `r downloads$cumulative[nrow(downloads)]`
```{r packagerank}
packagerank <- read.delim("data/packagerank.txt", stringsAsFactors = FALSE)
packagerank_latest <- packagerank[nrow(packagerank), ]
```
* CRAN package percentile (on `r packagerank_latest$date`): `r packagerank_latest$percentile`
```{r watchers}
watchers <- read.delim("data/github-watchers.txt", stringsAsFactors = FALSE)
```
* Watchers of workflowr GitHub repository: `r nrow(watchers)`
```{r forks}
forks <- read.delim("data/github-forks.txt", stringsAsFactors = FALSE)
forks$count <- 1
forks$cumulative <- cumsum(forks$count)
```
* Forks of workflowr GitHub repository: `r forks$cumulative[nrow(forks)]`
```{r forks-updated}
# How many forks were updated more than 60 seconds after being created?
forks_updated <- sum(forks$update_difftime > 60, na.rm = TRUE)
```
* Forks of workflowr GitHub repository with updates: `r forks_updated`
```{r views}
views <- read.delim("data/github-views.txt", stringsAsFactors = FALSE)
views$cumulative <- cumsum(views$count)
```
* Views of workflowr GitHub repository: `r views$cumulative[nrow(views)]`
```{r clones}
clones <- read.delim("data/github-clones.txt", stringsAsFactors = FALSE)
clones$cumulative <- cumsum(clones$count)
```
* Clones of workflowr GitHub repository: `r clones$cumulative[nrow(clones)]`