Skip to content

Commit 6f37ef4

Browse files
Renames vignette to NSAP_summary
Fix spacing to 2 spaces Adds Len's user name Removes all packages that are imports of projectstats
1 parent 568dc38 commit 6f37ef4

File tree

2 files changed

+40
-44
lines changed

2 files changed

+40
-44
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Imports:
1818
purrr,
1919
tibble,
2020
tidyr
21-
Suggests:
21+
Suggests:
22+
ggplot2,
2223
testthat (>= 3.0.0)
2324
Config/testthat/edition: 3
2425
Encoding: UTF-8
Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ format:
55
theme: default
66
---
77

8-
98
## Why
109

1110
Within the National Stock Assessment Program (NSAP), it is a priority to place versioned code on GitHub Enterprise to facilitate ensuring that the code is automatically backed up without extra work from the individual user. This summary lists the number of repositories each user has under their personal GitHub account and how many of those are forks, which do not need to be on Enterprise.
@@ -15,36 +14,32 @@ Within the National Stock Assessment Program (NSAP), it is a priority to place v
1514
#| warning: false
1615
1716
library(projectstats)
18-
library(dplyr)
1917
library(ggplot2)
20-
library(knitr)
21-
library(purrr)
22-
library(tidyr)
2318
2419
# All GitHub user names for people in NSAP
2520
user_names <- c(
26-
"Steven-Saul-NOAA",
27-
# Abby
28-
"AndreaChan-NOAA",
29-
"ClaireGonzales-NOAA",
30-
# Jeff
31-
# Len
32-
"kellijohnson-NOAA",
33-
"msupernaw",
34-
"Melissa-Karp",
35-
"ChristineStawitz-NOAA",
36-
"Andrea-Havron-NOAA",
37-
"Bai-Li-NOAA",
38-
"k-doering-NOAA",
39-
"PatrickLynch-NOAA",
40-
"e-perl-NOAA",
41-
"Schiano-NOAA",
42-
"sbreitbart-NOAA"
21+
"Steven-Saul-NOAA",
22+
# Abby
23+
"AndreaChan-NOAA",
24+
"ClaireGonzales-NOAA",
25+
# Jeff
26+
"RoselynAguila-NOAA",
27+
"kellijohnson-NOAA",
28+
"msupernaw",
29+
"Melissa-Karp",
30+
"ChristineStawitz-NOAA",
31+
"Andrea-Havron-NOAA",
32+
"Bai-Li-NOAA",
33+
"k-doering-NOAA",
34+
"PatrickLynch-NOAA",
35+
"e-perl-NOAA",
36+
"Schiano-NOAA",
37+
"sbreitbart-NOAA"
4338
)
4439
4540
projects <- data.frame(
46-
organization = c("NOAA-FIMS", "nmfs-ost", "nmfs-ost", "nmfs-ost"),
47-
repository = c("FIMS", "DisMAP", "asar", "ss3-source-code")
41+
organization = c("NOAA-FIMS", "nmfs-ost", "nmfs-ost", "nmfs-ost"),
42+
repository = c("FIMS", "DisMAP", "asar", "ss3-source-code")
4843
)
4944
```
5045

@@ -55,19 +50,19 @@ The following GitHub users names were searched: `r glue::glue_collapse({user_nam
5550
```{r pull}
5651
# Pull the data from GitHub for each user name
5752
repository_data <- purrr::map_df(
58-
user_names,
59-
get_repositories,
60-
type = "users"
53+
user_names,
54+
get_repositories,
55+
type = "users"
6156
)
6257
6358
# Get the number of stars for FIMS and dismap
6459
stars_data <- purrr::map2_df(
65-
.x = projects[, "organization"],
66-
.y = projects[, "repository"],
67-
.f = get_stargazers,
68-
.id = "project"
60+
.x = projects[, "organization"],
61+
.y = projects[, "repository"],
62+
.f = get_stargazers,
63+
.id = "project"
6964
) |>
70-
calculate_cumulative_stars()
65+
calculate_cumulative_stars()
7166
```
7267

7368

@@ -77,22 +72,22 @@ stars_data <- purrr::map2_df(
7772
#| echo: false
7873
7974
repository_data |>
80-
dplyr::mutate(fork = ifelse(fork, "forked", "original")) |>
81-
dplyr::group_by(login, fork) |>
82-
dplyr::count() |>
83-
tidyr::pivot_wider(names_from = "fork", values_from = "n") |>
84-
dplyr::arrange(dplyr::desc(original)) |>
85-
knitr::kable()
75+
dplyr::mutate(fork = ifelse(fork, "forked", "original")) |>
76+
dplyr::group_by(login, fork) |>
77+
dplyr::count() |>
78+
tidyr::pivot_wider(names_from = "fork", values_from = "n") |>
79+
dplyr::arrange(dplyr::desc(original)) |>
80+
knitr::kable()
8681
```
8782

8883
```{r plots}
8984
#| fig-cap: "Number of stars since the first day a repository was starred."
9085
#| echo: false
9186
ggplot2::ggplot(
92-
stars_data,
93-
ggplot2::aes(day, cumulative_stars, color = project)
87+
stars_data,
88+
ggplot2::aes(day, cumulative_stars, color = project)
9489
) +
95-
ggplot2::geom_line() +
96-
ggplot2::xlab("Days since first star") +
97-
ggplot2::ylab("Number of stars")
90+
ggplot2::geom_line() +
91+
ggplot2::xlab("Days since first star") +
92+
ggplot2::ylab("Number of stars")
9893
```

0 commit comments

Comments
 (0)