@beauraines/sprint-tracker 0.6.13 → 0.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ jobs:
13
13
 
14
14
  strategy:
15
15
  matrix:
16
- node-version: [16.x, '18.x', '20.x']
16
+ node-version: ['18.x', '20.x']
17
17
 
18
18
  steps:
19
19
  - uses: actions/checkout@v3
package/CHANGELOG.md CHANGED
@@ -2,11 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [0.6.13](https://github.com/beauraines/sprint-tracker/compare/v0.6.12...v0.6.13) (2024-04-14)
5
+ ### [0.6.14](https://github.com/beauraines/sprint-tracker/compare/v0.6.12...v0.6.14) (2024-05-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * improves sprint statistics with patchwork ([#69](https://github.com/beauraines/sprint-tracker/issues/69)) ([a36c75b](https://github.com/beauraines/sprint-tracker/commit/a36c75ba68631b1e28b7f3970c77d126a0e16fa3))
6
11
 
7
12
 
8
13
  ### Bug Fixes
9
14
 
15
+ * **deps:** bump cli-markdown from 3.2.2 to 3.2.3 ([#65](https://github.com/beauraines/sprint-tracker/issues/65)) ([bc3c912](https://github.com/beauraines/sprint-tracker/commit/bc3c912a331678a9e880939c7555257983a4f4c3))
10
16
  * **deps:** bump cli-table3 from 0.6.3 to 0.6.4 ([#63](https://github.com/beauraines/sprint-tracker/issues/63)) ([1487e95](https://github.com/beauraines/sprint-tracker/commit/1487e9531782b0575ad27664814461856c454ea4))
11
17
 
12
18
  ### [0.6.12](https://github.com/beauraines/sprint-tracker/compare/v0.6.9...v0.6.12) (2024-03-27)
@@ -3,6 +3,7 @@ library(zoo)
3
3
  library(DBI)
4
4
  library(RSQLite)
5
5
  library(ggrepel)
6
+ library(patchwork)
6
7
 
7
8
  args = commandArgs(trailingOnly=TRUE)
8
9
  if (length(args)==0) {
@@ -116,33 +117,6 @@ f_labels <- sprintData %>% summarise(
116
117
  names_to = "measure" )
117
118
 
118
119
 
119
- # commitment_variance
120
- # sprintData %>%
121
- # ggplot(aes(x = sprint_number,
122
- # y = commitment_variance,
123
- # colour = name)) +
124
- # geom_line() +
125
- # geom_point()
126
-
127
-
128
-
129
- # Sprint Velocity
130
- # sprintData %>%
131
- # ggplot(aes(x = sprint_number,
132
- # y = velocity,
133
- # colour = name)) +
134
- # geom_line() +
135
- # geom_point()
136
-
137
- # Commitment Percentage
138
- # sprintData %>%
139
- # ggplot(aes(x = commitment_percentage,
140
- # y = velocity,
141
- # colour = name)) +
142
- # geom_line() +
143
- # geom_point()
144
-
145
-
146
120
  sprintDataPivot = sprintData %>%
147
121
  select(!c(completed,commitment,sprint_id,project_sprint_count,project_percent_completed)) %>%
148
122
  pivot_longer(
@@ -153,7 +127,8 @@ sprintDataPivot = sprintData %>%
153
127
 
154
128
  projectName = unique(sprintDataPivot$name)
155
129
 
156
- plot <- sprintDataPivot %>%
130
+ velocity <- sprintDataPivot %>%
131
+ filter(measure == 'velocity') %>%
157
132
  ggplot(aes(x = reorder(str_wrap(sprint_name,15),sprint_number),
158
133
  y = value
159
134
  )) +
@@ -166,7 +141,80 @@ plot <- sprintDataPivot %>%
166
141
  family = "roboto",
167
142
  size = 10 * 5/14 * 0.8) +
168
143
  # plot labels
169
- labs(title=str_c(projectName,"Sprint Statistics", sep =" "),
144
+ labs(title=str_c(projectName,"Velocity", sep =" "),
145
+ x ="",
146
+ y = "") +
147
+ #themes
148
+ theme(
149
+ plot.title = element_text(family = "roboto"),
150
+ # NO x-axis labels
151
+ axis.title.x = element_blank(),
152
+ axis.text.x = element_blank(),
153
+ axis.title.y = element_text(family = "roboto"),
154
+ panel.grid.major.y = element_line(colour = "#D9D9D9"),
155
+ panel.grid.minor.y = element_line(colour = "#D9D9D9"),
156
+ panel.grid.major.x = element_blank(), panel.grid.minor.x = element_blank(),
157
+ # background color
158
+ panel.background = element_rect(fill = "#D9D9D920", colour = NA),
159
+ legend.position = "bottom",
160
+ plot.background = element_rect(colour = "#D9D9D9", fill=NA)
161
+ )
162
+
163
+ commitmentPercentage <- sprintDataPivot %>%
164
+ filter(measure == 'commitment_percentage') %>%
165
+ ggplot(aes(x = reorder(str_wrap(sprint_name,15),sprint_number),
166
+ y = value
167
+ )) +
168
+ geom_hline(yintercept = 1, color = "green") +
169
+ geom_hline(yintercept = .8, color = "yellow") +
170
+ geom_hline(yintercept = .6, color = "red") +
171
+ geom_line(group=1,color = "#b9b9b9") +
172
+ geom_point(color = "#b9b9b9") +
173
+ # Add point values
174
+ geom_text_repel(
175
+ aes(label=scales::label_percent()(round(value,2))),
176
+ direction = "y",
177
+ family = "roboto",
178
+ size = 10 * 5/14 * 0.8) +
179
+ # plot labels
180
+ labs(title=str_c(projectName,"Commitment Percentage", sep =" "),
181
+ x ="",
182
+ y = "") +
183
+ scale_y_continuous (labels = scales::percent) +
184
+ #themes
185
+ theme(
186
+ plot.title = element_text(family = "roboto"),
187
+ # NO x-axis labels
188
+ axis.title.x = element_blank(),
189
+ axis.text.x = element_blank(),
190
+ axis.title.y = element_text(family = "roboto"),
191
+ panel.grid.major.y = element_line(colour = "#D9D9D9"),
192
+ panel.grid.minor.y = element_line(colour = "#D9D9D9"),
193
+ panel.grid.major.x = element_blank(), panel.grid.minor.x = element_blank(),
194
+ # background color
195
+ panel.background = element_rect(fill = "#D9D9D920", colour = NA),
196
+ legend.position = "bottom",
197
+ plot.background = element_rect(colour = "#D9D9D9", fill=NA)
198
+ )
199
+
200
+ commitmentVariance <- sprintDataPivot %>%
201
+ filter(measure == 'commitment_variance') %>%
202
+ ggplot(aes(x = reorder(str_wrap(sprint_name,15),sprint_number),
203
+ y = value
204
+ )) +
205
+ geom_hline(yintercept = 1, color = "green") +
206
+ geom_hline(yintercept = -20, color = "yellow") +
207
+ geom_hline(yintercept = -60, color = "red") +
208
+ geom_line(group=1,color = "#b9b9b9") +
209
+ geom_point(color = "#b9b9b9") +
210
+ # Add point values
211
+ geom_text_repel(
212
+ aes(label=round(value,2)),
213
+ direction = "y",
214
+ family = "roboto",
215
+ size = 10 * 5/14 * 0.8) +
216
+ # plot labels
217
+ labs(title=str_c(projectName,"Commitment Variance", sep =" "),
170
218
  x ="",
171
219
  y = "") +
172
220
  #themes
@@ -184,20 +232,51 @@ plot <- sprintDataPivot %>%
184
232
  plot.background = element_rect(colour = "#D9D9D9", fill=NA)
185
233
  )
186
234
 
187
- plot <- plot + facet_wrap(
188
- vars(str_to_title(sub("_"," ",measure))),
189
- ncol = 1,
190
- scales = "free_y"
191
- )
192
235
 
193
- plot <- plot +
236
+ # Add StdDeviation to each plot
237
+ velocity <- velocity +
194
238
  geom_label(
195
239
  x = 1,
196
240
  y = Inf,
197
241
  aes(label = str_c("St Dev = ",label), hjust = "left", vjust = 1.3),
198
- data = f_labels
242
+ data = f_labels %>% filter(measure == 'Velocity')
199
243
  )
200
244
 
245
+ commitmentPercentage <- commitmentPercentage +
246
+ geom_label(
247
+ x = 1,
248
+ y = Inf,
249
+ aes(label = str_c("St Dev = ",label), hjust = "left", vjust = 1.3),
250
+ data = f_labels %>% filter(measure == 'Commitment Percentage')
251
+ )
252
+
253
+ commitmentVariance <- commitmentVariance +
254
+ geom_label(
255
+ x = 1,
256
+ y = Inf,
257
+ aes(label = str_c("St Dev = ",label), hjust = "left", vjust = 1.3),
258
+ data = f_labels %>% filter(measure == 'Commitment Variance')
259
+ )
260
+
261
+ # Add shading to commitment variance and commitment percentage plots
262
+ commitmentPercentage <- commitmentPercentage +
263
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=-Inf,ymax=0.6,fill=alpha(c("red"),0.1)) +
264
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=0.6,ymax=0.8,fill=alpha("yellow",0.1)) +
265
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=0.8,ymax=Inf,fill=alpha(c("green"),0.1))
266
+
267
+ commitmentVariance <- commitmentVariance +
268
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=-Inf,ymax=-60,fill=alpha(c("red"),0.1)) +
269
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=-60,ymax=-20,fill=alpha("yellow",0.1)) +
270
+ annotate(geom ="rect",xmin=-Inf,xmax=Inf,ymin=-20,ymax=Inf,fill=alpha(c("green"),0.1))
271
+
272
+
273
+ plot <- velocity /
274
+ commitmentPercentage /
275
+ commitmentVariance
276
+
277
+
278
+
279
+
201
280
  # plot
202
281
 
203
282
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beauraines/sprint-tracker",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Database and R visualizations to track sprint performance",
5
5
  "main": "cli.js",
6
6
  "bin": {